| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- <?php
- namespace App\Module\GameItems\Casts;
- use Illuminate\Database\Eloquent\Model;
- use UCore\Model\CastsAttributes;
- /**
- * 物品数值属性类型转换器
- *
- * 用于将数据库中存储的JSON格式的物品数值属性转换为PHP对象,以及将PHP对象转换回JSON格式。
- * 物品数值属性包含用于游戏逻辑计算的属性,如宝箱掉落数量、宠物属性加成、奖励物品组等。
- * 这些属性直接影响游戏玩法和平衡性,是物品系统的核心数据。
- */
- class NumericAttributesCast extends CastsAttributes
- {
- /**
- * 宝箱最小数量
- *
- * @var int $min_drop_count
- */
- public int $min_drop_count = 0;
- /**
- * 宝箱最大数量
- *
- * @var int $max_drop_count
- */
- public int $max_drop_count = 0;
- /**
- * 减少作物生长时间
- *
- * @var int $intd
- */
- public int $crop_growth_time = 0;
- /**
- * 增加宠物体力
- *
- * @var int $pet_power
- */
- public int $pet_power = 0;
- /**
- * 使用后随即奖励物品组
- *
- * @var int $reward_group_id
- */
- public int $reward_group_id = 0;
- /**
- * 增加宠物经验
- *
- * @var int $pet_exp
- */
- public int $pet_exp = 0;
- /**
- * 除虫概率
- *
- * @var int $pesticide_rate
- */
- public int $fram_pesticide_rate = 0;
- /**
- * 解决干旱概率
- *
- * @var int $drought_rate
- */
- public int $fram_drought_rate = 0;
- /**
- * 解决草宰概率
- * @var int $grass_rate
- */
- public int $fram_grass_rate = 0;
- }
|