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
 
HomePortalCalendarFAQSearchMemberlistUsergroupsRegisterLog in

Share | .
 

 Gain ATK equal to highest monster - Resolved

View previous topic View next topic Go down 
AuthorMessage
NostalgiaX

avatar


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

PostSubject: Gain ATK equal to highest monster - Resolved   Sun 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
View user profile
VB99

avatar


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

PostSubject: Re: Gain ATK equal to highest monster - Resolved   Sun 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
View user profile http://www.fanfiktion.de/u/VB99
NostalgiaX

avatar


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

PostSubject: Re: Gain ATK equal to highest monster - Resolved   Sun 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
View user profile
Sponsored content





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

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

-
» Spectrum Knights [18/??]
» Destroying of a monster when it gains atk after summoning.
» Low gain VTA board voltages
» could cybermen upgrade the morbius monster
» Low Gain Board Tube Option Question

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