Spells/Misc

* limit chance/ppm precision on spell procs chances
 * do not apply a spells EffectXBonusMultiplier for physical spells
This commit is contained in:
Sarjuuk
2025-10-29 15:45:46 +01:00
parent 441ad38543
commit 3984bd0ae2
8 changed files with 16 additions and 16 deletions

View File

@@ -1437,7 +1437,7 @@ class SpellBaseResponse extends TemplateResponse implements ICache
$scaling[1] = $this->subject->getField('effect'.$i.'BonusMultiplier');
continue;
}
else
else if ($this->subject->getField('damageClass') == SPELL_DAMAGE_CLASS_MAGIC)
$scaling[0] = $this->subject->getField('effect'.$i.'BonusMultiplier');
$allDoTs = false;
@@ -1716,7 +1716,7 @@ class SpellBaseResponse extends TemplateResponse implements ICache
if (in_array($i, $this->subject->canTriggerSpell()) && $procData['chance'] && $procData['chance'] < 100)
{
$_footer['proc'] = $procData['chance'] < 0 ? Lang::spell('ppm', [Lang::nf(-$procData['chance'], 1)]) : Lang::spell('procChance') . $procData['chance'] . '%';
$_footer['proc'] = $procData['chance'] < 0 ? Lang::spell('ppm', [-$procData['chance']]) : Lang::spell('procChance', [$procData['chance']]);
if ($procData['cooldown'])
$_footer['procCD'] = Lang::game('cooldown', [Util::formatTime($procData['cooldown'], true)]);
}

View File

@@ -1661,8 +1661,8 @@ $lang = array(
'currentArea' => '&lt;Momentanes Gebiet&gt;',
'discovered' => "Durch Geistesblitz erlernt",
'ppm' => "(%s Auslösungen pro Minute)",
'procChance' => "Procchance: ",
'ppm' => "(%.1f Auslösungen pro Minute)",
'procChance' => "Procchance: %.4g%%",
'starter' => "Basiszauber",
'trainingCost' => "Trainingskosten: ",
'channeled' => "Kanalisiert",

View File

@@ -1661,8 +1661,8 @@ $lang = array(
'currentArea' => '&lt;current area&gt;',
'discovered' => "Learned via discovery",
'ppm' => "(%s procs per minute)",
'procChance' => "Proc chance: ",
'ppm' => "(%.1f procs per minute)",
'procChance' => "Proc chance: %.4g%%",
'starter' => "Starter spell",
'trainingCost' => "Training cost: ",
'channeled' => "Channeled", // SPELL_CAST_CHANNELED

View File

@@ -1661,8 +1661,8 @@ $lang = array(
'currentArea' => '&lt;current area&gt;',
'discovered' => "Aprendido via descubrimiento",
'ppm' => "(%s procs por minuto)",
'procChance' => "Probabilidad de que accione: ",
'ppm' => "(%.1f procs por minuto)",
'procChance' => "Probabilidad de que accione: %.4g%%",
'starter' => "Hechizo inicial",
'trainingCost' => "Costo de enseñanza: ",
'channeled' => "Canalizado",

View File

@@ -1661,8 +1661,8 @@ $lang = array(
'currentArea' => '&lt;current area&gt;',
'discovered' => "Appris via une découverte",
'ppm' => "(%s déclenchements par minute)",
'procChance' => "Chance : ",
'ppm' => "(%.1f déclenchements par minute)",
'procChance' => "Chance : %.4g%%",
'starter' => "Sortilège initiaux",
'trainingCost' => "Coût d'entraînement : ",
'channeled' => "Canalisée",

View File

@@ -1661,8 +1661,8 @@ $lang = array(
'currentArea' => '&lt;current area&gt;',
'discovered' => "Изучается путём освоения местности",
'ppm' => "(Срабатывает %s раз в минуту)",
'procChance' => "Шанс срабатывания: ",
'ppm' => "(Срабатывает %.1f раз в минуту)",
'procChance' => "Шанс срабатывания: %.4g%%",
'starter' => "Начальное заклинание",
'trainingCost' => "Цена обучения: ",
'channeled' => "Направляемое",

View File

@@ -1661,8 +1661,8 @@ $lang = array(
'currentArea' => '&lt;当前区域&gt;',
'discovered' => "通过发现学习",
'ppm' => "%s每分钟触发几率",
'procChance' => "触发几率:",
'ppm' => "%.1f每分钟触发几率",
'procChance' => "触发几率:%.4g%%",
'starter' => "初始法术",
'trainingCost' => "训练成本:",
'channeled' => "需引导",

View File

@@ -62,9 +62,9 @@ foreach ($this->effects as $i => $e):
echo '<br />';
if ($e['proc'] < 0):
echo Lang::spell('ppm', [Lang::nf(-$e['proc'], 1)]);
echo Lang::spell('ppm', [-$e['proc']]);
elseif ($e['proc'] < 100.0):
echo Lang::spell('procChance').Lang::main('colon').$e['proc'].'%';
echo Lang::spell('procChance', [$e['proc']]);
endif;
endif;