| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
- namespace App\Module\Farm\Casts;
- use UCore\Model\CastsAttributes;
- /**
- * 神像数值属性类型转换器
- *
- * 用于将数据库中存储的JSON格式的神像数值属性转换为PHP对象,以及将PHP对象转换回JSON格式。
- * 数值属性包含用于游戏逻辑计算的属性,如效果加成、持续时间加成等。
- */
- class FarmShrineNumericAttributesCast extends CastsAttributes
- {
- /**
- * 效果强度加成(百分比)
- *
- * @var float $effect_bonus
- */
- public float $effect_bonus = 0.0;
- /**
- * 持续时间加成(小时)
- *
- * @var int $duration_bonus
- */
- public int $duration_bonus = 0;
- /**
- * 冷却时间减少(百分比)
- *
- * @var float $cooldown_reduction
- */
- public float $cooldown_reduction = 0.0;
- /**
- * 激活消耗减少(百分比)
- *
- * @var float $cost_reduction
- */
- public float $cost_reduction = 0.0;
- /**
- * 额外效果ID
- *
- * @var int $extra_effect_id
- */
- public int $extra_effect_id = 0;
- }
|