2 bug fixes;
first, while hunting down easter eggs in the todo.dat i started trying to code some un-added equipment...noticed that thisforeach was exhabiting strange behavior. what was happening was in the changed line, abilities.size() was a non-static number, so on most abilities, thisforeach was actually stopping prematurely. which explains why there was no test added for thisforeach, becuase it really wasnt working correctly. what i did to correct the issue was set "i" as an unsigned int = abilities.size()..this way abilities being added don't stop it prematurely in the process of adding the matches. 2nd, this one is geared towards equipment only, it is a bug fix, not a "lets recode all equipment to use this"...i noticed that alot of equipment was suffering from double entries of activated abilities, the first entry was always targeted at the equipment and did nothing in most cases, the 2nd was always added during the getabilities call. to fix, i added autoskill= ...what this line is used for it activated abilities or abilities that otherwise shouldnt exist when the card is not equipped, it is called on when getabilities function is called by equip() and for removel purposes.
This commit is contained in:
@@ -3073,6 +3073,13 @@ int AbilityFactory::getAbilities(vector<MTGAbility *> * v, Spell * spell, MTGCar
|
||||
magicText.append(faceupC);
|
||||
|
||||
}
|
||||
else if(card && card->hasType("equipment") && card->target)
|
||||
{
|
||||
magicText = card->model->data->magicText;
|
||||
string equipText = card->magicTexts["skill"];
|
||||
magicText.append("\n");
|
||||
magicText.append(equipText);
|
||||
}
|
||||
else
|
||||
{
|
||||
magicText = card->magicText;
|
||||
|
||||
Reference in New Issue
Block a user