- Added Cunning Giant (will convert to trigger if necessary)

This commit is contained in:
moomarc
2013-02-05 14:55:01 +00:00
parent e9739d1428
commit 145b10596c
5 changed files with 22 additions and 1 deletions

1
.gitattributes vendored
View File

@@ -2161,6 +2161,7 @@ res/cardsfolder/c/cumber_stone.txt svneol=native#text/plain
res/cardsfolder/c/cunning.txt svneol=native#text/plain
res/cardsfolder/c/cunning_advisor.txt svneol=native#text/plain
res/cardsfolder/c/cunning_bandit_azamuki_treachery_incarnate.txt -text
res/cardsfolder/c/cunning_giant.txt -text
res/cardsfolder/c/cunning_lethemancer.txt svneol=native#text/plain
res/cardsfolder/c/cunning_sparkmage.txt svneol=native#text/plain
res/cardsfolder/c/cunning_wish.txt -text

View File

@@ -0,0 +1,14 @@
Name:Cunning Giant
ManaCost:5 R
Types:Creature Giant
Text:no text
PT:4/4
R:Event$ DamageDone | ValidTarget$ Player.attackedBySourceThisCombat | ValidSource$ Card.Self | IsCombat$ True | ReplaceWith$ ChooseVictim | Optional$ True | OptionalDecider$ You | Description$ If CARDNAME is unblocked, you may have it assign its combat damage to a creature defending player controls.
SVar:ChooseVictim:DB$ ChooseCard | ChoiceZone$ Battlefield | Choices$ Creature.DefenderCtrl | Amount$ 1 | ChoiceTitle$ Choose a card to deal the damage to | SubAbility$ CunningDmg
SVar:CunningDmg:DB$ DealDamage | Defined$ ChosenCard | DamageSource$ ReplacedSource | CombatDamage$ True | NumDmg$ CunningX
SVar:CunningX:ReplaceCount$DamageAmount
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/cunning_giant.jpg
SetInfo:PO2|Rare|http://magiccards.info/scans/en/po2/93.jpg
Oracle:If Cunning Giant is unblocked, you may have it assign its combat damage to a creature defending player controls.
End

View File

@@ -15,4 +15,5 @@ SVar:Z:Imprinted$Valid Creature
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/duplicant.jpg
Oracle:Imprint - When Duplicant enters the battlefield, you may exile target nontoken creature.\nAs long as the exiled card is a creature card, Duplicant has that card's power, toughness, and creature types. It's still a Shapeshifter.
SetInfo:MRD|Rare|http://magiccards.info/scans/en/mi/165.jpg
End

View File

@@ -215,7 +215,7 @@ public class ReplacementHandler {
final StringBuilder buildQuestion = new StringBuilder("Apply replacement effect of ");
buildQuestion.append(replacementEffect.getHostCard());
buildQuestion.append("?\r\n(");
buildQuestion.append(replacementEffect.toString());
buildQuestion.append(replacementEffect.toString().replace("CARDNAME", replacementEffect.getHostCard().getName()));
buildQuestion.append(")");
if (!GuiDialog.confirm(replacementEffect.getHostCard(), buildQuestion.toString())) {
return ReplacementResult.NotReplaced;

View File

@@ -62,6 +62,7 @@ import forge.game.event.LifeLossEvent;
import forge.game.event.PoisonCounterEvent;
import forge.game.event.ShuffleEvent;
import forge.game.event.SpellResolvedEvent;
import forge.game.phase.Combat;
import forge.game.phase.PhaseHandler;
import forge.game.zone.PlayerZone;
import forge.game.zone.PlayerZoneBattlefield;
@@ -2540,6 +2541,10 @@ public abstract class Player extends GameEntity implements Comparable<Player> {
if (!source.getDamageHistory().getThisTurnDamaged().contains(this)) {
return false;
}
} else if (property.equals("attackedBySourceThisCombat")) {
if (!this.equals(Singletons.getModel().getGame().getCombat().getDefenderPlayerByAttacker(source))) {
return false;
}
} else if (property.startsWith("wasDealtDamageThisTurn")) {
if (this.assignedDamage.isEmpty()) {
return false;