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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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