Skip to content

Commit

Permalink
Fixed Uncharnel, fixed Bone Prsion not giving Bones
Browse files Browse the repository at this point in the history
  • Loading branch information
shiki committed Mar 11, 2018
1 parent bfe7f8b commit 5e6c608
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 54 deletions.
Binary file modified bin/necromod/cards/Plague_Bolt.class
Binary file not shown.
1 change: 1 addition & 0 deletions src/main/java/necromod/cards/Bone_Prison.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public void use(AbstractPlayer p, AbstractMonster m) {

}
AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(m, p, new BonePrisonPower(m), 1));
AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(p, p, new BonesPower(p, 1), 1));

}
else {
Expand Down
101 changes: 53 additions & 48 deletions src/main/java/necromod/cards/Plague_Bolt.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,66 +49,71 @@ public void use(AbstractPlayer p, AbstractMonster m) {

ArrayList<String> Random = new ArrayList<String>();

//TODO : Make it happen 2 times.
int i;
int r;
int amount;

for(int x = 0; x < 2;x++) {

for(String d : Debuff) {
if (p.hasPower(d)){
Random.add(d);
for(String d : Debuff) {
if (p.hasPower(d)){
Random.add(d);
}
}
if(p.hasPower("Strength") && (p.getPower("Strength").amount < 0)){
Random.add("Strength");
}
}
if(p.hasPower("Strength") && (p.getPower("Strength").amount < 0)){
Random.add("Strength");
}

if(p.hasPower("Dexterity") && (p.getPower("Dexterity").amount < 0)){
Random.add("Dexterity");
}
if(p.hasPower("Dexterity") && (p.getPower("Dexterity").amount < 0)){
Random.add("Dexterity");
}

if(!Random.isEmpty()) {
int i = Random.size();
int r = (int) Math.random()*i;
int amount;
if(!Random.isEmpty()) {
i = Random.size();
r = (int) Math.random()*i;

String debuff = Random.get(r);
String debuff = Random.get(r);

switch(debuff){
case "Poison" :
amount = p.getPower("Poison").amount;
AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(p, p, "Poison"));
AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(m, p, new PoisonPower(m, p, amount), amount, AbstractGameAction.AttackEffect.POISON));
break;
switch(debuff){
case "Poison" :
amount = p.getPower("Poison").amount;
AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(p, p, "Poison"));
AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(m, p, new PoisonPower(m, p, amount), amount, AbstractGameAction.AttackEffect.POISON));
break;

case "Weakened" :
amount = p.getPower("Weakened").amount;
AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(p, p, "Weakened"));
AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(m, p, new WeakPower(m, amount, false), amount));
break;
case "Weakened" :
amount = p.getPower("Weakened").amount;
AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(p, p, "Weakened"));
AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(m, p, new WeakPower(m, amount, false), amount));
break;

case "Frail" :
amount = p.getPower("Frail").amount;
AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(p, p, "Frail"));
AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(m, p, new FrailPower(m, amount, false),amount, true, AbstractGameAction.AttackEffect.NONE));
break;
case "Frail" :
amount = p.getPower("Frail").amount;
AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(p, p, "Frail"));
AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(m, p, new FrailPower(m, amount, false),amount, true, AbstractGameAction.AttackEffect.NONE));
break;

case "Vulnerable" :
amount = p.getPower("Vulnerable").amount;
AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(p, p, "Vulnerable"));
AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(m, p, new VulnerablePower(m, amount, false), amount));
break;
case "Vulnerable" :
amount = p.getPower("Vulnerable").amount;
AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(p, p, "Vulnerable"));
AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(m, p, new VulnerablePower(m, amount, false), amount));
break;

case "Strength" :
amount = -1*(p.getPower("Strength").amount);
AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(p, p, new StrengthPower(p, amount), amount));
AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(m, p, new StrengthPower(m, -amount), -amount));
break;
case "Strength" :
amount = -1*(p.getPower("Strength").amount);
AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(p, p, new StrengthPower(p, amount), amount));
AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(m, p, new StrengthPower(m, -amount), -amount));
break;

case "Dexterity" :
amount = -1*(p.getPower("Dexterity").amount);
AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(p, p, new DexterityPower(p, amount), amount));
AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(m, p, new DexterityPower(m, -amount), -amount));
break;
case "Dexterity" :
amount = -1*(p.getPower("Dexterity").amount);
AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(p, p, new DexterityPower(p, amount), amount));
AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(m, p, new DexterityPower(m, -amount), -amount));
break;
}
}

Random.clear();

}
AbstractDungeon.actionManager.addToBottom(new DamageAction((AbstractCreature)m, new DamageInfo(p, this.damage, this.damageTypeForTurn), AbstractGameAction.AttackEffect.SLASH_HORIZONTAL));
Expand Down
11 changes: 5 additions & 6 deletions src/main/java/necromod/cards/Uncharnel.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,20 @@ public class Uncharnel extends AbstractNecromancerCards {
public static final String NAME = cardStrings.NAME;
public static final String DESCRIPTION = cardStrings.DESCRIPTION;
private static final int COST = 1;
private static final int BLOCK_AMT = 6;
private static final int UPGRADE_PLUS_BLOCK = 3;
private static final int POOL = 1;

public Uncharnel() {
super(ID, NAME, NecroMod.makePath(NecroMod.UNCHARNEL), COST, DESCRIPTION, AbstractCard.CardType.SKILL,
AbstractCardEnum.WHITE, AbstractCard.CardRarity.UNCOMMON, AbstractCard.CardTarget.SELF, POOL);

this.baseBlock = BLOCK_AMT;

this.exhaust = true;
this.baseMagicNumber = this.magicNumber = 1;
}

public void use(AbstractPlayer p, AbstractMonster m) {

AbstractDungeon.actionManager.addToBottom(new UncharnelAction(false));
AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(p, p, new ZombiePower(p, 1), 1));
AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(p, p, new ZombiePower(p, this.magicNumber), this.magicNumber));
}

public AbstractCard makeCopy() {
Expand All @@ -44,7 +43,7 @@ public AbstractCard makeCopy() {
public void upgrade() {
if (!this.upgraded) {
upgradeName();
upgradeBlock(UPGRADE_PLUS_BLOCK);
upgradeMagicNumber(1);
}
}

Expand Down

0 comments on commit 5e6c608

Please sign in to comment.