v3.0.0: simplified and buffed 13 leaf clover

This commit is contained in:
Evan Debenham
2025-01-08 13:32:44 -05:00
parent 4d288e108e
commit 60de12343c
3 changed files with 20 additions and 14 deletions

View File

@@ -1405,8 +1405,8 @@ items.trinkets.shardofoblivion$wandusetracker.desc=You have recently used an uni
items.trinkets.thirteenleafclover.name=thirteen leaf clover
items.trinkets.thirteenleafclover.desc=Somehow stewing in the alchemy pot has caused this clover to grow a bunch of extra leaves! It's not really clear if this trinket is lucky or unlucky, perhaps this trinket will make your luck more chaotic?
items.trinkets.thirteenleafclover.typical_stats_desc=Normally when the hero deals damage, numbers closer to the average are more common. Typically this trinket has a _%d%%_ chance to invert this, making your attacks much more likely to deal the maximum or minimum damage instead.\n\nThis trinket costs relatively little energy to upgrade.
items.trinkets.thirteenleafclover.stats_desc=Normally when the hero deals damage, numbers closer to the average are more common. At its current level this trinket has a _%d%%_ chance to invert this, making your attacks much more likely to deal the maximum or minimum damage instead.\n\nThis trinket costs relatively little energy to upgrade.
items.trinkets.thirteenleafclover.typical_stats_desc=Typically this trinket will cause you to deal maximum damage _%1$d%%_ of the time, and minimum damage _%2$d%%_ of the time.
items.trinkets.thirteenleafclover.stats_desc=At its current level this trinket will cause you to deal maximum damage _%1$d%%_ of the time, and minimum damage _%2$d%%_ of the time.
items.trinkets.trapmechanism.name=trap mechanism
items.trinkets.trapmechanism.desc=The core mechanism of one of the dungeon's pitfall traps, carefully carved out of the floor so it can be carried. It seems to be magically tied to the dungeon itself, making terrain more hazardous for you and the dungeon's inhabitants.

View File

@@ -674,10 +674,10 @@ public class Hero extends Char {
return dmg;
}
//damage rolls that come from the hero can have their RNG influenced
//damage rolls that come from the hero can have their RNG influenced by clover
public static int heroDamageIntRange(int min, int max ){
if (Random.Float() < ThirteenLeafClover.combatDistributionInverseChance()){
return ThirteenLeafClover.invCombatRoll(min, max);
if (Random.Float() < ThirteenLeafClover.alterHeroDamageChance()){
return ThirteenLeafClover.alterDamageRoll(min, max);
} else {
return Random.NormalIntRange(min, max);
}

View File

@@ -33,24 +33,24 @@ public class ThirteenLeafClover extends Trinket {
@Override
protected int upgradeEnergyCost() {
//6 -> 5(11) -> 7(18) -> 8(26)
return Math.round(5+1.67f*level());
//6 -> 8(14) -> 10(24) -> 12(36)
return 6+2*level();
}
@Override
public String statsDesc() {
if (isIdentified()){
return Messages.get(this, "stats_desc", (int)(100*combatDistributionInverseChance(buffedLvl())));
return Messages.get(this, "stats_desc", Math.round(MAX_CHANCE * 100*alterHeroDamageChance(buffedLvl())), Math.round((1f-MAX_CHANCE) * 100*alterHeroDamageChance(buffedLvl())));
} else {
return Messages.get(this, "typical_stats_desc", (int)(100*combatDistributionInverseChance(0)));
return Messages.get(this, "typical_stats_desc", Math.round(MAX_CHANCE * 100*alterHeroDamageChance(0)), Math.round((1f-MAX_CHANCE) * 100*alterHeroDamageChance(0)));
}
}
public static float combatDistributionInverseChance(){
return combatDistributionInverseChance(trinketLevel(ThirteenLeafClover.class));
public static float alterHeroDamageChance(){
return alterHeroDamageChance(trinketLevel(ThirteenLeafClover.class));
}
public static float combatDistributionInverseChance( int level ){
public static float alterHeroDamageChance(int level ){
if (level <= -1){
return 0;
} else {
@@ -58,8 +58,14 @@ public class ThirteenLeafClover extends Trinket {
}
}
public static int invCombatRoll( int min, int max){
return Random.InvNormalIntRange( min, max );
private static float MAX_CHANCE = 0.6f;
public static int alterDamageRoll(int min, int max){
if (Random.Float() < MAX_CHANCE){
return max;
} else {
return min;
}
}
}