- removed a useless .h file
- fixed a bug with nantuko husk (see tests/nantuko_husk.txt)
This commit is contained in:
wagic.the.homebrew
2009-02-06 13:10:28 +00:00
parent 295fc3b94b
commit bd632ed346
8 changed files with 55 additions and 35 deletions

View File

@@ -180,18 +180,6 @@ subtype=Treefolk Shaman
toughness=6
[/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.
abilities=flying
auto=lord(creature[blue]|myinplay) 1/1

View File

@@ -622,7 +622,18 @@ rarity=R
type=Instant
mana={2}{GW}{GW}{GW}
[/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=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

View File

@@ -46,6 +46,7 @@ lifeforce.txt
living_lands.txt
lord_of_the_pit.txt
lord_of_the_pit2.txt
nantuko_husk.txt
orcish_lumberjack.txt
paralysis.txt
paralysis2.txt

View 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]

View File

@@ -528,14 +528,14 @@ class ATargetterPowerToughnessModifierUntilEOT: public TargetAbility{
//Alteration of Power and Toughness until end of turn (Aura)
class APowerToughnessModifierUntilEndOfTurn: public MTGAbility{
class APowerToughnessModifierUntilEndOfTurn: public ActivatedAbility{
public:
int power, toughness;
int counters;
int maxcounters;
ManaCost * cost;
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){
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){
counters = 0;
target=_target;
}
void Update(float dt){
@@ -546,20 +546,19 @@ class APowerToughnessModifierUntilEndOfTurn: public MTGAbility{
counters--;
}
}
ActivatedAbility::Update(dt);
}
int isReactingToClick(MTGCardInstance * _card){
if (_card == source && (!maxcounters || counters < maxcounters) && game->currentlyActing()->game->inPlay->hasCard(source)){
if (game->currentlyActing()->getManaPool()->canAfford(cost)){
return 1;
}
}
return 0;
int fireAbility(){
return resolve();
}
int reactToClick(MTGCardInstance * _card){
if (!isReactingToClick( _card)) return 0;
game->currentlyActing()->getManaPool()->pay(cost);
int isReactingToClick(MTGCardInstance * card){
if (!ActivatedAbility::isReactingToClick(card)) return 0;
return (!maxcounters || (counters < maxcounters));
}
int resolve(){
((MTGCardInstance *)target)->power += power;
((MTGCardInstance *)target)->addToToughness(toughness);
counters++;

View File

@@ -1,5 +0,0 @@
#ifndef _ALLTARGETCHOOSERS_H_
#define _ALLTARGETCHOOSERS_H_
#endif

View File

@@ -498,6 +498,7 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){
game->addObserver(NEW AInstantPowerToughnessModifierUntilEOT(id, card, target,power,toughness));
}
}else{
OutputDebugString("NANTUKO OK\n");
game->addObserver(NEW APowerToughnessModifierUntilEndOfTurn(id, card, target,power,toughness, cost, limit));
}
}

View File

@@ -537,10 +537,6 @@
RelativePath=".\include\AllAbilities.h"
>
</File>
<File
RelativePath=".\include\allTargetChoosers.h"
>
</File>
<File
RelativePath=".\include\Blocker.h"
>