Erwan
- removed a useless .h file - fixed a bug with nantuko husk (see tests/nantuko_husk.txt)
This commit is contained in:
@@ -180,18 +180,6 @@ subtype=Treefolk Shaman
|
|||||||
toughness=6
|
toughness=6
|
||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
text=Sacrifice Fulminator Mage: Destroy target nonbasic land.
|
|
||||||
auto={S}:destroy target(land[-plains;-mountain;-swamp;-forest;-island])
|
|
||||||
id=142009
|
|
||||||
name=Fulminator Mage
|
|
||||||
rarity=R
|
|
||||||
type=Creature
|
|
||||||
mana={1}{BR}{BR}
|
|
||||||
power=2
|
|
||||||
subtype=Elemental Shaman
|
|
||||||
toughness=2
|
|
||||||
[/card]
|
|
||||||
[card]
|
|
||||||
text=Flying Other blue creatures you control get +1/+1. Other black creatures you control get +1/+1.
|
text=Flying Other blue creatures you control get +1/+1. Other black creatures you control get +1/+1.
|
||||||
abilities=flying
|
abilities=flying
|
||||||
auto=lord(creature[blue]|myinplay) 1/1
|
auto=lord(creature[blue]|myinplay) 1/1
|
||||||
|
|||||||
@@ -622,7 +622,18 @@ rarity=R
|
|||||||
type=Instant
|
type=Instant
|
||||||
mana={2}{GW}{GW}{GW}
|
mana={2}{GW}{GW}{GW}
|
||||||
[/card]
|
[/card]
|
||||||
|
[card]
|
||||||
|
text=Sacrifice Fulminator Mage: Destroy target nonbasic land.
|
||||||
|
auto={S}:destroy target(land[-plains;-mountain;-swamp;-forest;-island])
|
||||||
|
id=142009
|
||||||
|
name=Fulminator Mage
|
||||||
|
rarity=R
|
||||||
|
type=Creature
|
||||||
|
mana={1}{BR}{BR}
|
||||||
|
power=2
|
||||||
|
subtype=Elemental Shaman
|
||||||
|
toughness=2
|
||||||
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
text=When Furystoke Giant comes into play, other creatures you control gain "{T}: This creature deals 2 damage to target creature or player" until end of turn. Persist (When this creature is put into a graveyard from play, if it had no -1/-1 counters on it, return it to play under its owner's control with a -1/-1 counter on it.)
|
text=When Furystoke Giant comes into play, other creatures you control gain "{T}: This creature deals 2 damage to target creature or player" until end of turn. Persist (When this creature is put into a graveyard from play, if it had no -1/-1 counters on it, return it to play under its owner's control with a -1/-1 counter on it.)
|
||||||
id=152069
|
id=152069
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ lifeforce.txt
|
|||||||
living_lands.txt
|
living_lands.txt
|
||||||
lord_of_the_pit.txt
|
lord_of_the_pit.txt
|
||||||
lord_of_the_pit2.txt
|
lord_of_the_pit2.txt
|
||||||
|
nantuko_husk.txt
|
||||||
orcish_lumberjack.txt
|
orcish_lumberjack.txt
|
||||||
paralysis.txt
|
paralysis.txt
|
||||||
paralysis2.txt
|
paralysis2.txt
|
||||||
|
|||||||
29
projects/mtg/bin/Res/test/nantuko_husk.txt
Normal file
29
projects/mtg/bin/Res/test/nantuko_husk.txt
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
#Testing Nantuko Husk's ability on an orcish artillery
|
||||||
|
[INIT]
|
||||||
|
FIRSTMAIN
|
||||||
|
[PLAYER1]
|
||||||
|
inplay:129653,129663
|
||||||
|
[PLAYER2]
|
||||||
|
[DO]
|
||||||
|
129653
|
||||||
|
129663
|
||||||
|
next
|
||||||
|
#combat begin
|
||||||
|
next
|
||||||
|
#attackers
|
||||||
|
129653
|
||||||
|
choice 0
|
||||||
|
next
|
||||||
|
#defensers
|
||||||
|
next
|
||||||
|
#damage
|
||||||
|
next
|
||||||
|
#combat end
|
||||||
|
[ASSERT]
|
||||||
|
COMBATEND
|
||||||
|
[PLAYER1]
|
||||||
|
inplay:129653
|
||||||
|
graveyard:129663
|
||||||
|
[PLAYER2]
|
||||||
|
life:16
|
||||||
|
[END]
|
||||||
@@ -528,14 +528,14 @@ class ATargetterPowerToughnessModifierUntilEOT: public TargetAbility{
|
|||||||
|
|
||||||
|
|
||||||
//Alteration of Power and Toughness until end of turn (Aura)
|
//Alteration of Power and Toughness until end of turn (Aura)
|
||||||
class APowerToughnessModifierUntilEndOfTurn: public MTGAbility{
|
class APowerToughnessModifierUntilEndOfTurn: public ActivatedAbility{
|
||||||
public:
|
public:
|
||||||
int power, toughness;
|
int power, toughness;
|
||||||
int counters;
|
int counters;
|
||||||
int maxcounters;
|
int maxcounters;
|
||||||
ManaCost * cost;
|
APowerToughnessModifierUntilEndOfTurn(int id, MTGCardInstance * _source, MTGCardInstance * _target, int _power, int _toughness, ManaCost * _cost, int _maxcounters = 0):ActivatedAbility(id,_source,_cost,0,0),power(_power),toughness(_toughness),maxcounters(_maxcounters){
|
||||||
APowerToughnessModifierUntilEndOfTurn(int id, MTGCardInstance * _source, MTGCardInstance * _target, int _power, int _toughness, ManaCost * _cost, int _maxcounters = 0):MTGAbility(id,_source,_target),power(_power),toughness(_toughness),maxcounters(_maxcounters), cost(_cost){
|
|
||||||
counters = 0;
|
counters = 0;
|
||||||
|
target=_target;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Update(float dt){
|
void Update(float dt){
|
||||||
@@ -546,20 +546,19 @@ class APowerToughnessModifierUntilEndOfTurn: public MTGAbility{
|
|||||||
counters--;
|
counters--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ActivatedAbility::Update(dt);
|
||||||
}
|
}
|
||||||
|
|
||||||
int isReactingToClick(MTGCardInstance * _card){
|
int fireAbility(){
|
||||||
if (_card == source && (!maxcounters || counters < maxcounters) && game->currentlyActing()->game->inPlay->hasCard(source)){
|
return resolve();
|
||||||
if (game->currentlyActing()->getManaPool()->canAfford(cost)){
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int reactToClick(MTGCardInstance * _card){
|
int isReactingToClick(MTGCardInstance * card){
|
||||||
if (!isReactingToClick( _card)) return 0;
|
if (!ActivatedAbility::isReactingToClick(card)) return 0;
|
||||||
game->currentlyActing()->getManaPool()->pay(cost);
|
return (!maxcounters || (counters < maxcounters));
|
||||||
|
}
|
||||||
|
|
||||||
|
int resolve(){
|
||||||
((MTGCardInstance *)target)->power += power;
|
((MTGCardInstance *)target)->power += power;
|
||||||
((MTGCardInstance *)target)->addToToughness(toughness);
|
((MTGCardInstance *)target)->addToToughness(toughness);
|
||||||
counters++;
|
counters++;
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
#ifndef _ALLTARGETCHOOSERS_H_
|
|
||||||
#define _ALLTARGETCHOOSERS_H_
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -498,6 +498,7 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){
|
|||||||
game->addObserver(NEW AInstantPowerToughnessModifierUntilEOT(id, card, target,power,toughness));
|
game->addObserver(NEW AInstantPowerToughnessModifierUntilEOT(id, card, target,power,toughness));
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
OutputDebugString("NANTUKO OK\n");
|
||||||
game->addObserver(NEW APowerToughnessModifierUntilEndOfTurn(id, card, target,power,toughness, cost, limit));
|
game->addObserver(NEW APowerToughnessModifierUntilEndOfTurn(id, card, target,power,toughness, cost, limit));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -537,10 +537,6 @@
|
|||||||
RelativePath=".\include\AllAbilities.h"
|
RelativePath=".\include\AllAbilities.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath=".\include\allTargetChoosers.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath=".\include\Blocker.h"
|
RelativePath=".\include\Blocker.h"
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user