mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 02:38:02 +00:00
- If a double strike creature with trample gets blocked and it kills the blocker with first strike damage, afterward it should deal full regular damage to the player.
- Fixed a bug with Propaganda where it would check multiple times per attack turn. - AI Bibery also shouldn't grab a Groundbreaker anymore. - Updated Prodigal Sorcerer to use abDamageTgtCP.
This commit is contained in:
@@ -7428,7 +7428,7 @@ Prodigal Sorcerer
|
|||||||
Creature Human Wizard
|
Creature Human Wizard
|
||||||
no text
|
no text
|
||||||
1/1
|
1/1
|
||||||
abDamageCP T:1
|
abDamageTgtCP T:1
|
||||||
|
|
||||||
Kamahl, Pit Fighter
|
Kamahl, Pit Fighter
|
||||||
4 R R
|
4 R R
|
||||||
|
|||||||
@@ -9134,7 +9134,7 @@ public class CardFactory implements NewConstants {
|
|||||||
all = all.filter(new CardListFilter(){
|
all = all.filter(new CardListFilter(){
|
||||||
public boolean addCard(Card c)
|
public boolean addCard(Card c)
|
||||||
{
|
{
|
||||||
return c.isCreature() && !c.getName().equals("Ball Lightning");
|
return c.isCreature() && !c.getName().equals("Ball Lightning") && !c.getName().equals("Groundbreaker");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ public class Combat
|
|||||||
CardList att = new CardList(getAttackers());
|
CardList att = new CardList(getAttackers());
|
||||||
//sum unblocked attackers' power
|
//sum unblocked attackers' power
|
||||||
for(int i = 0; i < att.size(); i++) {
|
for(int i = 0; i < att.size(); i++) {
|
||||||
if(! isBlocked(att.get(i))) {
|
if(! isBlocked(att.get(i)) || (getBlockers(att.get(i)).size() == 0 && att.get(i).getKeyword().contains("Trample")) ){
|
||||||
int damageDealt = att.get(i).getNetAttack();
|
int damageDealt = att.get(i).getNetAttack();
|
||||||
if (CombatUtil.isDoranInPlay())
|
if (CombatUtil.isDoranInPlay())
|
||||||
damageDealt = att.get(i).getNetDefense();
|
damageDealt = att.get(i).getNetDefense();
|
||||||
@@ -401,6 +401,7 @@ public class Combat
|
|||||||
this.addDefendingDamage(trample, attacking.get(i));
|
this.addDefendingDamage(trample, attacking.get(i));
|
||||||
}
|
}
|
||||||
}//1 blocker
|
}//1 blocker
|
||||||
|
|
||||||
else if(getAttackingPlayer().equals(Constant.Player.Computer))
|
else if(getAttackingPlayer().equals(Constant.Player.Computer))
|
||||||
{
|
{
|
||||||
int damageDealt = attacking.get(i).getNetAttack();
|
int damageDealt = attacking.get(i).getNetAttack();
|
||||||
|
|||||||
@@ -600,52 +600,52 @@ public class CombatUtil {
|
|||||||
//if (AllZone.Phase.getPhase().equals(Constant.Phase.Combat_Declare_Attackers))
|
//if (AllZone.Phase.getPhase().equals(Constant.Phase.Combat_Declare_Attackers))
|
||||||
if( /*AllZone.Phase.getPhase().equals("Declare Blockers") || */
|
if( /*AllZone.Phase.getPhase().equals("Declare Blockers") || */
|
||||||
AllZone.Phase.getPhase().equals(Constant.Phase.Combat_Declare_Attackers_InstantAbility)) {
|
AllZone.Phase.getPhase().equals(Constant.Phase.Combat_Declare_Attackers_InstantAbility)) {
|
||||||
//if (!c.getCreatureAttackedThisTurn())
|
if (!c.getCreatureAttackedThisTurn())
|
||||||
//{
|
{
|
||||||
String cost = CardFactoryUtil.getPropagandaCost(c);
|
String cost = CardFactoryUtil.getPropagandaCost(c);
|
||||||
if(!cost.equals("0")) {
|
if(!cost.equals("0")) {
|
||||||
final Ability ability = new Ability(c, cost) {
|
final Ability ability = new Ability(c, cost) {
|
||||||
@Override
|
@Override
|
||||||
public void resolve() {
|
public void resolve() {
|
||||||
canAttack[0] = true;
|
canAttack[0] = true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
final Command unpaidCommand = new Command() {
|
final Command unpaidCommand = new Command() {
|
||||||
|
|
||||||
private static final long serialVersionUID = -6483405139208343935L;
|
private static final long serialVersionUID = -6483405139208343935L;
|
||||||
|
|
||||||
public void execute() {
|
public void execute() {
|
||||||
canAttack[0] = false;
|
canAttack[0] = false;
|
||||||
AllZone.Combat.removeFromCombat(crd);
|
AllZone.Combat.removeFromCombat(crd);
|
||||||
crd.untap();
|
crd.untap();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
final Command paidCommand = new Command() {
|
final Command paidCommand = new Command() {
|
||||||
private static final long serialVersionUID = -8303368287601871955L;
|
private static final long serialVersionUID = -8303368287601871955L;
|
||||||
|
|
||||||
public void execute() {
|
public void execute() {
|
||||||
canAttack[0] = true;
|
canAttack[0] = true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if(c.getController().equals(Constant.Player.Human)) {
|
if(c.getController().equals(Constant.Player.Human)) {
|
||||||
AllZone.InputControl.setInput(new Input_PayManaCost_Ability("Propaganda " + c + "\r\n",
|
AllZone.InputControl.setInput(new Input_PayManaCost_Ability("Propaganda " + c + "\r\n",
|
||||||
ability.getManaCost(), paidCommand, unpaidCommand));
|
ability.getManaCost(), paidCommand, unpaidCommand));
|
||||||
} else //computer
|
} else //computer
|
||||||
{
|
{
|
||||||
if(ComputerUtil.canPayCost(ability)) ComputerUtil.playNoStack(ability);
|
if(ComputerUtil.canPayCost(ability)) ComputerUtil.playNoStack(ability);
|
||||||
else {
|
else {
|
||||||
canAttack[0] = false;
|
canAttack[0] = false;
|
||||||
AllZone.Combat.removeFromCombat(crd);
|
AllZone.Combat.removeFromCombat(crd);
|
||||||
crd.untap();
|
crd.untap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
c.setCreatureAttackedThisTurn(true);
|
||||||
}
|
}
|
||||||
//c.setCreatureAttackedThisTurn(true);
|
|
||||||
//}
|
|
||||||
return canAttack[0];
|
return canAttack[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public class Input_CombatDamage extends Input {
|
|||||||
public void damageCreatureAndPlayer() {
|
public void damageCreatureAndPlayer() {
|
||||||
String player = AllZone.Combat.getDefendingPlayer();
|
String player = AllZone.Combat.getDefendingPlayer();
|
||||||
if(player.equals("")) //this is a really bad hack, to allow raging goblin to attack on turn 1
|
if(player.equals("")) //this is a really bad hack, to allow raging goblin to attack on turn 1
|
||||||
player = Constant.Player.Computer;
|
player = Constant.Player.Computer;
|
||||||
PlayerLife life = AllZone.GameAction.getPlayerLife(player);
|
PlayerLife life = AllZone.GameAction.getPlayerLife(player);
|
||||||
|
|
||||||
life.subtractLife(AllZone.Combat.getTotalDefendingDamage());
|
life.subtractLife(AllZone.Combat.getTotalDefendingDamage());
|
||||||
|
|||||||
Reference in New Issue
Block a user