V0.2.0: Initial implementation for Sandals of Nature
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user