Laurent - Fixed Rampage, cleaned-up 10E.

This commit is contained in:
wagic.laurent
2009-05-22 16:40:32 +00:00
parent 52ea815193
commit 234cdc64c5
5 changed files with 47 additions and 63 deletions
+23 -13
View File
@@ -277,7 +277,7 @@ toughness=3
[card] [card]
text=Return target permanent to its owner's hand. text=Return target permanent to its owner's hand.
target=* target=*
alias=1229 auto=moveTo(ownerHand)
id=129494 id=129494
name=Boomerang name=Boomerang
rarity=C rarity=C
@@ -454,6 +454,16 @@ type=Sorcery
mana={2}{G}{G} mana={2}{G}{G}
[/card] [/card]
[card] [card]
text=Destroy target Plains or Island. Cryoclasm deals 3 damage to that land's controller.
target=plains,island
id=129909
name=Cryoclasm
rarity=U
color=Red
type=Sorcery
mana={2}{R}
[/card]
[card]
text=Destroy target green or white creature. text=Destroy target green or white creature.
target=creature[green;white] target=creature[green;white]
auto=destroy auto=destroy
@@ -1085,7 +1095,7 @@ subtype=Island
[card] [card]
text={4}, {T}: Draw a card. text={4}, {T}: Draw a card.
id=106478 id=106478
alias=1119 auto={4}{T}:draw:1
name=Jayemdae Tome name=Jayemdae Tome
rarity=R rarity=R
color=Artifact color=Artifact
@@ -1492,7 +1502,7 @@ mana={3}{G}{G}
text=Flying (This creature can't be blocked except by creatures with flying or reach.) Nightmare's power and toughness are each equal to the number of Swamps you control. text=Flying (This creature can't be blocked except by creatures with flying or reach.) Nightmare's power and toughness are each equal to the number of Swamps you control.
abilities=flying abilities=flying
id=129659 id=129659
alias=1170 auto=foreach(swamp|myinplay) 1/1
name=Nightmare name=Nightmare
rarity=R rarity=R
color=Black color=Black
@@ -1703,7 +1713,7 @@ mana={1}{G}
[card] [card]
text={T}: Prodigal Pyromancer deals 1 damage to target creature or player. text={T}: Prodigal Pyromancer deals 1 damage to target creature or player.
id=134752 id=134752
alias=1217 auto={T}:damage:1 target(creature,player)
name=Prodigal Pyromancer name=Prodigal Pyromancer
rarity=C rarity=C
color=Red color=Red
@@ -1787,7 +1797,7 @@ mana={1}{B}{B}
[card] [card]
text=Return target card from your graveyard to your hand. text=Return target card from your graveyard to your hand.
target=*|myGraveyard target=*|myGraveyard
alias=1263 auto=moveTo(myHand)
id=130507 id=130507
name=Recollect name=Recollect
rarity=U rarity=U
@@ -1893,7 +1903,7 @@ toughness=3
[card] [card]
text={3}, {T}: Rod of Ruin deals 1 damage to target creature or player. text={3}, {T}: Rod of Ruin deals 1 damage to target creature or player.
id=129704 id=129704
alias=1134 auto={3}{T}:damage:1 target(creature,player)
name=Rod of Ruin name=Rod of Ruin
rarity=U rarity=U
color=Artifact color=Artifact
@@ -1929,7 +1939,7 @@ toughness=2
[card] [card]
text={T}: Destroy target tapped creature. text={T}: Destroy target tapped creature.
id=129708 id=129708
alias=1175 auto={T}:destroy target(creature[tapped])
name=Royal Assassin name=Royal Assassin
rarity=R rarity=R
color=Black color=Black
@@ -2054,7 +2064,7 @@ toughness=2
[card] [card]
text=Destroy all artifacts. They can't be regenerated. text=Destroy all artifacts. They can't be regenerated.
id=130370 id=130370
alias=1317 auto=bury all(artifact)
name=Shatterstorm name=Shatterstorm
rarity=U rarity=U
color=Red color=Red
@@ -2407,7 +2417,7 @@ toughness=4
[card] [card]
text=Destroy all enchantments. text=Destroy all enchantments.
id=132131 id=132131
alias=1270 auto=destroy all(enchantment)
name=Tempest of Light name=Tempest of Light
rarity=U rarity=U
color=White color=White
@@ -2416,8 +2426,8 @@ mana={2}{W}
[/card] [/card]
[card] [card]
text=Destroy target nonartifact, nonblack creature. It can't be regenerated. text=Destroy target nonartifact, nonblack creature. It can't be regenerated.
target=creature[-artifact;-black] target=creature[-black;-artifact]
alias=1182 auto=bury
id=135199 id=135199
name=Terror name=Terror
rarity=C rarity=C
@@ -2524,8 +2534,8 @@ subtype=Aura
[card] [card]
text=Return target creature to its owner's hand. text=Return target creature to its owner's hand.
target=creature target=creature
auto=moveTo(ownerHand)
id=136218 id=136218
alias=1229
name=Unsummon name=Unsummon
rarity=C rarity=C
color=Blue color=Blue
@@ -2651,7 +2661,7 @@ toughness=2
[card] [card]
text=Destroy all creatures. They can't be regenerated. text=Destroy all creatures. They can't be regenerated.
id=129808 id=129808
alias=1372 auto=bury all(creature)
name=Wrath of God name=Wrath of God
rarity=R rarity=R
color=White color=White
-9
View File
@@ -314,15 +314,6 @@ type=Sorcery
mana={1}{B} mana={1}{B}
[/card] [/card]
[card] [card]
text=Destroy target Plains or Island. Cryoclasm deals 3 damage to that land's controller.
id=129909
name=Cryoclasm
rarity=U
color=Red
type=Sorcery
mana={2}{R}
[/card]
[card]
text=Enchant creature (Target a creature as you play this. This card comes into play attached to that creature.) Enchanted creature doesn't untap during its controller's untap step. text=Enchant creature (Target a creature as you play this. This card comes into play attached to that creature.) Enchanted creature doesn't untap during its controller's untap step.
id=129521 id=129521
name=Dehydration name=Dehydration
+10 -32
View File
@@ -2888,44 +2888,19 @@ class AKirdApe:public ListMaintainerAbility{
}; };
//Rampage ability
//Rampage ability Tentative 2
class ARampageAbility:public MTGAbility{ class ARampageAbility:public MTGAbility{
public:
int nbOpponents;
int PowerModifier;
int ToughnessModifier;
int modifier;
ARampageAbility(int _id, MTGCardInstance * _source,int _PowerModifier, int _ToughnessModifier):MTGAbility(_id, _source){
modifier=0;
}
void Update(float dt){
if (source->isAttacker()){
MTGInPlay * inPlay = game->opponent()->game->inPlay;
for (int i = 0; i < inPlay->nb_cards; i ++){
MTGCardInstance * current = inPlay->cards[i];
if (current->isDefenser()){
modifier++;
}
}
source->power+= (PowerModifier * modifier);
source->addToToughness(ToughnessModifier * modifier);
}
}
};
//Rampage ability Tentative 1 - Did not work as expected
class A1RampageAbility:public MTGAbility{
public: public:
MTGCardInstance * opponents[20]; MTGCardInstance * opponents[20];
int nbOpponents; int nbOpponents;
int PowerModifier; int PowerModifier;
int ToughnessModifier; int ToughnessModifier;
A1RampageAbility(int _id, MTGCardInstance * _source,int _PowerModifier, int _ToughnessModifier):MTGAbility(_id, _source){ int MaxOpponent;
nbOpponents = 0; ARampageAbility(int _id, MTGCardInstance * _source,int _PowerModifier, int _ToughnessModifier, int _MaxOpponent):MTGAbility(_id, _source){
PowerModifier = _PowerModifier;
ToughnessModifier = _ToughnessModifier;
MaxOpponent = _MaxOpponent;
} }
void Update(float dt){ void Update(float dt){
if (source->isAttacker()){ if (source->isAttacker()){
if (newPhase != currentPhase){ if (newPhase != currentPhase){
@@ -2935,9 +2910,12 @@ class A1RampageAbility:public MTGAbility{
while (opponent){ while (opponent){
opponents[nbOpponents] = opponent; opponents[nbOpponents] = opponent;
nbOpponents ++; nbOpponents ++;
opponent = source->getNextOpponent(opponent);
if (nbOpponents > MaxOpponent){
source->power+= PowerModifier; source->power+= PowerModifier;
source->addToToughness(ToughnessModifier); source->addToToughness(ToughnessModifier);
opponent = source->getNextOpponent(opponent);
}
} }
} }
} }
+1 -1
View File
@@ -92,7 +92,7 @@ class Constants
SWAMPHOME = 34, SWAMPHOME = 34,
PLAINSHOME = 35, PLAINSHOME = 35,
FLANKING = 36, FLANKING = 36,
RAMPAGE1 = 37, RAMPAGE = 37,
CLOUD = 38, CLOUD = 38,
CANTATTACK = 39, CANTATTACK = 39,
MUSTATTACK = 40, MUSTATTACK = 40,
+9 -4
View File
@@ -1704,7 +1704,7 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
break; break;
} }
//---addon Tempest--- //---addon Tempest---
case 4801: //Ancient Ruine case 4801: //Ancient Rune
{ {
game->addObserver(NEW ADamageForTypeControlled(_id, card,"artifact")); game->addObserver(NEW ADamageForTypeControlled(_id, card,"artifact"));
break; break;
@@ -1760,7 +1760,12 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
game->mLayers->stackLayer()->addDamage(card, target, damage); game->mLayers->stackLayer()->addDamage(card, target, damage);
break; break;
} }
case 129909: //Cryoclasm
{
card->target->controller()->game->putInGraveyard(card->target);
card->target->controller()->life-= 3;
break;
}
//--- addon shm--- //--- addon shm---
case 146013: //Corrupt case 146013: //Corrupt
{ {
@@ -1829,8 +1834,8 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
// New Abilities Flanking and Rampage // New Abilities Flanking and Rampage
if (card->basicAbilities [Constants::RAMPAGE1]){ if (card->basicAbilities [Constants::RAMPAGE]){
game->addObserver (NEW ARampageAbility(_id, card, 1, 1)); game->addObserver (NEW ARampageAbility(_id, card, 1, 1,1));
} }
//Instants are put in the graveyard automatically if that's not already done //Instants are put in the graveyard automatically if that's not already done