ID:1486128
 
(See the best response by Lugia319.)
Hi, I am making a Yugioh Game and recently completed my Duel System for it (Phases, Attacking, and Summoning) Now comes the part I need help on. For each indivdual effect monster/spell/trap, I need to put that those cards have effects. I thought simply placing a proc under the card would work if I set certain conditions, but I'm thinking twice. Point is, how would I go about setting up card effects for each card? All help is appreciated.

Best response
Try something like this

Card
proc
CardEffect() // This is basic proc you'll call.
return

DragonBreath

CardEffect() // This is the above proc, inherited
// Card effect here
So would it be something like this?

obj
Cards
proc
BladeflyEffect()
return
BladeflyEffect()
for(var/obj/Cards/Bladefly in src.Monsters_on_Field) //if Card in on Field
if(Negated == 1) return
if(Negated && Destroyed == 1)
Bladefly.Graveyard.Add()
Bladefly.loc = 0
src.Monsters_Played --
break
for(var/obj/Cards/C in src.Monsters_on_Field && DuelTarget.Monsters_on_Field) //for all monsters on both fields
if(C.Attribute == "WIND")
C.ATK += 500
break
if(C.Attribute == "EARTH")
C.ATK -= 400
break


I tried what you did Lugia and it didn't work when the card hit the field.
Is it as you have it posted or is it like I showed you?

Card
proc
Effect()
return

verb
Play()
src.Effect()

BladeFly
Effect()
// stuff
..()


The intent was to have 1 Effect proc and modify it for each of the cards.