v2.5.4: fixed parchment scrap altering generation from 2 rooms
This commit is contained in:
+4
-1
@@ -80,12 +80,15 @@ public class CryptRoom extends SpecialRoom {
|
|||||||
return new Gold().random();
|
return new Gold().random();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//always generate the curse to prevent parchment scrap from altering levelgen
|
||||||
|
Armor.Glyph curse = Armor.Glyph.randomCurse();
|
||||||
|
|
||||||
//if it isn't already cursed, give it a free upgrade
|
//if it isn't already cursed, give it a free upgrade
|
||||||
if (!prize.cursed){
|
if (!prize.cursed){
|
||||||
prize.upgrade();
|
prize.upgrade();
|
||||||
//curse the armor, unless it has a glyph
|
//curse the armor, unless it has a glyph
|
||||||
if (!prize.hasGoodGlyph()){
|
if (!prize.hasGoodGlyph()){
|
||||||
prize.inscribe(Armor.Glyph.randomCurse());
|
prize.inscribe(curse);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
prize.cursed = prize.cursedKnown = true;
|
prize.cursed = prize.cursedKnown = true;
|
||||||
|
|||||||
+4
-1
@@ -90,12 +90,15 @@ public class SacrificeRoom extends SpecialRoom {
|
|||||||
return new Gold().random();
|
return new Gold().random();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//always generate the curse to prevent parchment scrap from altering levelgen
|
||||||
|
Weapon.Enchantment curse = Weapon.Enchantment.randomCurse();
|
||||||
|
|
||||||
//if it isn't already cursed, give it a free upgrade
|
//if it isn't already cursed, give it a free upgrade
|
||||||
if (!prize.cursed){
|
if (!prize.cursed){
|
||||||
prize.upgrade();
|
prize.upgrade();
|
||||||
//curse the weapon, unless it has a glyph
|
//curse the weapon, unless it has a glyph
|
||||||
if (!prize.hasGoodEnchant()){
|
if (!prize.hasGoodEnchant()){
|
||||||
prize.enchant(Weapon.Enchantment.randomCurse());
|
prize.enchant(curse);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
prize.cursed = prize.cursedKnown = true;
|
prize.cursed = prize.cursedKnown = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user