v0.9.0: reworked the faith is my armor challenge
This commit is contained in:
parent
cfca4165a4
commit
c46576a175
|
@ -72,7 +72,7 @@ badges$badge.unlock_huntress=Unlocked the Huntress
|
|||
challenges.no_food=On diet
|
||||
challenges.no_food_desc=Food's already scarce, but you have to watch your portions as well!\n\n- Food and the horn of plenty are one third as effective at satisfying hunger\n- Other sources of satiety are unaffected
|
||||
challenges.no_armor=Faith is my armor
|
||||
challenges.no_armor_desc=Take on the dungeon with nothing but some cloth to protect you!\n\n- All armor except starting cloth is removed
|
||||
challenges.no_armor_desc=You'll need faith in yourself, as your armor won't do much!\n\n- Base blocking power reduced for all armor except cloth\n- All armor now gains very little blocking when upgraded\n- Earthen guardian's defensive power is also significantly reduced.
|
||||
challenges.no_healing=Pharmacophobia
|
||||
challenges.no_healing_desc=Healing potions sure are handy, unfortunately you're allergic!\n\n- Potions of healing, and items made using potions of healing, poison the hero instead of healing them\n- Alchemical catalysts cannot randomly poison or heal the hero\n- These items still work normally for other characters
|
||||
challenges.no_herbalism=Barren land
|
||||
|
|
|
@ -23,9 +23,6 @@ package com.shatteredpixel.shatteredpixeldungeon;
|
|||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Dewdrop;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClassArmor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClothArmor;
|
||||
|
||||
public class Challenges {
|
||||
|
||||
|
@ -56,16 +53,8 @@ public class Challenges {
|
|||
|
||||
public static boolean isItemBlocked( Item item ){
|
||||
|
||||
if (Dungeon.isChallenged(NO_ARMOR)){
|
||||
if (item instanceof Armor && !(item instanceof ClothArmor || item instanceof ClassArmor)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (Dungeon.isChallenged(NO_HERBALISM)){
|
||||
if (item instanceof Dewdrop) {
|
||||
return true;
|
||||
}
|
||||
if (Dungeon.isChallenged(NO_HERBALISM) && item instanceof Dewdrop){
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Challenges;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||
|
@ -169,7 +168,7 @@ public class Statue extends Mob {
|
|||
}
|
||||
|
||||
public static Statue random(){
|
||||
if (Random.Int(10) == 0 && !Dungeon.isChallenged(Challenges.NO_ARMOR)){
|
||||
if (Random.Int(10) == 0){
|
||||
return new ArmoredStatue();
|
||||
} else {
|
||||
return new Statue();
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
package com.shatteredpixel.shatteredpixeldungeon.items.armor;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Challenges;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
|
@ -265,6 +266,10 @@ public class Armor extends EquipableItem {
|
|||
}
|
||||
|
||||
public int DRMax(int lvl){
|
||||
if (Dungeon.isChallenged(Challenges.NO_ARMOR)){
|
||||
return 1 + tier + lvl + augment.defenseFactor(lvl);
|
||||
}
|
||||
|
||||
int max = tier * (2 + lvl) + augment.defenseFactor(lvl);
|
||||
if (lvl > max){
|
||||
return ((lvl - max)+1)/2;
|
||||
|
@ -278,6 +283,10 @@ public class Armor extends EquipableItem {
|
|||
}
|
||||
|
||||
public int DRMin(int lvl){
|
||||
if (Dungeon.isChallenged(Challenges.NO_ARMOR)){
|
||||
return 0;
|
||||
}
|
||||
|
||||
int max = DRMax(lvl);
|
||||
if (lvl >= max){
|
||||
return (lvl - max);
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
package com.shatteredpixel.shatteredpixeldungeon.windows;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Challenges;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Ghost;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
|
@ -82,20 +81,16 @@ public class WndSadGhost extends Window {
|
|||
btnWeapon.setRect( 0, message.top() + message.height() + GAP, WIDTH, BTN_HEIGHT );
|
||||
add( btnWeapon );
|
||||
|
||||
if (!Dungeon.isChallenged( Challenges.NO_ARMOR )) {
|
||||
RedButton btnArmor = new RedButton( Messages.get(this, "armor") ) {
|
||||
@Override
|
||||
protected void onClick() {
|
||||
selectReward(ghost, Ghost.Quest.armor);
|
||||
}
|
||||
};
|
||||
btnArmor.setRect(0, btnWeapon.bottom() + GAP, WIDTH, BTN_HEIGHT);
|
||||
add(btnArmor);
|
||||
RedButton btnArmor = new RedButton( Messages.get(this, "armor") ) {
|
||||
@Override
|
||||
protected void onClick() {
|
||||
selectReward(ghost, Ghost.Quest.armor);
|
||||
}
|
||||
};
|
||||
btnArmor.setRect(0, btnWeapon.bottom() + GAP, WIDTH, BTN_HEIGHT);
|
||||
add(btnArmor);
|
||||
|
||||
resize(WIDTH, (int) btnArmor.bottom());
|
||||
} else {
|
||||
resize(WIDTH, (int) btnWeapon.bottom());
|
||||
}
|
||||
resize(WIDTH, (int) btnArmor.bottom());
|
||||
}
|
||||
|
||||
private void selectReward( Ghost ghost, Item reward ) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user