Godot 版本 PVZ
在 resources/level_date_resource/ 目录下有多个预设关卡可以继承修改:
mode_puzzle/puzzle_zombie_*. tres我是僵尸模式关卡mode_puzzle/puzzle_pot_*.tres砸罐子模式关卡
📋 变量详细说明
🎮 选关数据
| 变量 | 类型 | 说明 |
|---|---|---|
game_mode | Global.MainScenes | 游戏模式(冒险/迷你游戏/解密/生存) |
level_page | int | 关卡所在页面 |
level_id | String | 关卡标识符 |
save_game_name | String | 存档文件名(无后缀) |
🌅 关卡背景参数
| 变量 | 类型 | 枚举值/说明 |
|---|---|---|
game_sences | Global.MainScenes | 游戏场景 |
game_round | int | 游戏轮次(-1 表示无尽) |
game_BG | GameBg | 0: FrontDay 1: FrontNight 2: Pool 3: Fog 4: Roof |
game_BGM | GameBGM | 0-4: 各场景 BGM 5: MiniGame 6: Boss 7: Puzzle |
is_fog | bool | 是否有雾 |
is_rain | bool | 是否有雨 |
is_day | bool | 是否白天(控制蘑菇睡觉) |
is_day_sun | bool | 是否天降阳光 |
is_lawn_mover | bool | 是否有小推车 |
is_zombie_can_home | bool | 僵尸是否能进房 |
all_pre_plant_data | Array[PrePlantResource] | 预种植植物数据 |
🎯 关卡流程参数
| 变量 | 类型 | 说明 |
|---|---|---|
look_show_zombie | bool | 开局查看展示僵尸 |
can_choosed_card | bool | 是否可选择卡片 |
crazy_dave_dialog | CrazyDaveDialogResource | 戴夫对话资源 |
🧟 出怪参数
| 变量 | 类型 | 枚举值/说明 |
|---|---|---|
monster_mode | E_MonsterMode | 0: Null(不出怪) 1: Norm(正常) 2: HammerZombie(锤僵尸) |
is_mini_zombie | bool | 是否小僵尸模式 |
zombie_multy | int | 出怪倍率 |
max_wave | int | 出怪波次(每10波1旗帜) |
zombie_refresh_types | Array[Global.ZombieType] | 僵尸刷新列表 |
is_bungi | bool | 是否有蹦极僵尸 |
range_num_bungi | Vector2i | 大波蹦极僵尸数量范围 |
zombie_multy_hammer | int | 墓碑出怪倍率 |
max_wave_hammer_zombie | int | 锤僵尸出怪波数 |
speed_zombie_init | float | 初始僵尸速度 |
speed_zombie_add | float | 每波速度提升 |
speed_zombie_max | float | 速度最大值 |
is_have_tombston | bool | 墓碑是否生成僵尸 |
init_tombstone_num | int | 初始墓碑数量 |
🃏 卡片参数
| 变量 | 类型 | 枚举值/说明 |
|---|---|---|
card_mode | E_CardMode | 0: Null 1: Norm(正常) 2: ConveyorBelt(传送带) 3: Coin(金币卡槽) |
is_seed_rain | bool | 是否有种子雨 |
max_choosed_card_num | int | 最大卡槽数(1-10) |
start_sun | int | 开始阳光数 |
pre_choosed_card_list_plant | Array[Global.PlantType] | 预选植物卡片 |
pre_choosed_card_list_zombie | Array[Global.ZombieType] | 预选僵尸卡片 |
all_card_plant_type_probability | Dictionary[PlantType, int] | 传送带植物卡概率 |
all_card_zombie_type_probability | Dictionary[ZombieType, int] | 传送带僵尸卡概率 |
card_order_plant | Dictionary[int, PlantType] | 按序出现植物卡 |
card_order_zombie | Dictionary[int, ZombieType] | 按序出现僵尸卡 |
create_new_card_speed | float | 创建卡片倍率 |
is_mode_column | bool | 柱子模式 |
is_shovel | bool | 是否有铲子 |
🏺 罐子参数
| 变量 | 类型 | 枚举值/说明 |
|---|---|---|
is_pot_mode | bool | 是否砸罐子模式 |
pot_mode | E_PotMode | 0: Null 1: Weight(权重随机) 2: Fixed(固定生成) |
pot_col_range | Vector2i | 罐子列数范围(左闭右开) |
is_can_look_random_res_pot | bool | 是否可查看随机罐子结果 |
is_save_plant_on_pot_mode | bool | 多轮是否保留植物 |
weight_res_fiexd | float | 固定/随机罐子占比(0-1) |
candidate_plant_pot | Dictionary[PlantType, int] | 罐子植物候选列表 |
candidate_zombie_pot | Dictionary[ZombieType, int] | 罐子僵尸候选列表 |
weight_pot_type | Vector3i | 三类罐子占比(随机,植物,僵尸) |
random_pot_plant | Dictionary[PlantType, int] | 随机罐子生成植物 |
random_pot_zombie | Dictionary[ZombieType, int] | 随机罐子生成僵尸 |
plant_pot | Dictionary[PlantType, int] | 植物罐子 |
zombie_pot | Dictionary[ZombieType, int] | 僵尸罐子 |
random_pot_num_on_fixed_mode | Vector3i | 固定模式随机罐数(随机,植物,僵尸) |
🧟♂️ 我是僵尸模式
| 变量 | 类型 | 说明 |
|---|---|---|
is_zombie_mode | bool | 是否我是僵尸模式 |
plant_col_on_zombie_mode | int | 植物列数 |
all_plants_weight_on_zombie_mode | Dictionary[PlantType, int] | 植物生成权重 |
all_must_plants_on_zombie_mode | Dictionary[PlantType, int] | 必须生成植物 |
🎲 游戏物品参数
| 变量 | 类型 | 说明 |
|---|---|---|
is_bowling_stripe | bool | 保龄球红线 |
plant_cell_col_j | int | 红线在第几列之后 |
plant_cell_can_use | Dictionary[String, bool] | 格子使用配置: left_can_plant: 左侧可种植 right_can_plant: 右侧可种植 left_can_zombie: 左侧可僵尸 right_can_zombie: 右侧可僵尸 |
is_hammer | bool | 是否有锤子 |