added weapon handling for connect, please be sure to code these weapons as follows
target=*|mybattlefield
auto={0}:equip
auto=connect
notice i declare the equip before the connect, this is becuase connect will use the equip ability of the card to handle it.
target= can be used for connecting them now as the first time equip. please remember to use teach( or autoskill= to avoid giving abilities forever to a target...this makes equipments hybrid auras.
also, moved parentchildrule init from original init to rules.txt...
in yourrules.txt
should look like this:
include mtg.txt
name=Classic
[INIT]
mode=mtg
auto=connectrule
[PLAYERS]
auto=shuffle
auto=draw:7
i did this becuase i want to reuse the parentchild associations for mtgabilities...and if parents will always kill thier children, i won't be able to use it :P
changed connect into an instant ability, i don't want this ability to be done by menu choice.
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include "Translate.h"
|
||||
#include "ThisDescriptor.h"
|
||||
#include "ExtraCost.h"
|
||||
#include "MTGRules.h"
|
||||
|
||||
|
||||
//Used for Lord/This parsing
|
||||
@@ -2397,6 +2398,14 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
||||
return a;
|
||||
}
|
||||
|
||||
//adds the rule to destroy children if parent dies
|
||||
found = s.find("connectrule");
|
||||
if(found != string::npos)
|
||||
{
|
||||
GameObserver * game = GameObserver::GetInstance();
|
||||
game->addObserver(NEW ParentChildRule(-1));
|
||||
return NULL;
|
||||
}
|
||||
//create an association between cards.
|
||||
found = s.find("connect");
|
||||
if (found != string::npos)
|
||||
|
||||
Reference in New Issue
Block a user