![]() Warrior2=cards(« Leo »,9,2, « Mol : Once per round, after you deal damage to an enemy warrior, gain 1 life. Warrior1=cards(« Alexander »,8,4, « Kat : Your attacks deal +1 damage against warriors with more life than you. I want to test if one of my cards in game have a trigger on this sequence and if yes launch the method activate for example and the desactivate method at the end of the effect (with duration variable for example) So i have a game sequence for example attack sequence with 5 steps : (this sequence is a class too, class attack and each sequence is a method of class object attack) ![]() Effect have a method in order to activate it or reset it So, each effect has his own class with the algorithmic definition of the effectĮffect have an owner (the player who own (control) the card), sometimes a target (most of the time an opponement), a trigger (which time this effect would activating, testing), a duration (once per turn, once per game, permanent). Texteffects is in this class just a text description of the effect that card can have on the game sequence, effects is the name of the object defined in an other class : the class of the effect ![]() I want to create a card game with python and i have some question about the game sequence.Ĭlass card with all necessary variables : name, life, initiative…, texteffects, effects
0 Comments
Leave a Reply. |