SpellDetailPage

* attempted cleanup in effect generation and template
 * display summon properties
 * display unit of effect value
 * fix spell effect layout, typos, missing tools, ...
This commit is contained in:
Sarjuuk
2024-08-15 03:49:04 +02:00
parent dab110475c
commit d2e109d818
17 changed files with 767 additions and 671 deletions

View File

@@ -399,12 +399,17 @@ class Lang
return implode(', ', $tmp);
}
public static function getMagicSchools(int $schoolMask) : string
public static function getMagicSchools(int $schoolMask, bool $short = false) : string
{
$schoolMask &= SPELL_ALL_SCHOOLS; // clamp to available schools..
$tmp = [];
$i = 0;
if ($short && $schoolMask == SPELL_ALL_SCHOOLS)
return self::main('all');
if ($short && $schoolMask == SPELL_MAGIC_SCHOOLS)
return self::main('all').' ('.self::game('dt', 1).')';
while ($schoolMask)
{
if ($schoolMask & (1 << $i))