V0.2.0: Initial implementation for Sandals of Nature

This commit is contained in:
Evan Debenham
2014-09-08 15:41:09 -04:00
parent 33a6533d08
commit e8b3365f08
3 changed files with 141 additions and 12 deletions
@@ -19,6 +19,7 @@ package com.shatteredpixel.shatteredpixeldungeon.plants;
import java.util.ArrayList;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.SandalsOfNature;
import com.watabou.noosa.audio.Sample;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
@@ -67,10 +68,17 @@ public class Plant implements Bundlable {
}
if (Dungeon.hero.subClass == HeroSubClass.WARDEN) {
if (Random.Int( 5 ) == 0) {
int naturalismLevel = 0;
SandalsOfNature.Naturalism naturalism = Dungeon.hero.buff( SandalsOfNature.Naturalism.class );
if (naturalism != null) {
naturalismLevel = naturalism.level()+1;
}
if (Random.Int( 5 - (naturalismLevel/2) ) == 0) {
Dungeon.level.drop( Generator.random( Generator.Category.SEED ), pos ).sprite.drop();
}
if (Random.Int( 5 ) == 0) {
if (Random.Int( 5 - naturalismLevel ) == 0) {
Dungeon.level.drop( new Dewdrop(), pos ).sprite.drop();
}
}