a place for all your custom card needs you can post scripts pics and request for card to be made also please donate to the funding for a new server made for custom card duels
 
HomePortalLatest imagesSearchRegisterLog in

Share
 

 Gain ATK equal to highest monster - Resolved

View previous topic View next topic Go down 
AuthorMessage
NostalgiaX

NostalgiaX


Member Title : Novice Duelist
Posts : 13
Join date : 2014-09-01
Age : 32
Location : United States

Gain ATK equal to highest monster - Resolved Empty
PostSubject: Gain ATK equal to highest monster - Resolved   Gain ATK equal to highest monster - Resolved Icon_minitimeSun Sep 07, 2014 10:44 pm

I want a monster card's effect to gain the ATK of my opponent's highest monster while it's face-up on the field. For example, say my opponent summons Dark Magician. My monster's ATK becomes 2500. Then later in that same turn, my opponent summons Blue-Eyes White Dragon. My monster's ATK then becomes 3000.

However, I have no idea how to even begin coding this. I've looked at the scripts for Copycat and Widespread Ruin, but I don't quite understand them. Could I get a little advice?


Last edited by NostalgiaX on Sun Sep 07, 2014 11:40 pm; edited 1 time in total
Back to top Go down
VB99

VB99


Member Title : Legendary Planet
Posts : 368
Join date : 2013-11-10

Gain ATK equal to highest monster - Resolved Empty
PostSubject: Re: Gain ATK equal to highest monster - Resolved   Gain ATK equal to highest monster - Resolved Icon_minitimeSun Sep 07, 2014 10:53 pm

local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cXXXXXXXX.adval)
c:RegisterEffect(e1)
function cXXXXXXXX.adval(e,c)
local g=Duel.GetMatchingGroup(cXXXXXXXX.filter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()==0 then
return 0
else
local tg,val=g:GetMaxGroup(Card.GetAttack)
return val
end
end
function cXXXXXXXX.filter(c)
return c:IsFaceup() and c:GetCode()~=XXXXXXXX
end

Here you go, should work
Back to top Go down
http://www.fanfiktion.de/u/VB99
NostalgiaX

NostalgiaX


Member Title : Novice Duelist
Posts : 13
Join date : 2014-09-01
Age : 32
Location : United States

Gain ATK equal to highest monster - Resolved Empty
PostSubject: Re: Gain ATK equal to highest monster - Resolved   Gain ATK equal to highest monster - Resolved Icon_minitimeSun Sep 07, 2014 11:39 pm

Yep! That did it, and I understood what was done for the most part. Thanks, VB.
Back to top Go down
Sponsored content





Gain ATK equal to highest monster - Resolved Empty
PostSubject: Re: Gain ATK equal to highest monster - Resolved   Gain ATK equal to highest monster - Resolved Icon_minitime

Back to top Go down
 

Gain ATK equal to highest monster - Resolved

View previous topic View next topic Back to top 
Page 1 of 1

 Similar topics

-
» each monster you control gain this effect
» Xyz with Trap Cards - Resolved
» [RESOLVED] Target error
» Pendulum Summoning Synchro Monsters -Resolved-
» Question about Monster Effects

Permissions in this forum:You cannot reply to topics in this forum
Mackpro :: MackPro :: Custom Card Ruling and Bugs-