v0.2.3: artifacts can now be cursed (couple rough edges to smooth out)

This commit is contained in:
Evan Debenham
2014-11-19 01:36:36 -05:00
parent 268435d390
commit 0ba2ca4302
12 changed files with 143 additions and 66 deletions
@@ -43,22 +43,29 @@ public class HighGrass {
if (!Dungeon.isChallenged( Challenges.NO_HERBALISM )) {
int naturalismLevel = 0;
if (ch != null) {
SandalsOfNature.Naturalism naturalism = ch.buff( SandalsOfNature.Naturalism.class );
if (naturalism != null) {
naturalismLevel = naturalism.level()+1;
naturalism.charge();
if (!naturalism.isCursed()) {
naturalismLevel = naturalism.level() + 1;
naturalism.charge();
} else {
naturalismLevel = -1;
}
}
}
// Seed
if (Random.Int(18-((int)(naturalismLevel*3.34))) == 0) {
level.drop( Generator.random( Generator.Category.SEED ), pos ).sprite.drop();
}
if (naturalismLevel >= 0) {
// Seed
if (Random.Int(18 - ((int) (naturalismLevel * 3.34))) == 0) {
level.drop(Generator.random(Generator.Category.SEED), pos).sprite.drop();
}
// Dew
if (Random.Int( 6-naturalismLevel ) == 0) {
level.drop( new Dewdrop(), pos ).sprite.drop();
// Dew
if (Random.Int(6 - naturalismLevel) == 0) {
level.drop(new Dewdrop(), pos).sprite.drop();
}
}
}