- Fixed Shadow Ability now works properly
- Added Generic KirdApe give P/W modifier when cards inplay - Added Rampage (WIP) does not work at the moment - Added Cards from diverse Sets
This commit is contained in:
@@ -233,23 +233,22 @@ int MTGCardInstance::setToughness(int value){
|
||||
|
||||
int MTGCardInstance::canBlock(){
|
||||
if (!tapped && isACreature())return 1;
|
||||
if (!basicAbilities[SHADOW]&& isACreature()) return 1; // Try to add shadow
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int MTGCardInstance::canBlock(MTGCardInstance * opponent){
|
||||
if (!canBlock()) return 0;
|
||||
if (!opponent) return 1;
|
||||
if (!opponent->isAttacker()) return 0;
|
||||
|
||||
// Comprehensive rule 502.7f : If a creature with protection attacks, it can't be blocked by creatures that have the stated quality.
|
||||
if (opponent->protectedAgainst(this)) return 0;
|
||||
|
||||
if (opponent->basicAbilities[UNBLOCKABLE]) return 0;
|
||||
if (opponent->basicAbilities[FEAR] && !(hasColor(MTG_COLOR_ARTIFACT) || hasColor(MTG_COLOR_BLACK))) return 0;
|
||||
if (opponent->basicAbilities[FLYING] && !( basicAbilities[FLYING] || basicAbilities[REACH])) return 0;
|
||||
// If opponent has shadow and a creature does not have either shadow or reachshadow it cannot be blocked
|
||||
if (opponent->basicAbilities[SHADOW] && !( basicAbilities[SHADOW] || basicAbilities[REACHSHADOW])) return 0;
|
||||
// If opponent does not have shadow and a creature has shadow it cannot be blocked
|
||||
if (!opponent->basicAbilities[SHADOW] && basicAbilities[SHADOW]) return 0;
|
||||
if (opponent->basicAbilities[SWAMPWALK] && controller()->game->inPlay->hasType("swamp")) return 0;
|
||||
if (opponent->basicAbilities[FORESTWALK] && controller()->game->inPlay->hasType("forest")) return 0;
|
||||
if (opponent->basicAbilities[ISLANDWALK] && controller()->game->inPlay->hasType("island")) return 0;
|
||||
@@ -258,7 +257,6 @@ int MTGCardInstance::canBlock(MTGCardInstance * opponent){
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
MTGCardInstance * MTGCardInstance::getNextPartner(){
|
||||
MTGInPlay * inplay = controller()->game->inPlay;
|
||||
MTGCardInstance * bandingPartner = inplay->getNextAttacker(banding);
|
||||
|
||||
Reference in New Issue
Block a user