![]() |
Wizards Magic
3.2.20
MTG based computer game
|
Basic class for the creatures. More...
Public Member Functions | |
| def | __init__ |
| def | set_health |
| Set Health. More... | |
| def | set_power |
| Set Power. More... | |
| def | light_switch |
| Turn off/On label on card. More... | |
| def | play_cast_sound |
| play cast sound if sounds turned on in options More... | |
| def | play_summon_sound |
| play summon sound if sounds turned on in options More... | |
| def | get_attack_position |
| returns opposite cardbox Id. More... | |
| def | get_self_cards |
| returns array of cards of player, who has this card More... | |
| def | get_self_cardboxes |
| returns cardboxes of player, who has this card More... | |
| def | get_enemy_cardboxes |
| returns cardboxes of enemy of player, who has this card More... | |
| def | get_enemy_cards |
| returns enemy cards More... | |
| def | get_adjacent_position |
| return adjacent cardboxes ids for example we has cardboxes [1, 2, 3, 4 ,5] If we call this method from card, which is on cardbox with ID=4 this function returns [3,5] If we call this method from card, which is on cardbox with ID=5 this function returns [4] More... | |
| def | get_attack_adjacent_position |
| return adjacent cardboxes ids of opposite cardbox for example we has cardboxes: [0, 1, 2, 3, 4] [5, 6, 7, 8, 9] if we call this method from card, which is on cardbox with ID=2, function returns [6, 8] if we call this method from card, which is on cardbox with ID=9, function returns [3] More... | |
| def | run_attack_animation |
| start attack animation More... | |
| def | attack |
| Function called when card in Attack phase. More... | |
| def | cast_action |
| Function which called if card has some "cast action" and player press on this card. More... | |
| def | focus_cast_action |
| function for cast which needs on target More... | |
| def | card_summoned |
| function which calls when any card summoned More... | |
| def | card_died |
| function which calls when any card dies More... | |
| def | spell_used |
| function which calls when any spell used More... | |
| def | for_each_self_card |
| function for each friendly cards on field. More... | |
| def | summon |
| function which call when card in summon phase More... | |
| def | summon_speaker |
| tell to other cards about summon. More... | |
| def | damage |
| function which calls when card in damage phase. More... | |
| def | additional_turn_action |
| Turn action, but with higher priority. More... | |
| def | die |
| function which calls when card in Die Phase More... | |
| def | enemy_die |
| function which calls when card kill card in opposite cardbox More... | |
| def | turn |
| function which called when card in Turn Phase ( Beginning of player turn ) More... | |
| def | heal |
| Heal card. More... | |
| def | ai |
| function that calculating factor of utility this card for some type(summon, cast, etc) to some card. More... | |
| def | update |
| Redraw. More... | |
| def | owner_gets_damage |
| function which called when the card`s owner gets damage More... | |
Public Attributes | |
| parent | |
| cardbox where card is More... | |
| light | |
| image | |
| image More... | |
| light_image | |
| surface_backup | |
| font | |
| type | |
| type of card ( creature or spell ) More... | |
| killed | |
| count of killed creatures by this card More... | |
| spells | |
| array of long term spells More... | |
| default_power | |
| moves_alive | |
| count of turns how cards alive More... | |
| max_health | |
| field | |
| Boolean. More... | |
| used_cast | |
| True if card has cast action. More... | |
| element | |
| font_color | |
| focus_cast | |
| cast | |
| info | |
| health | |
| power | |
| rect | |
Basic class for the creatures.
| def cards.Prototype.__init__ | ( | self | ) |
| def cards.Prototype.additional_turn_action | ( | self | ) |
Turn action, but with higher priority.
Deprecated! We will needs on new mechanism
| def cards.Prototype.ai | ( | self, | |
type = 'summon', |
|||
enemy = None |
|||
| ) |
function that calculating factor of utility this card for some type(summon, cast, etc) to some card.
For example this can to determine which card we should summon againist Fire Drake
| def cards.Prototype.attack | ( | self | ) |
Function called when card in Attack phase.
| def cards.Prototype.card_died | ( | self, | |
| card | |||
| ) |
function which calls when any card dies
| def cards.Prototype.card_summoned | ( | self, | |
| card | |||
| ) |
function which calls when any card summoned
| def cards.Prototype.cast_action | ( | self | ) |
Function which called if card has some "cast action" and player press on this card.
Without choosing target!
| def cards.Prototype.damage | ( | self, | |
| damage, | |||
| enemy, | |||
cast = False |
|||
| ) |
function which calls when card in damage phase.
| def cards.Prototype.die | ( | self | ) |
function which calls when card in Die Phase
| def cards.Prototype.enemy_die | ( | self | ) |
function which calls when card kill card in opposite cardbox
| def cards.Prototype.focus_cast_action | ( | self, | |
| target | |||
| ) |
function for cast which needs on target
| def cards.Prototype.for_each_self_card | ( | self | ) |
function for each friendly cards on field.
( FUTURE FEATURE! NOT CODED YET )
| def cards.Prototype.get_adjacent_position | ( | self | ) |
return adjacent cardboxes ids for example we has cardboxes [1, 2, 3, 4 ,5] If we call this method from card, which is on cardbox with ID=4 this function returns [3,5] If we call this method from card, which is on cardbox with ID=5 this function returns [4]
| def cards.Prototype.get_attack_adjacent_position | ( | self, | |
| attack_position | |||
| ) |
return adjacent cardboxes ids of opposite cardbox for example we has cardboxes: [0, 1, 2, 3, 4] [5, 6, 7, 8, 9] if we call this method from card, which is on cardbox with ID=2, function returns [6, 8] if we call this method from card, which is on cardbox with ID=9, function returns [3]
| def cards.Prototype.get_attack_position | ( | self | ) |
returns opposite cardbox Id.
| def cards.Prototype.get_enemy_cardboxes | ( | self | ) |
returns cardboxes of enemy of player, who has this card
| def cards.Prototype.get_enemy_cards | ( | self | ) |
returns enemy cards
| def cards.Prototype.get_self_cardboxes | ( | self | ) |
returns cardboxes of player, who has this card
| def cards.Prototype.get_self_cards | ( | self | ) |
returns array of cards of player, who has this card
| def cards.Prototype.heal | ( | self, | |
| health, | |||
| max_health | |||
| ) |
Heal card.
| def cards.Prototype.light_switch | ( | self, | |
| on | |||
| ) |
Turn off/On label on card.
for example to distinguish cards for cast action
| def cards.Prototype.owner_gets_damage | ( | self, | |
| damage | |||
| ) |
function which called when the card`s owner gets damage
| def cards.Prototype.play_cast_sound | ( | self | ) |
play cast sound if sounds turned on in options
| def cards.Prototype.play_summon_sound | ( | self | ) |
play summon sound if sounds turned on in options
| def cards.Prototype.run_attack_animation | ( | self | ) |
start attack animation
| def cards.Prototype.set_health | ( | self, | |
| health | |||
| ) |
Set Health.
| def cards.Prototype.set_power | ( | self, | |
| power | |||
| ) |
Set Power.
| def cards.Prototype.spell_used | ( | self, | |
| spell | |||
| ) |
function which calls when any spell used
| def cards.Prototype.summon | ( | self | ) |
function which call when card in summon phase
| def cards.Prototype.summon_speaker | ( | self | ) |
tell to other cards about summon.
Calls card_summoned from each card on field.
| def cards.Prototype.turn | ( | self | ) |
function which called when card in Turn Phase ( Beginning of player turn )
| def cards.Prototype.update | ( | self | ) |
Redraw.
| cards.Prototype.cast |
| cards.Prototype.default_power |
| cards.Prototype.element |
| cards.Prototype.field |
Boolean.
Card in field, on in deck.
| cards.Prototype.focus_cast |
| cards.Prototype.font |
| cards.Prototype.font_color |
| cards.Prototype.health |
| cards.Prototype.image |
image
| cards.Prototype.info |
| cards.Prototype.killed |
count of killed creatures by this card
| cards.Prototype.light |
| cards.Prototype.light_image |
| cards.Prototype.max_health |
| cards.Prototype.moves_alive |
count of turns how cards alive
| cards.Prototype.parent |
cardbox where card is
| cards.Prototype.power |
| cards.Prototype.rect |
| cards.Prototype.spells |
array of long term spells
| cards.Prototype.surface_backup |
| cards.Prototype.type |
type of card ( creature or spell )
| cards.Prototype.used_cast |
True if card has cast action.
1.8.6