v0.4.0: refactor to ring logic
This commit is contained in:
committed by
Evan Debenham
parent
912fd447d0
commit
16a3e5932b
@@ -211,10 +211,7 @@ public abstract class Level implements Bundlable {
|
||||
Dungeon.limitedDrops.arcaneStyli.count++;
|
||||
}
|
||||
|
||||
int bonus = 0;
|
||||
for (Buff buff : Dungeon.hero.buffs(RingOfWealth.Wealth.class)) {
|
||||
bonus += ((RingOfWealth.Wealth) buff).level;
|
||||
}
|
||||
int bonus = RingOfWealth.getBonus(Dungeon.hero, RingOfWealth.Wealth.class);
|
||||
if (Random.Float() > Math.pow(0.95, bonus)){
|
||||
if (Random.Int(2) == 0)
|
||||
addItemToSpawn( new ScrollOfMagicalInfusion() );
|
||||
|
||||
@@ -663,10 +663,8 @@ public abstract class RegularLevel extends Level {
|
||||
protected void createItems() {
|
||||
|
||||
int nItems = 3;
|
||||
int bonus = 0;
|
||||
for (Buff buff : Dungeon.hero.buffs(RingOfWealth.Wealth.class)) {
|
||||
bonus += ((RingOfWealth.Wealth) buff).level;
|
||||
}
|
||||
int bonus = RingOfWealth.getBonus(Dungeon.hero, RingOfWealth.Wealth.class);
|
||||
|
||||
//just incase someone gets a ridiculous ring, cap this at 80%
|
||||
bonus = Math.min(bonus, 10);
|
||||
while (Random.Float() < (0.3f + bonus*0.05f)) {
|
||||
|
||||
Reference in New Issue
Block a user