update
This commit is contained in:
@@ -277,15 +277,24 @@ class BattleProvider with ChangeNotifier {
|
||||
|
||||
switch (risk) {
|
||||
case RiskLevel.safe:
|
||||
success = random.nextDouble() < 1.0; // 100%
|
||||
// Safe: 100% base chance + luck
|
||||
double chance = 1.0 + (player.totalLuck / 100.0);
|
||||
if (chance > 1.0) chance = 1.0;
|
||||
success = random.nextDouble() < chance;
|
||||
efficiency = 0.5; // 50%
|
||||
break;
|
||||
case RiskLevel.normal:
|
||||
success = random.nextDouble() < 0.8; // 80%
|
||||
// Normal: 80% base chance + luck
|
||||
double chance = 0.8 + (player.totalLuck / 100.0);
|
||||
if (chance > 1.0) chance = 1.0;
|
||||
success = random.nextDouble() < chance;
|
||||
efficiency = 1.0; // 100%
|
||||
break;
|
||||
case RiskLevel.risky:
|
||||
success = random.nextDouble() < 0.4; // 40%
|
||||
// Risky: 40% base chance + luck
|
||||
double chance = 0.4 + (player.totalLuck / 100.0);
|
||||
if (chance > 1.0) chance = 1.0;
|
||||
success = random.nextDouble() < chance;
|
||||
efficiency = 2.0; // 200%
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user