From 32b8542ac905a77a0ca5bc1ac9ee2f5af23b0a44 Mon Sep 17 00:00:00 2001 From: DSR Extractor Date: Wed, 23 Sep 2026 20:57:16 -0500 Subject: [PATCH] Add decompiled Lua AI scripts + full datasheet findings report --- datasheet_findings.md | 2645 +++++++++++++++++ scripts_decompiled/001540_logic.lua | 19 + scripts_decompiled/006000_battle.lua | 406 +++ scripts_decompiled/006010_battle.lua | 386 +++ scripts_decompiled/006020_battle.lua | 367 +++ scripts_decompiled/006030_battle.lua | 408 +++ scripts_decompiled/006040_battle.lua | 336 +++ scripts_decompiled/006050_battle.lua | 140 + scripts_decompiled/006051_battle.lua | 168 ++ scripts_decompiled/006052_battle.lua | 130 + scripts_decompiled/006070_battle.lua | 295 ++ scripts_decompiled/006080_battle.lua | 302 ++ scripts_decompiled/006090_battle.lua | 289 ++ scripts_decompiled/006100_battle.lua | 330 ++ scripts_decompiled/006130_battle.lua | 342 +++ scripts_decompiled/006170_battle.lua | 205 ++ scripts_decompiled/006180_battle.lua | 290 ++ scripts_decompiled/006220_battle.lua | 21 + scripts_decompiled/006250_battle.lua | 366 +++ scripts_decompiled/006260_battle.lua | 553 ++++ scripts_decompiled/006270_battle.lua | 377 +++ scripts_decompiled/006271_battle.lua | 327 ++ scripts_decompiled/006280_battle.lua | 374 +++ scripts_decompiled/006290_battle.lua | 373 +++ scripts_decompiled/006300_battle.lua | 312 ++ scripts_decompiled/006310_battle.lua | 367 +++ scripts_decompiled/006320_battle.lua | 316 ++ scripts_decompiled/006370_battle.lua | 407 +++ scripts_decompiled/006390_battle.lua | 126 + scripts_decompiled/006420_battle.lua | 371 +++ scripts_decompiled/006490_battle.lua | 290 ++ scripts_decompiled/006500_battle.lua | 305 ++ scripts_decompiled/006510_battle.lua | 416 +++ scripts_decompiled/006510_logic.lua | 11 + scripts_decompiled/006511_battle.lua | 370 +++ scripts_decompiled/006520_battle.lua | 394 +++ scripts_decompiled/006520_logic.lua | 11 + scripts_decompiled/006530_battle.lua | 430 +++ scripts_decompiled/006530_logic.lua | 11 + scripts_decompiled/006531_battle.lua | 365 +++ scripts_decompiled/006540_battle.lua | 426 +++ scripts_decompiled/006540_logic.lua | 11 + scripts_decompiled/006550_battle.lua | 401 +++ scripts_decompiled/006550_logic.lua | 11 + scripts_decompiled/006551_battle.lua | 345 +++ scripts_decompiled/006560_battle.lua | 419 +++ scripts_decompiled/006570_battle.lua | 403 +++ scripts_decompiled/006580_battle.lua | 329 ++ scripts_decompiled/006590_battle.lua | 377 +++ scripts_decompiled/006590_logic.lua | 11 + scripts_decompiled/006600_battle.lua | 400 +++ scripts_decompiled/006610_battle.lua | 377 +++ scripts_decompiled/006620_battle.lua | 199 ++ scripts_decompiled/006640_battle.lua | 328 ++ scripts_decompiled/006650_battle.lua | 345 +++ scripts_decompiled/006740_battle.lua | 923 ++++++ scripts_decompiled/006801_battle.lua | 368 +++ scripts_decompiled/006802_battle.lua | 357 +++ scripts_decompiled/006803_battle.lua | 394 +++ scripts_decompiled/006804_battle.lua | 321 ++ scripts_decompiled/006805_battle.lua | 301 ++ scripts_decompiled/006806_battle.lua | 299 ++ scripts_decompiled/006910_battle.lua | 149 + scripts_decompiled/010000_logic.lua | 11 + scripts_decompiled/010001_logic.lua | 16 + scripts_decompiled/010002_logic.lua | 16 + scripts_decompiled/010100_battle.lua | 149 + scripts_decompiled/010100_logic.lua | 18 + scripts_decompiled/011000_battle.lua | 20 + scripts_decompiled/011000_logic.lua | 11 + scripts_decompiled/120000_battle.lua | 137 + scripts_decompiled/120100_battle.lua | 143 + scripts_decompiled/120101_battle.lua | 139 + scripts_decompiled/120200_battle.lua | 152 + scripts_decompiled/120300_battle.lua | 139 + scripts_decompiled/206000_battle.lua | 213 ++ scripts_decompiled/206001_battle.lua | 213 ++ scripts_decompiled/206002_battle.lua | 217 ++ scripts_decompiled/223000_battle.lua | 248 ++ scripts_decompiled/223100_battle.lua | 244 ++ scripts_decompiled/223200_battle.lua | 397 +++ scripts_decompiled/224000_battle.lua | 249 ++ scripts_decompiled/225000_battle.lua | 306 ++ scripts_decompiled/225001_battle.lua | 275 ++ scripts_decompiled/225002_battle.lua | 213 ++ scripts_decompiled/226000_battle.lua | 237 ++ scripts_decompiled/227000_battle.lua | 102 + scripts_decompiled/228000_battle.lua | 155 + scripts_decompiled/228001_battle.lua | 186 ++ scripts_decompiled/230000_battle.lua | 278 ++ scripts_decompiled/231000_battle.lua | 280 ++ scripts_decompiled/231000_logic.lua | 117 + scripts_decompiled/232000_battle.lua | 342 +++ scripts_decompiled/233000_battle.lua | 176 ++ scripts_decompiled/236000_battle.lua | 323 ++ scripts_decompiled/236001_battle.lua | 317 ++ scripts_decompiled/237000_battle.lua | 361 +++ scripts_decompiled/237001_battle.lua | 280 ++ scripts_decompiled/238000_battle.lua | 196 ++ scripts_decompiled/239000_battle.lua | 257 ++ scripts_decompiled/240000_battle.lua | 487 +++ scripts_decompiled/240001_battle.lua | 413 +++ scripts_decompiled/241000_battle.lua | 312 ++ scripts_decompiled/241001_battle.lua | 310 ++ scripts_decompiled/241002_battle.lua | 260 ++ scripts_decompiled/241003_battle.lua | 297 ++ scripts_decompiled/241004_battle.lua | 365 +++ scripts_decompiled/243000_battle.lua | 68 + scripts_decompiled/250000_battle.lua | 189 ++ scripts_decompiled/250001_battle.lua | 149 + scripts_decompiled/250004_battle.lua | 84 + scripts_decompiled/250005_battle.lua | 120 + scripts_decompiled/251000_battle.lua | 111 + scripts_decompiled/251000_logic.lua | 16 + scripts_decompiled/252000_battle.lua | 316 ++ scripts_decompiled/253000_battle.lua | 162 + scripts_decompiled/253001_battle.lua | 162 + scripts_decompiled/253002_battle.lua | 131 + scripts_decompiled/254000_battle.lua | 257 ++ scripts_decompiled/254001_battle.lua | 249 ++ scripts_decompiled/254002_battle.lua | 265 ++ scripts_decompiled/255000_battle.lua | 356 +++ scripts_decompiled/255001_battle.lua | 281 ++ scripts_decompiled/255002_battle.lua | 328 ++ scripts_decompiled/255003_battle.lua | 61 + scripts_decompiled/255006_battle.lua | 193 ++ scripts_decompiled/256000_battle.lua | 260 ++ scripts_decompiled/256001_battle.lua | 191 ++ scripts_decompiled/256002_battle.lua | 247 ++ scripts_decompiled/257000_battle.lua | 263 ++ scripts_decompiled/257001_battle.lua | 290 ++ scripts_decompiled/264000_battle.lua | 285 ++ scripts_decompiled/265000_battle.lua | 83 + scripts_decompiled/266000_battle.lua | 175 ++ scripts_decompiled/267000_battle.lua | 172 ++ scripts_decompiled/267000_logic.lua | 45 + scripts_decompiled/268000_battle.lua | 148 + scripts_decompiled/268000_logic.lua | 24 + scripts_decompiled/269000_battle.lua | 251 ++ scripts_decompiled/270000_battle.lua | 262 ++ scripts_decompiled/270001_battle.lua | 257 ++ scripts_decompiled/271000_battle.lua | 246 ++ scripts_decompiled/271100_battle.lua | 230 ++ scripts_decompiled/273000_battle.lua | 287 ++ scripts_decompiled/278000_battle.lua | 251 ++ scripts_decompiled/279000_battle.lua | 251 ++ scripts_decompiled/279001_battle.lua | 331 +++ scripts_decompiled/279002_battle.lua | 296 ++ scripts_decompiled/279003_battle.lua | 288 ++ scripts_decompiled/280000_battle.lua | 203 ++ scripts_decompiled/280001_battle.lua | 118 + scripts_decompiled/281000_battle.lua | 118 + scripts_decompiled/281100_battle.lua | 159 + scripts_decompiled/283001_battle.lua | 116 + scripts_decompiled/284000_battle.lua | 119 + scripts_decompiled/284001_battle.lua | 158 + scripts_decompiled/286000_battle.lua | 259 ++ scripts_decompiled/286001_battle.lua | 238 ++ scripts_decompiled/287000_battle.lua | 353 +++ scripts_decompiled/287001_battle.lua | 291 ++ scripts_decompiled/290000_battle.lua | 285 ++ scripts_decompiled/290001_battle.lua | 99 + scripts_decompiled/290002_battle.lua | 255 ++ scripts_decompiled/290003_battle.lua | 260 ++ scripts_decompiled/290004_battle.lua | 224 ++ scripts_decompiled/291000_battle.lua | 252 ++ scripts_decompiled/291001_battle.lua | 87 + scripts_decompiled/292000_battle.lua | 143 + scripts_decompiled/292001_battle.lua | 193 ++ scripts_decompiled/293000_battle.lua | 57 + scripts_decompiled/294000_battle.lua | 40 + scripts_decompiled/295000_battle.lua | 154 + scripts_decompiled/296000_battle.lua | 147 + scripts_decompiled/309000_battle.lua | 56 + scripts_decompiled/320000_battle.lua | 56 + scripts_decompiled/321000_battle.lua | 76 + scripts_decompiled/322000_battle.lua | 95 + scripts_decompiled/323000_battle.lua | 306 ++ scripts_decompiled/323001_battle.lua | 39 + scripts_decompiled/324000_battle.lua | 160 + scripts_decompiled/325000_battle.lua | 134 + scripts_decompiled/327000_battle.lua | 169 ++ scripts_decompiled/329000_battle.lua | 139 + scripts_decompiled/330000_battle.lua | 75 + scripts_decompiled/332000_battle.lua | 240 ++ scripts_decompiled/332001_battle.lua | 206 ++ scripts_decompiled/332002_battle.lua | 99 + scripts_decompiled/333000_battle.lua | 282 ++ scripts_decompiled/333001_battle.lua | 74 + scripts_decompiled/334000_battle.lua | 235 ++ scripts_decompiled/334100_battle.lua | 251 ++ scripts_decompiled/335000_battle.lua | 29 + scripts_decompiled/337000_battle.lua | 248 ++ scripts_decompiled/338000_battle.lua | 118 + scripts_decompiled/339000_battle.lua | 163 + scripts_decompiled/339001_battle.lua | 100 + scripts_decompiled/339002_battle.lua | 97 + scripts_decompiled/339003_battle.lua | 111 + scripts_decompiled/340000_battle.lua | 248 ++ scripts_decompiled/341000_battle.lua | 211 ++ scripts_decompiled/342000_battle.lua | 114 + scripts_decompiled/342002_battle.lua | 110 + scripts_decompiled/342100_battle.lua | 209 ++ scripts_decompiled/343000_battle.lua | 418 +++ scripts_decompiled/346000_battle.lua | 192 ++ scripts_decompiled/346100_battle.lua | 169 ++ scripts_decompiled/347100_battle.lua | 757 +++++ scripts_decompiled/347101_battle.lua | 958 ++++++ scripts_decompiled/348000_battle.lua | 64 + scripts_decompiled/349000_battle.lua | 84 + scripts_decompiled/349100_battle.lua | 125 + scripts_decompiled/350000_battle.lua | 141 + scripts_decompiled/350100_battle.lua | 35 + scripts_decompiled/351000_battle.lua | 33 + scripts_decompiled/352000_battle.lua | 147 + scripts_decompiled/352002_battle.lua | 233 ++ scripts_decompiled/352003_battle.lua | 209 ++ scripts_decompiled/352005_battle.lua | 79 + scripts_decompiled/353000_battle.lua | 282 ++ scripts_decompiled/353001_battle.lua | 155 + scripts_decompiled/409000_battle.lua | 435 +++ scripts_decompiled/410000_battle.lua | 776 +++++ scripts_decompiled/411000_battle.lua | 296 ++ scripts_decompiled/411000_logic.lua | 20 + scripts_decompiled/412000_battle.lua | 242 ++ scripts_decompiled/413000_battle.lua | 600 ++++ scripts_decompiled/415000_battle.lua | 492 +++ scripts_decompiled/415000_logic.lua | 41 + scripts_decompiled/416000_battle.lua | 430 +++ scripts_decompiled/417000_battle.lua | 663 +++++ scripts_decompiled/417100_battle.lua | 173 ++ scripts_decompiled/417200_battle.lua | 663 +++++ scripts_decompiled/418000_battle.lua | 471 +++ scripts_decompiled/419000_battle.lua | 235 ++ scripts_decompiled/450000_battle.lua | 790 +++++ scripts_decompiled/451000_battle.lua | 841 ++++++ scripts_decompiled/452000_battle.lua | 582 ++++ scripts_decompiled/520000_battle.lua | 430 +++ scripts_decompiled/520100_battle.lua | 88 + scripts_decompiled/520200_battle.lua | 88 + scripts_decompiled/521000_battle.lua | 283 ++ scripts_decompiled/522000_battle.lua | 137 + scripts_decompiled/523000_battle.lua | 142 + scripts_decompiled/523100_battle.lua | 87 + scripts_decompiled/524000_battle.lua | 41 + scripts_decompiled/525000_battle.lua | 665 +++++ scripts_decompiled/526000_battle.lua | 268 ++ scripts_decompiled/527000_battle.lua | 419 +++ scripts_decompiled/527100_battle.lua | 422 +++ scripts_decompiled/528000_battle.lua | 356 +++ scripts_decompiled/529000_battle.lua | 305 ++ scripts_decompiled/529001_battle.lua | 271 ++ scripts_decompiled/532000_battle.lua | 175 ++ scripts_decompiled/535000_battle.lua | 716 +++++ scripts_decompiled/535100_battle.lua | 639 ++++ scripts_decompiled/536000_battle.lua | 343 +++ scripts_decompiled/537000_battle.lua | 459 +++ scripts_decompiled/539000_battle.lua | 580 ++++ scripts_decompiled/540000_battle.lua | 365 +++ .../approach_setting_direction.lua | 42 + scripts_decompiled/approach_target.lua | 62 + scripts_decompiled/attack.lua | 39 + scripts_decompiled/attack_tunable_spin.lua | 47 + scripts_decompiled/combo_attack.lua | 39 + .../combo_attack_tunable_spin.lua | 47 + scripts_decompiled/combo_final.lua | 40 + scripts_decompiled/combo_repeat.lua | 40 + .../combo_tunable_success_angle180.lua | 47 + scripts_decompiled/come_down.lua | 39 + scripts_decompiled/common_attack.lua | 18 + scripts_decompiled/continue_attack.lua | 43 + scripts_decompiled/door_act.lua | 28 + scripts_decompiled/fall.lua | 39 + scripts_decompiled/if.lua | 44 + scripts_decompiled/ladder_act.lua | 124 + scripts_decompiled/landing.lua | 123 + scripts_decompiled/non_battle_act.lua | 67 + scripts_decompiled/nonspinning_attack.lua | 39 + .../nonspinning_combo_attack.lua | 39 + .../nonspinning_combo_final.lua | 40 + .../nonspinning_combo_repeat.lua | 40 + scripts_decompiled/normal.lua | 111 + scripts_decompiled/pursuit.lua | 39 + scripts_decompiled/team_call_help.lua | 40 + scripts_decompiled/team_reply_help.lua | 83 + scripts_decompiled/template.lua | 18 + scripts_decompiled/top_goal.lua | 42 + scripts_decompiled/turn.lua | 32 + scripts_decompiled/use_item.lua | 24 + scripts_decompiled/walk_around.lua | 39 + 290 files changed, 69055 insertions(+) create mode 100644 datasheet_findings.md create mode 100644 scripts_decompiled/001540_logic.lua create mode 100644 scripts_decompiled/006000_battle.lua create mode 100644 scripts_decompiled/006010_battle.lua create mode 100644 scripts_decompiled/006020_battle.lua create mode 100644 scripts_decompiled/006030_battle.lua create mode 100644 scripts_decompiled/006040_battle.lua create mode 100644 scripts_decompiled/006050_battle.lua create mode 100644 scripts_decompiled/006051_battle.lua create mode 100644 scripts_decompiled/006052_battle.lua create mode 100644 scripts_decompiled/006070_battle.lua create mode 100644 scripts_decompiled/006080_battle.lua create mode 100644 scripts_decompiled/006090_battle.lua create mode 100644 scripts_decompiled/006100_battle.lua create mode 100644 scripts_decompiled/006130_battle.lua create mode 100644 scripts_decompiled/006170_battle.lua create mode 100644 scripts_decompiled/006180_battle.lua create mode 100644 scripts_decompiled/006220_battle.lua create mode 100644 scripts_decompiled/006250_battle.lua create mode 100644 scripts_decompiled/006260_battle.lua create mode 100644 scripts_decompiled/006270_battle.lua create mode 100644 scripts_decompiled/006271_battle.lua create mode 100644 scripts_decompiled/006280_battle.lua create mode 100644 scripts_decompiled/006290_battle.lua create mode 100644 scripts_decompiled/006300_battle.lua create mode 100644 scripts_decompiled/006310_battle.lua create mode 100644 scripts_decompiled/006320_battle.lua create mode 100644 scripts_decompiled/006370_battle.lua create mode 100644 scripts_decompiled/006390_battle.lua create mode 100644 scripts_decompiled/006420_battle.lua create mode 100644 scripts_decompiled/006490_battle.lua create mode 100644 scripts_decompiled/006500_battle.lua create mode 100644 scripts_decompiled/006510_battle.lua create mode 100644 scripts_decompiled/006510_logic.lua create mode 100644 scripts_decompiled/006511_battle.lua create mode 100644 scripts_decompiled/006520_battle.lua create mode 100644 scripts_decompiled/006520_logic.lua create mode 100644 scripts_decompiled/006530_battle.lua create mode 100644 scripts_decompiled/006530_logic.lua create mode 100644 scripts_decompiled/006531_battle.lua create mode 100644 scripts_decompiled/006540_battle.lua create mode 100644 scripts_decompiled/006540_logic.lua create mode 100644 scripts_decompiled/006550_battle.lua create mode 100644 scripts_decompiled/006550_logic.lua create mode 100644 scripts_decompiled/006551_battle.lua create mode 100644 scripts_decompiled/006560_battle.lua create mode 100644 scripts_decompiled/006570_battle.lua create mode 100644 scripts_decompiled/006580_battle.lua create mode 100644 scripts_decompiled/006590_battle.lua create mode 100644 scripts_decompiled/006590_logic.lua create mode 100644 scripts_decompiled/006600_battle.lua create mode 100644 scripts_decompiled/006610_battle.lua create mode 100644 scripts_decompiled/006620_battle.lua create mode 100644 scripts_decompiled/006640_battle.lua create mode 100644 scripts_decompiled/006650_battle.lua create mode 100644 scripts_decompiled/006740_battle.lua create mode 100644 scripts_decompiled/006801_battle.lua create mode 100644 scripts_decompiled/006802_battle.lua create mode 100644 scripts_decompiled/006803_battle.lua create mode 100644 scripts_decompiled/006804_battle.lua create mode 100644 scripts_decompiled/006805_battle.lua create mode 100644 scripts_decompiled/006806_battle.lua create mode 100644 scripts_decompiled/006910_battle.lua create mode 100644 scripts_decompiled/010000_logic.lua create mode 100644 scripts_decompiled/010001_logic.lua create mode 100644 scripts_decompiled/010002_logic.lua create mode 100644 scripts_decompiled/010100_battle.lua create mode 100644 scripts_decompiled/010100_logic.lua create mode 100644 scripts_decompiled/011000_battle.lua create mode 100644 scripts_decompiled/011000_logic.lua create mode 100644 scripts_decompiled/120000_battle.lua create mode 100644 scripts_decompiled/120100_battle.lua create mode 100644 scripts_decompiled/120101_battle.lua create mode 100644 scripts_decompiled/120200_battle.lua create mode 100644 scripts_decompiled/120300_battle.lua create mode 100644 scripts_decompiled/206000_battle.lua create mode 100644 scripts_decompiled/206001_battle.lua create mode 100644 scripts_decompiled/206002_battle.lua create mode 100644 scripts_decompiled/223000_battle.lua create mode 100644 scripts_decompiled/223100_battle.lua create mode 100644 scripts_decompiled/223200_battle.lua create mode 100644 scripts_decompiled/224000_battle.lua create mode 100644 scripts_decompiled/225000_battle.lua create mode 100644 scripts_decompiled/225001_battle.lua create mode 100644 scripts_decompiled/225002_battle.lua create mode 100644 scripts_decompiled/226000_battle.lua create mode 100644 scripts_decompiled/227000_battle.lua create mode 100644 scripts_decompiled/228000_battle.lua create mode 100644 scripts_decompiled/228001_battle.lua create mode 100644 scripts_decompiled/230000_battle.lua create mode 100644 scripts_decompiled/231000_battle.lua create mode 100644 scripts_decompiled/231000_logic.lua create mode 100644 scripts_decompiled/232000_battle.lua create mode 100644 scripts_decompiled/233000_battle.lua create mode 100644 scripts_decompiled/236000_battle.lua create mode 100644 scripts_decompiled/236001_battle.lua create mode 100644 scripts_decompiled/237000_battle.lua create mode 100644 scripts_decompiled/237001_battle.lua create mode 100644 scripts_decompiled/238000_battle.lua create mode 100644 scripts_decompiled/239000_battle.lua create mode 100644 scripts_decompiled/240000_battle.lua create mode 100644 scripts_decompiled/240001_battle.lua create mode 100644 scripts_decompiled/241000_battle.lua create mode 100644 scripts_decompiled/241001_battle.lua create mode 100644 scripts_decompiled/241002_battle.lua create mode 100644 scripts_decompiled/241003_battle.lua create mode 100644 scripts_decompiled/241004_battle.lua create mode 100644 scripts_decompiled/243000_battle.lua create mode 100644 scripts_decompiled/250000_battle.lua create mode 100644 scripts_decompiled/250001_battle.lua create mode 100644 scripts_decompiled/250004_battle.lua create mode 100644 scripts_decompiled/250005_battle.lua create mode 100644 scripts_decompiled/251000_battle.lua create mode 100644 scripts_decompiled/251000_logic.lua create mode 100644 scripts_decompiled/252000_battle.lua create mode 100644 scripts_decompiled/253000_battle.lua create mode 100644 scripts_decompiled/253001_battle.lua create mode 100644 scripts_decompiled/253002_battle.lua create mode 100644 scripts_decompiled/254000_battle.lua create mode 100644 scripts_decompiled/254001_battle.lua create mode 100644 scripts_decompiled/254002_battle.lua create mode 100644 scripts_decompiled/255000_battle.lua create mode 100644 scripts_decompiled/255001_battle.lua create mode 100644 scripts_decompiled/255002_battle.lua create mode 100644 scripts_decompiled/255003_battle.lua create mode 100644 scripts_decompiled/255006_battle.lua create mode 100644 scripts_decompiled/256000_battle.lua create mode 100644 scripts_decompiled/256001_battle.lua create mode 100644 scripts_decompiled/256002_battle.lua create mode 100644 scripts_decompiled/257000_battle.lua create mode 100644 scripts_decompiled/257001_battle.lua create mode 100644 scripts_decompiled/264000_battle.lua create mode 100644 scripts_decompiled/265000_battle.lua create mode 100644 scripts_decompiled/266000_battle.lua create mode 100644 scripts_decompiled/267000_battle.lua create mode 100644 scripts_decompiled/267000_logic.lua create mode 100644 scripts_decompiled/268000_battle.lua create mode 100644 scripts_decompiled/268000_logic.lua create mode 100644 scripts_decompiled/269000_battle.lua create mode 100644 scripts_decompiled/270000_battle.lua create mode 100644 scripts_decompiled/270001_battle.lua create mode 100644 scripts_decompiled/271000_battle.lua create mode 100644 scripts_decompiled/271100_battle.lua create mode 100644 scripts_decompiled/273000_battle.lua create mode 100644 scripts_decompiled/278000_battle.lua create mode 100644 scripts_decompiled/279000_battle.lua create mode 100644 scripts_decompiled/279001_battle.lua create mode 100644 scripts_decompiled/279002_battle.lua create mode 100644 scripts_decompiled/279003_battle.lua create mode 100644 scripts_decompiled/280000_battle.lua create mode 100644 scripts_decompiled/280001_battle.lua create mode 100644 scripts_decompiled/281000_battle.lua create mode 100644 scripts_decompiled/281100_battle.lua create mode 100644 scripts_decompiled/283001_battle.lua create mode 100644 scripts_decompiled/284000_battle.lua create mode 100644 scripts_decompiled/284001_battle.lua create mode 100644 scripts_decompiled/286000_battle.lua create mode 100644 scripts_decompiled/286001_battle.lua create mode 100644 scripts_decompiled/287000_battle.lua create mode 100644 scripts_decompiled/287001_battle.lua create mode 100644 scripts_decompiled/290000_battle.lua create mode 100644 scripts_decompiled/290001_battle.lua create mode 100644 scripts_decompiled/290002_battle.lua create mode 100644 scripts_decompiled/290003_battle.lua create mode 100644 scripts_decompiled/290004_battle.lua create mode 100644 scripts_decompiled/291000_battle.lua create mode 100644 scripts_decompiled/291001_battle.lua create mode 100644 scripts_decompiled/292000_battle.lua create mode 100644 scripts_decompiled/292001_battle.lua create mode 100644 scripts_decompiled/293000_battle.lua create mode 100644 scripts_decompiled/294000_battle.lua create mode 100644 scripts_decompiled/295000_battle.lua create mode 100644 scripts_decompiled/296000_battle.lua create mode 100644 scripts_decompiled/309000_battle.lua create mode 100644 scripts_decompiled/320000_battle.lua create mode 100644 scripts_decompiled/321000_battle.lua create mode 100644 scripts_decompiled/322000_battle.lua create mode 100644 scripts_decompiled/323000_battle.lua create mode 100644 scripts_decompiled/323001_battle.lua create mode 100644 scripts_decompiled/324000_battle.lua create mode 100644 scripts_decompiled/325000_battle.lua create mode 100644 scripts_decompiled/327000_battle.lua create mode 100644 scripts_decompiled/329000_battle.lua create mode 100644 scripts_decompiled/330000_battle.lua create mode 100644 scripts_decompiled/332000_battle.lua create mode 100644 scripts_decompiled/332001_battle.lua create mode 100644 scripts_decompiled/332002_battle.lua create mode 100644 scripts_decompiled/333000_battle.lua create mode 100644 scripts_decompiled/333001_battle.lua create mode 100644 scripts_decompiled/334000_battle.lua create mode 100644 scripts_decompiled/334100_battle.lua create mode 100644 scripts_decompiled/335000_battle.lua create mode 100644 scripts_decompiled/337000_battle.lua create mode 100644 scripts_decompiled/338000_battle.lua create mode 100644 scripts_decompiled/339000_battle.lua create mode 100644 scripts_decompiled/339001_battle.lua create mode 100644 scripts_decompiled/339002_battle.lua create mode 100644 scripts_decompiled/339003_battle.lua create mode 100644 scripts_decompiled/340000_battle.lua create mode 100644 scripts_decompiled/341000_battle.lua create mode 100644 scripts_decompiled/342000_battle.lua create mode 100644 scripts_decompiled/342002_battle.lua create mode 100644 scripts_decompiled/342100_battle.lua create mode 100644 scripts_decompiled/343000_battle.lua create mode 100644 scripts_decompiled/346000_battle.lua create mode 100644 scripts_decompiled/346100_battle.lua create mode 100644 scripts_decompiled/347100_battle.lua create mode 100644 scripts_decompiled/347101_battle.lua create mode 100644 scripts_decompiled/348000_battle.lua create mode 100644 scripts_decompiled/349000_battle.lua create mode 100644 scripts_decompiled/349100_battle.lua create mode 100644 scripts_decompiled/350000_battle.lua create mode 100644 scripts_decompiled/350100_battle.lua create mode 100644 scripts_decompiled/351000_battle.lua create mode 100644 scripts_decompiled/352000_battle.lua create mode 100644 scripts_decompiled/352002_battle.lua create mode 100644 scripts_decompiled/352003_battle.lua create mode 100644 scripts_decompiled/352005_battle.lua create mode 100644 scripts_decompiled/353000_battle.lua create mode 100644 scripts_decompiled/353001_battle.lua create mode 100644 scripts_decompiled/409000_battle.lua create mode 100644 scripts_decompiled/410000_battle.lua create mode 100644 scripts_decompiled/411000_battle.lua create mode 100644 scripts_decompiled/411000_logic.lua create mode 100644 scripts_decompiled/412000_battle.lua create mode 100644 scripts_decompiled/413000_battle.lua create mode 100644 scripts_decompiled/415000_battle.lua create mode 100644 scripts_decompiled/415000_logic.lua create mode 100644 scripts_decompiled/416000_battle.lua create mode 100644 scripts_decompiled/417000_battle.lua create mode 100644 scripts_decompiled/417100_battle.lua create mode 100644 scripts_decompiled/417200_battle.lua create mode 100644 scripts_decompiled/418000_battle.lua create mode 100644 scripts_decompiled/419000_battle.lua create mode 100644 scripts_decompiled/450000_battle.lua create mode 100644 scripts_decompiled/451000_battle.lua create mode 100644 scripts_decompiled/452000_battle.lua create mode 100644 scripts_decompiled/520000_battle.lua create mode 100644 scripts_decompiled/520100_battle.lua create mode 100644 scripts_decompiled/520200_battle.lua create mode 100644 scripts_decompiled/521000_battle.lua create mode 100644 scripts_decompiled/522000_battle.lua create mode 100644 scripts_decompiled/523000_battle.lua create mode 100644 scripts_decompiled/523100_battle.lua create mode 100644 scripts_decompiled/524000_battle.lua create mode 100644 scripts_decompiled/525000_battle.lua create mode 100644 scripts_decompiled/526000_battle.lua create mode 100644 scripts_decompiled/527000_battle.lua create mode 100644 scripts_decompiled/527100_battle.lua create mode 100644 scripts_decompiled/528000_battle.lua create mode 100644 scripts_decompiled/529000_battle.lua create mode 100644 scripts_decompiled/529001_battle.lua create mode 100644 scripts_decompiled/532000_battle.lua create mode 100644 scripts_decompiled/535000_battle.lua create mode 100644 scripts_decompiled/535100_battle.lua create mode 100644 scripts_decompiled/536000_battle.lua create mode 100644 scripts_decompiled/537000_battle.lua create mode 100644 scripts_decompiled/539000_battle.lua create mode 100644 scripts_decompiled/540000_battle.lua create mode 100644 scripts_decompiled/approach_setting_direction.lua create mode 100644 scripts_decompiled/approach_target.lua create mode 100644 scripts_decompiled/attack.lua create mode 100644 scripts_decompiled/attack_tunable_spin.lua create mode 100644 scripts_decompiled/combo_attack.lua create mode 100644 scripts_decompiled/combo_attack_tunable_spin.lua create mode 100644 scripts_decompiled/combo_final.lua create mode 100644 scripts_decompiled/combo_repeat.lua create mode 100644 scripts_decompiled/combo_tunable_success_angle180.lua create mode 100644 scripts_decompiled/come_down.lua create mode 100644 scripts_decompiled/common_attack.lua create mode 100644 scripts_decompiled/continue_attack.lua create mode 100644 scripts_decompiled/door_act.lua create mode 100644 scripts_decompiled/fall.lua create mode 100644 scripts_decompiled/if.lua create mode 100644 scripts_decompiled/ladder_act.lua create mode 100644 scripts_decompiled/landing.lua create mode 100644 scripts_decompiled/non_battle_act.lua create mode 100644 scripts_decompiled/nonspinning_attack.lua create mode 100644 scripts_decompiled/nonspinning_combo_attack.lua create mode 100644 scripts_decompiled/nonspinning_combo_final.lua create mode 100644 scripts_decompiled/nonspinning_combo_repeat.lua create mode 100644 scripts_decompiled/normal.lua create mode 100644 scripts_decompiled/pursuit.lua create mode 100644 scripts_decompiled/team_call_help.lua create mode 100644 scripts_decompiled/team_reply_help.lua create mode 100644 scripts_decompiled/template.lua create mode 100644 scripts_decompiled/top_goal.lua create mode 100644 scripts_decompiled/turn.lua create mode 100644 scripts_decompiled/use_item.lua create mode 100644 scripts_decompiled/walk_around.lua diff --git a/datasheet_findings.md b/datasheet_findings.md new file mode 100644 index 0000000..5dd7ecc --- /dev/null +++ b/datasheet_findings.md @@ -0,0 +1,2645 @@ +# Dark Souls Remastered — Datasheet Findings +*Auto-extracted from GameParam.parambnd.dcx via soulstruct* + +## WEAPONS & SHIELDS + +### Specific Weapon Stats (Reqs / Scaling / Weight / 2H-STR) + + +### All Shields — Full Stability & Guard Stats + +| ID | Name | Weight | Stability | PhysGuard | MagGuard | FireGuard | LtnGuard | +|---|---|---|---|---|---|---|---| + +### Dagger — All Upgrade Paths Scaling + + +## RINGS + +### All 41 Rings — Weight & Effects + +| ID | Name | Weight | EquipLoad | SortIndex | +|---|---|---|---|---| +| 142 | HPドレイン | | ? | 40 | +| 111 | HP微増 | | ? | 1 | +| 116 | MP偏重 | | ? | 19 | +| 146 | SAアップ | | ? | 26 | +| 150 | 【DLC】黒竜の指輪 | | ? | 41 | +| 121 | アイテムドロップアップ | | ? | 32 | +| 144 | カウンター強化 | | ? | 25 | +| 104 | スタミナ回復アップ | | ? | 2 | +| 101 | ピンチ攻撃力アップ | | ? | 12 | +| 147 | ピンチ防御力アップ | | ? | 13 | +| 108 | 全耐性アップ1 | | ? | 8 | +| 130 | 共鳴 | | ? | 24 | +| 109 | 出血耐性アップ | | ? | 9 | +| 125 | 剛脚 | | ? | 31 | +| 122 | 取得ソウルアップ | | ? | 33 | +| 127 | 呪いからの復活 | | ? | 15 | +| 113 | 呪耐性アップ | | ? | 11 | +| 148 | 奇跡威力アップ | | ? | 22 | +| 119 | 弓の達人 | | ? | 27 | +| 143 | 強者の呪い | | ? | 39 | +| 126 | 復活 | | ? | 14 | +| 102 | 暗月神の指輪 | | ? | 23 | +| 145 | 武器を大切に | | ? | 29 | +| 110 | 毒耐性アップ | | ? | 10 | +| 137 | 混沌の言葉 | | ? | 36 | +| 139 | 溶岩歩き | | ? | 35 | +| 105 | 炎耐性アップ | | ? | 6 | +| 120 | 物理防御力アップ | | ? | 4 | +| 103 | 盗賊団の指輪 | | ? | 37 | +| 124 | 石コロ帽子 | | ? | 38 | +| 117 | 致命攻撃力アップ | | ? | 28 | +| 100 | 装備重量アップ | | ? | 3 | +| 141 | 補助魔法延長 | | ? | 17 | +| 128 | 軽業 | | ? | 30 | +| 138 | 闇歩き | | ? | 34 | +| 106 | 雷耐性アップ | | ? | 7 | +| 123 | 音消去 | | ? | 18 | +| 114 | 魔法スロットアップ | | ? | 20 | +| 149 | 魔法スロットアップB | | ? | 21 | +| 115 | 魔法威力アップ | | ? | 16 | +| 107 | 魔法耐性アップ | | ? | 5 | + +### Bellowing Dragoncrest Ring — SpecialEffect lookup + +## ARMOR + +### All Armor — Weight, Poise, Absorptions + +| ID | Name | Weight | Poise | PhysAbsorption | MagAbsorption | FireAbsorption | LtnAbsorption | BleedRes | PoisonRes | CurseRes | +|---|---|---|---|---|---|---|---|---|---|---| +| 1 | PV用グール頭 | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 660000 | 【DLC】アルトリウスの兜 | 4.199999809265137 | 6 | ? | ? | ? | ? | ? | ? | ? | +| 662000 | 【DLC】アルトリウスの手甲 | 4.599999904632568 | 7 | ? | ? | ? | ? | ? | ? | ? | +| 663000 | 【DLC】アルトリウスの足甲 | 5.5 | 9 | ? | ? | ? | ? | ? | ? | ? | +| 661000 | 【DLC】アルトリウスの鎧 | 10.5 | 15 | ? | ? | ? | ? | ? | ? | ? | +| 673000 | 【DLC】キアランのスカート | 5.0 | 6 | ? | ? | ? | ? | ? | ? | ? | +| 670000 | 【DLC】キアランのフード | 2.5 | 3 | ? | ? | ? | ? | ? | ? | ? | +| 672000 | 【DLC】キアランのロンググローブ | 2.799999952316284 | 3 | ? | ? | ? | ? | ? | ? | ? | +| 671000 | 【DLC】キアランのローブ | 6.400000095367432 | 8 | ? | ? | ? | ? | ? | ? | ? | +| 680000 | 【DLC】ゴーの兜 | 6.5 | 9 | ? | ? | ? | ? | ? | ? | ? | +| 682000 | 【DLC】ゴーの手甲 | 7.0 | 12 | ? | ? | ? | ? | ? | ? | ? | +| 683000 | 【DLC】ゴーの足甲 | 8.0 | 13 | ? | ? | ? | ? | ? | ? | ? | +| 681000 | 【DLC】ゴーの鎧 | 13.0 | 19 | ? | ? | ? | ? | ? | ? | ? | +| 702000 | 【DLC】スナイパーグローブ | 1.5 | | ? | ? | ? | ? | ? | ? | ? | +| 701000 | 【DLC】スナイパーコート | 4.5 | | ? | ? | ? | ? | ? | ? | ? | +| 700000 | 【DLC】スナイパーハット | 2.0 | | ? | ? | ? | ? | ? | ? | ? | +| 703000 | 【DLC】スナイパーブーツ | 3.200000047683716 | | ? | ? | ? | ? | ? | ? | ? | +| 690000 | 【DLC】守護者の兜 | 7.199999809265137 | 15 | ? | ? | ? | ? | ? | ? | ? | +| 692000 | 【DLC】守護者の手甲 | 10.399999618530273 | 23 | ? | ? | ? | ? | ? | ? | ? | +| 693000 | 【DLC】守護者の足甲 | 10.399999618530273 | 23 | ? | ? | ? | ? | ? | ? | ? | +| 691000 | 【DLC】守護者の鎧 | 17.0 | 37 | ? | ? | ? | ? | ? | ? | ? | +| 710000 | 【DLC】深淵人の頭 | 2.5 | | ? | ? | ? | ? | ? | ? | ? | +| 720000 | 【DLC】深淵人(魔術師)の頭 | 2.200000047683716 | | ? | ? | ? | ? | ? | ? | ? | +| 400000 | うす汚れたフード | 0.800000011920929 | | ? | ? | ? | ? | ? | ? | ? | +| 401000 | うす汚れた上衣 | 3.0 | | ? | ? | ? | ? | ? | ? | ? | +| 402000 | うす汚れた手袋 | 1.2000000476837158 | | ? | ? | ? | ? | ? | ? | ? | +| 901000 | からだ | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 320000 | さまよう黒騎士の兜 | 5.0 | 8 | ? | ? | ? | ? | ? | ? | ? | +| 322000 | さまよう黒騎士の手甲 | 6.0 | 10 | ? | ? | ? | ? | ? | ? | ? | +| 323000 | さまよう黒騎士の足甲 | 7.0 | 11 | ? | ? | ? | ? | ? | ? | ? | +| 321000 | さまよう黒騎士の鎧 | 13.0 | 21 | ? | ? | ? | ? | ? | ? | ? | +| 560000 | ずた袋 | 0.6000000238418579 | | ? | ? | ? | ? | ? | ? | ? | +| 1010000 | たまご | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 1020000 | たまご_二段階目 | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 340000 | とんがり帽子 | 1.100000023841858 | | ? | ? | ? | ? | ? | ? | ? | +| 210000 | アイアンヘルム | 3.5 | 5 | ? | ? | ? | ? | ? | ? | ? | +| 342000 | ウイッチグローブ | 1.7000000476837158 | | ? | ? | ? | ? | ? | ? | ? | +| 341000 | ウイッチコート | 4.0 | | ? | ? | ? | ? | ? | ? | ? | +| 343000 | ウイッチスカート | 2.5 | | ? | ? | ? | ? | ? | ? | ? | +| 1800 | ウェーブ | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 3200 | ウェーブショート | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 3700 | ウェーブロング | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 330000 | ウーラシールの頭冠 | 0.4000000059604645 | | ? | ? | ? | ? | ? | ? | ? | +| 1300 | オールバックロング | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 270000 | オーンスタインの兜 | 5.5 | 9 | ? | ? | ? | ? | ? | ? | ? | +| 272000 | オーンスタインの手甲 | 4.0 | 6 | ? | ? | ? | ? | ? | ? | ? | +| 273000 | オーンスタインの足甲 | 7.0 | 11 | ? | ? | ? | ? | ? | ? | ? | +| 271000 | オーンスタインの鎧 | 12.0 | 19 | ? | ? | ? | ? | ? | ? | ? | +| 11000 | カタリナアーマー | 11.699999809265137 | 21 | ? | ? | ? | ? | ? | ? | ? | +| 12000 | カタリナガントレット | 6.900000095367432 | 13 | ? | ? | ? | ? | ? | ? | ? | +| 10000 | カタリナヘルム | 4.5 | 8 | ? | ? | ? | ? | ? | ? | ? | +| 13000 | カタリナレギンス | 6.900000095367432 | 13 | ? | ? | ? | ? | ? | ? | ? | +| 630000 | ガーゴイルの兜 | 3.5 | 8 | ? | ? | ? | ? | ? | ? | ? | +| 471000 | ゴーレムアーマー | 16.399999618530273 | 33 | ? | ? | ? | ? | ? | ? | ? | +| 472000 | ゴーレムガントレット | 9.699999809265137 | 20 | ? | ? | ? | ? | ? | ? | ? | +| 470000 | ゴーレムヘルム | 6.300000190734863 | 13 | ? | ? | ? | ? | ? | ? | ? | +| 473000 | ゴーレムレギンス | 9.699999809265137 | 20 | ? | ? | ? | ? | ? | ? | ? | +| 3800 | シニヨン | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 1200 | ショート | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 3000 | スキン | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 1000 | スキンヘッド | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 3300 | ストレートショート | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 3400 | ストレートロング | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 80000 | スモウの兜 | 6.800000190734863 | 14 | ? | ? | ? | ? | ? | ? | ? | +| 82000 | スモウの手甲 | 10.399999618530273 | 21 | ? | ? | ? | ? | ? | ? | ? | +| 83000 | スモウの足甲 | 10.399999618530273 | 21 | ? | ? | ? | ? | ? | ? | ? | +| 81000 | スモウの鎧 | 17.600000381469727 | 35 | ? | ? | ? | ? | ? | ? | ? | +| 1700 | セミロング七三分け | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 1600 | センターパート | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 531000 | センチネルアーマー | 16.399999618530273 | 35 | ? | ? | ? | ? | ? | ? | ? | +| 532000 | センチネルガントレット | 9.699999809265137 | 21 | ? | ? | ? | ? | ? | ? | ? | +| 530000 | センチネルヘルム | 6.300000190734863 | 14 | ? | ? | ? | ? | ? | ? | ? | +| 533000 | センチネルレギンス | 9.699999809265137 | 21 | ? | ? | ? | ? | ? | ? | ? | +| 171000 | チェインアーマー | 6.0 | 9 | ? | ? | ? | ? | ? | ? | ? | +| 2171000 | チェインアーマー | 6.0 | 9 | ? | ? | ? | ? | ? | ? | ? | +| 170000 | チェインヘルム | 3.0 | 5 | ? | ? | ? | ? | ? | ? | ? | +| 2170000 | チェインヘルム | 3.0 | 5 | ? | ? | ? | ? | ? | ? | ? | +| 173000 | チェインレギンス | 4.599999904632568 | 7 | ? | ? | ? | ? | ? | ? | ? | +| 2173000 | チェインレギンス | 4.599999904632568 | 7 | ? | ? | ? | ? | ? | ? | ? | +| 1400 | テール | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 200000 | トゲの兜 | 4.099999904632568 | 6 | ? | ? | ? | ? | ? | ? | ? | +| 202000 | トゲの手甲 | 6.199999809265137 | 9 | ? | ? | ? | ? | ? | ? | ? | +| 203000 | トゲの足甲 | 6.199999809265137 | 9 | ? | ? | ? | ? | ? | ? | ? | +| 201000 | トゲの鎧 | 10.5 | 16 | ? | ? | ? | ? | ? | ? | ? | +| 240000 | ハンターの帽子 | 1.2000000476837158 | | ? | ? | ? | ? | ? | ? | ? | +| 211000 | ハードレザーアーマー | 5.900000095367432 | | ? | ? | ? | ? | ? | ? | ? | +| 212000 | ハードレザーガントレット | 3.5 | | ? | ? | ? | ? | ? | ? | ? | +| 213000 | ハードレザーブーツ | 3.5 | | ? | ? | ? | ? | ? | ? | ? | +| 380000 | ビッグハット | 3.0 | | ? | ? | ? | ? | ? | ? | ? | +| 3100 | ベリーショート | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 150000 | ベルカの仮面 | 2.5 | | ? | ? | ? | ? | ? | ? | ? | +| 1900 | ボブ | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 230000 | ボロ布のフード | 1.100000023841858 | | ? | ? | ? | ? | ? | ? | ? | +| 2230000 | ボロ布のフード | 1.100000023841858 | | ? | ? | ? | ? | ? | ? | ? | +| 232000 | ボロ布のマンシェット | 1.600000023841858 | | ? | ? | ? | ? | ? | ? | ? | +| 2232000 | ボロ布のマンシェット | 1.600000023841858 | | ? | ? | ? | ? | ? | ? | ? | +| 231000 | ボロ布のローブ | 2.700000047683716 | | ? | ? | ? | ? | ? | ? | ? | +| 2231000 | ボロ布のローブ | 2.700000047683716 | | ? | ? | ? | ? | ? | ? | ? | +| 3500 | ポニーテールA | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 3600 | ポニーテールB | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 241000 | レザーアーマー | 4.699999809265137 | | ? | ? | ? | ? | ? | ? | ? | +| 172000 | レザーガントレット | 3.5999999046325684 | 5 | ? | ? | ? | ? | ? | ? | ? | +| 2172000 | レザーガントレット | 3.5999999046325684 | 5 | ? | ? | ? | ? | ? | ? | ? | +| 242000 | レザーグローブ | 2.799999952316284 | | ? | ? | ? | ? | ? | ? | ? | +| 243000 | レザーブーツ | 2.799999952316284 | | ? | ? | ? | ? | ? | ? | ? | +| 650000 | 上位神職の兜 | 5.099999904632568 | 9 | ? | ? | ? | ? | ? | ? | ? | +| 652000 | 上位神職の手甲 | 7.800000190734863 | 14 | ? | ? | ? | ? | ? | ? | ? | +| 653000 | 上位神職の足甲 | 7.800000190734863 | 14 | ? | ? | ? | ? | ? | ? | ? | +| 651000 | 上位神職の鎧 | 13.300000190734863 | 23 | ? | ? | ? | ? | ? | ? | ? | +| 350000 | 上級騎士の兜 | 4.5 | 8 | ? | ? | ? | ? | ? | ? | ? | +| 2350000 | 上級騎士の兜 | 4.5 | 8 | ? | ? | ? | ? | ? | ? | ? | +| 352000 | 上級騎士の手甲 | 3.700000047683716 | 6 | ? | ? | ? | ? | ? | ? | ? | +| 2352000 | 上級騎士の手甲 | 3.700000047683716 | 6 | ? | ? | ? | ? | ? | ? | ? | +| 353000 | 上級騎士の足甲 | 6.900000095367432 | 12 | ? | ? | ? | ? | ? | ? | ? | +| 2353000 | 上級騎士の足甲 | 6.900000095367432 | 12 | ? | ? | ? | ? | ? | ? | ? | +| 351000 | 上級騎士の鎧 | 11.699999809265137 | 20 | ? | ? | ? | ? | ? | ? | ? | +| 2351000 | 上級騎士の鎧 | 11.699999809265137 | 20 | ? | ? | ? | ? | ? | ? | ? | +| 510000 | 下級騎士の兜 | 4.199999809265137 | 6 | ? | ? | ? | ? | ? | ? | ? | +| 512000 | 下級騎士の手甲 | 3.5 | 5 | ? | ? | ? | ? | ? | ? | ? | +| 513000 | 下級騎士の足甲 | 6.400000095367432 | 9 | ? | ? | ? | ? | ? | ? | ? | +| 511000 | 下級騎士の鎧 | 10.899999618530273 | 16 | ? | ? | ? | ? | ? | ? | ? | +| 1500 | 乱れ長髪 | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 90000 | 伝道者の六目兜 | 3.9000000953674316 | 5 | ? | ? | ? | ? | ? | ? | ? | +| 92000 | 伝道者の篭手 | 3.0 | 3 | ? | ? | ? | ? | ? | ? | ? | +| 91000 | 伝道者の聖衣 | 10.100000381469727 | 12 | ? | ? | ? | ? | ? | ? | ? | +| 93000 | 伝道者の腰巻き | 6.0 | 7 | ? | ? | ? | ? | ? | ? | ? | +| 480000 | 兵士の兜 | 3.0 | 5 | ? | ? | ? | ? | ? | ? | ? | +| 483000 | 兵士の腰巻き | 1.5 | 7 | ? | ? | ? | ? | ? | ? | ? | +| 481000 | 兵士の鎧 | 7.800000190734863 | 12 | ? | ? | ? | ? | ? | ? | ? | +| 233000 | 厚手のブーツ | 1.600000023841858 | | ? | ? | ? | ? | ? | ? | ? | +| 2233000 | 厚手のブーツ | 1.600000023841858 | | ? | ? | ? | ? | ? | ? | ? | +| 20000 | 古い聖騎士の兜 | 5.0 | 8 | ? | ? | ? | ? | ? | ? | ? | +| 22000 | 古い聖騎士の手甲 | 7.599999904632568 | 12 | ? | ? | ? | ? | ? | ? | ? | +| 23000 | 古い聖騎士の足甲 | 7.599999904632568 | 12 | ? | ? | ? | ? | ? | ? | ? | +| 21000 | 古い聖騎士の鎧 | 12.899999618530273 | 20 | ? | ? | ? | ? | ? | ? | ? | +| 333000 | 古めかしいスカート | 3.0 | | ? | ? | ? | ? | ? | ? | ? | +| 331000 | 古めかしいドレス | | | ? | ? | ? | ? | ? | ? | ? | +| 332000 | 古めかしいロンググローブ | 0.6000000238418579 | | ? | ? | ? | ? | ? | ? | ? | +| 111000 | 名誉者の鎧 | 13.300000190734863 | 20 | ? | ? | ? | ? | ? | ? | ? | +| 551000 | 大王の長衣 | 6.0 | | ? | ? | ? | ? | ? | ? | ? | +| 550000 | 太陽の光の王冠 | 3.0 | | ? | ? | ? | ? | ? | ? | ? | +| 553000 | 太陽の脚輪 | 2.799999952316284 | | ? | ? | ? | ? | ? | ? | ? | +| 552000 | 太陽の腕輪 | 2.799999952316284 | | ? | ? | ? | ? | ? | ? | ? | +| 161000 | 太陽印の鎧 | 9.0 | 16 | ? | ? | ? | ? | ? | ? | ? | +| 2161000 | 太陽印の鎧 | 9.0 | 16 | ? | ? | ? | ? | ? | ? | ? | +| 190000 | 太陽虫 | 1.399999976158142 | | ? | ? | ? | ? | ? | ? | ? | +| 4000 | 女性11 | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 4100 | 女性12 | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 4200 | 女性13 | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 4300 | 女性14 | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 4400 | 女性15 | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 4500 | 女性16 | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 4600 | 女性17 | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 4700 | 女性18 | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 4800 | 女性19 | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 4900 | 女性20 | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 610000 | 子の仮面 | 1.2000000476837158 | | ? | ? | ? | ? | ? | ? | ? | +| 140000 | 封印者の仮面 | 1.5 | | ? | ? | ? | ? | ? | ? | ? | +| 53000 | 山賊のズボン | 1.7999999523162842 | | ? | ? | ? | ? | ? | ? | ? | +| 50000 | 山賊のフード | 1.2000000476837158 | | ? | ? | ? | ? | ? | ? | ? | +| 52000 | 山賊の篭手 | 1.7999999523162842 | | ? | ? | ? | ? | ? | ? | ? | +| 51000 | 山賊の鎧 | 3.0999999046325684 | | ? | ? | ? | ? | ? | ? | ? | +| 440000 | 岩の兜 | 7.5 | 18 | ? | ? | ? | ? | ? | ? | ? | +| 442000 | 岩の手甲 | 11.5 | 28 | ? | ? | ? | ? | ? | ? | ? | +| 443000 | 岩の足甲 | 11.5 | 28 | ? | ? | ? | ? | ? | ? | ? | +| 441000 | 岩の鎧 | 19.5 | 47 | ? | ? | ? | ? | ? | ? | ? | +| 61000 | 影の上衣 | 2.299999952316284 | | ? | ? | ? | ? | ? | ? | ? | +| 62000 | 影の手甲 | 1.399999976158142 | | ? | ? | ? | ? | ? | ? | ? | +| 60000 | 影の覆面 | 0.8999999761581421 | | ? | ? | ? | ? | ? | ? | ? | +| 63000 | 影の足甲 | 1.399999976158142 | | ? | ? | ? | ? | ? | ? | ? | +| 951000 | 徘徊装備なし/胴 | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 953000 | 徘徊装備なし/脚 | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 952000 | 徘徊装備なし/腕 | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 950000 | 徘徊装備なし/頭 | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 5000 | 徘徊髪型 | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 112000 | 探求者の篭手 | 3.0 | 4 | ? | ? | ? | ? | ? | ? | ? | +| 113000 | 探索者の長靴 | 4.0 | 6 | ? | ? | ? | ? | ? | ? | ? | +| 361000 | 放浪のコート | 3.5 | | ? | ? | ? | ? | ? | ? | ? | +| 360000 | 放浪のフード | 1.399999976158142 | | ? | ? | ? | ? | ? | ? | ? | +| 363000 | 放浪のブーツ | 2.0999999046325684 | | ? | ? | ? | ? | ? | ? | ? | +| 362000 | 放浪のマンシェット | 2.0999999046325684 | | ? | ? | ? | ? | ? | ? | ? | +| 312000 | 旅の手袋 | 0.699999988079071 | | ? | ? | ? | ? | ? | ? | ? | +| 382000 | 旅の長手袋 | 1.600000023841858 | | ? | ? | ? | ? | ? | ? | ? | +| 383000 | 旅の靴 | 1.600000023841858 | | ? | ? | ? | ? | ? | ? | ? | +| 542000 | 月光の篭手 | 0.5 | | ? | ? | ? | ? | ? | ? | ? | +| 543000 | 月光の腰巻き | 1.7999999523162842 | | ? | ? | ? | ? | ? | ? | ? | +| 541000 | 月光の長衣 | 3.0999999046325684 | | ? | ? | ? | ? | ? | ? | ? | +| 280000 | 東国の兜 | 4.699999809265137 | 8 | ? | ? | ? | ? | ? | ? | ? | +| 282000 | 東国の手甲 | 1.5 | 2 | ? | ? | ? | ? | ? | ? | ? | +| 283000 | 東国の足甲 | 4.0 | 6 | ? | ? | ? | ? | ? | ? | ? | +| 281000 | 東国の鎧 | 12.300000190734863 | 20 | ? | ? | ? | ? | ? | ? | ? | +| 600000 | 母の仮面 | 1.2000000476837158 | | ? | ? | ? | ? | ? | ? | ? | +| 590000 | 父の仮面 | 1.2000000476837158 | | ? | ? | ? | ? | ? | ? | ? | +| 620000 | 牙猪の兜 | 8.0 | 12 | ? | ? | ? | ? | ? | ? | ? | +| 420000 | 王騎士の兜 | 4.800000190734863 | 8 | ? | ? | ? | ? | ? | ? | ? | +| 422000 | 王騎士の手甲 | 5.5 | 9 | ? | ? | ? | ? | ? | ? | ? | +| 423000 | 王騎士の足甲 | 6.5 | 11 | ? | ? | ? | ? | ? | ? | ? | +| 421000 | 王騎士の鎧 | 12.0 | 19 | ? | ? | ? | ? | ? | ? | ? | +| 100000 | 琥珀の兜 | 4.5 | 8 | ? | ? | ? | ? | ? | ? | ? | +| 102000 | 琥珀の手甲 | 5.0 | 8 | ? | ? | ? | ? | ? | ? | ? | +| 101000 | 琥珀の抱かれ鎧 | 11.699999809265137 | 20 | ? | ? | ? | ? | ? | ? | ? | +| 103000 | 琥珀の足甲 | 6.900000095367432 | 11 | ? | ? | ? | ? | ? | ? | ? | +| 2000 | 男性11 | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 2100 | 男性12 | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 2200 | 男性13 | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 2300 | 男性14 | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 2400 | 男性15 | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 2500 | 男性16 | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 2600 | 男性17 | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 2700 | 男性18 | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 2800 | 男性19 | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 2900 | 男性20 | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 503000 | 盗賊のタイツ | 1.7000000476837158 | | ? | ? | ? | ? | ? | ? | ? | +| 500000 | 盗賊のフード | 1.100000023841858 | | ? | ? | ? | ? | ? | ? | ? | +| 501000 | 盗賊の革鎧 | 2.799999952316284 | | ? | ? | ? | ? | ? | ? | ? | +| 450000 | 真鍮の兜 | 5.099999904632568 | 8 | ? | ? | ? | ? | ? | ? | ? | +| 452000 | 真鍮の手甲 | 5.400000095367432 | 8 | ? | ? | ? | ? | ? | ? | ? | +| 453000 | 真鍮の足甲 | 6.400000095367432 | 9 | ? | ? | ? | ? | ? | ? | ? | +| 451000 | 真鍮の鎧 | 10.899999618530273 | 16 | ? | ? | ? | ? | ? | ? | ? | +| 110000 | 知恵者の兜 | 5.099999904632568 | 8 | ? | ? | ? | ? | ? | ? | ? | +| 120000 | 石の兜 | 6.800000190734863 | 15 | ? | ? | ? | ? | ? | ? | ? | +| 122000 | 石の手甲 | 10.399999618530273 | 23 | ? | ? | ? | ? | ? | ? | ? | +| 123000 | 石の足甲 | 10.399999618530273 | 23 | ? | ? | ? | ? | ? | ? | ? | +| 121000 | 石の鎧 | 17.600000381469727 | 39 | ? | ? | ? | ? | ? | ? | ? | +| 180000 | 神職の兜 | 4.800000190734863 | 8 | ? | ? | ? | ? | ? | ? | ? | +| 2180000 | 神職の兜 | 4.800000190734863 | 8 | ? | ? | ? | ? | ? | ? | ? | +| 182000 | 神職の手甲 | 7.400000095367432 | 12 | ? | ? | ? | ? | ? | ? | ? | +| 2182000 | 神職の手甲 | 7.400000095367432 | 12 | ? | ? | ? | ? | ? | ? | ? | +| 183000 | 神職の足甲 | 7.400000095367432 | 12 | ? | ? | ? | ? | ? | ? | ? | +| 2183000 | 神職の足甲 | 7.400000095367432 | 12 | ? | ? | ? | ? | ? | ? | ? | +| 181000 | 神職の鎧 | 12.5 | 20 | ? | ? | ? | ? | ? | ? | ? | +| 2181000 | 神職の鎧 | 12.5 | 20 | ? | ? | ? | ? | ? | ? | ? | +| 1001000 | 竜のからだ | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 1003000 | 竜の脚 | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 1002000 | 竜の腕 | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 1000000 | 竜の頭 | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 520000 | 粗末な兜 | 2.5999999046325684 | 3 | ? | ? | ? | ? | ? | ? | ? | +| 523000 | 粗末な腰巻き | 1.399999976158142 | 5 | ? | ? | ? | ? | ? | ? | ? | +| 521000 | 粗末な鎧 | 6.599999904632568 | 8 | ? | ? | ? | ? | ? | ? | ? | +| 142000 | 紅のグローブ | 0.800000011920929 | | ? | ? | ? | ? | ? | ? | ? | +| 141000 | 紅のローブ | 3.9000000953674316 | | ? | ? | ? | ? | ? | ? | ? | +| 143000 | 紅の腰巻き | 3.5 | | ? | ? | ? | ? | ? | ? | ? | +| 130000 | 結晶付きの兜 | 4.199999809265137 | 6 | ? | ? | ? | ? | ? | ? | ? | +| 132000 | 結晶付きの手甲 | 6.400000095367432 | 9 | ? | ? | ? | ? | ? | ? | ? | +| 133000 | 結晶付きの足甲 | 6.400000095367432 | 9 | ? | ? | ? | ? | ? | ? | ? | +| 131000 | 結晶付きの鎧 | 10.899999618530273 | 16 | ? | ? | ? | ? | ? | ? | ? | +| 253000 | 絵画守りの腰巻き | 4.0 | | ? | ? | ? | ? | ? | ? | ? | +| 252000 | 絵画守りの長手袋 | 0.8999999761581421 | | ? | ? | ? | ? | ? | ? | ? | +| 251000 | 絵画守りの長衣 | 1.600000023841858 | | ? | ? | ? | ? | ? | ? | ? | +| 250000 | 絵画守りの頭巾 | 0.6000000238418579 | | ? | ? | ? | ? | ? | ? | ? | +| 3900 | 編み込み | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 413000 | 聖女のスカート | 2.5 | | ? | ? | ? | ? | ? | ? | ? | +| 2413000 | 聖女のスカート | 2.5 | | ? | ? | ? | ? | ? | ? | ? | +| 410000 | 聖女のフード | 0.800000011920929 | | ? | ? | ? | ? | ? | ? | ? | +| 2410000 | 聖女のフード | 0.800000011920929 | | ? | ? | ? | ? | ? | ? | ? | +| 411000 | 聖女の上衣 | 2.0 | | ? | ? | ? | ? | ? | ? | ? | +| 2411000 | 聖女の上衣 | 2.0 | | ? | ? | ? | ? | ? | ? | ? | +| 412000 | 聖女の手袋 | 1.2000000476837158 | | ? | ? | ? | ? | ? | ? | ? | +| 2412000 | 聖女の手袋 | 1.2000000476837158 | | ? | ? | ? | ? | ? | ? | ? | +| 313000 | 聖職のズボン | 2.0 | | ? | ? | ? | ? | ? | ? | ? | +| 311000 | 聖職の上衣 | 4.0 | | ? | ? | ? | ? | ? | ? | ? | +| 310000 | 聖職の帽子 | 1.2000000476837158 | | ? | ? | ? | ? | ? | ? | ? | +| 903000 | 脚 | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 902000 | 腕 | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 403000 | 血濡れたスカート | 2.5 | | ? | ? | ? | ? | ? | ? | ? | +| 570000 | 貪欲者の烙印 | 10.0 | 15 | ? | ? | ? | ? | ? | ? | ? | +| 381000 | 賢者のローブ | 4.0 | | ? | ? | ? | ? | ? | ? | ? | +| 160000 | 鉄の兜 | 4.5 | 8 | ? | ? | ? | ? | ? | ? | ? | +| 2160000 | 鉄の兜 | 4.5 | 8 | ? | ? | ? | ? | ? | ? | ? | +| 162000 | 鉄の腕輪 | 4.300000190734863 | 7 | ? | ? | ? | ? | ? | ? | ? | +| 2162000 | 鉄の腕輪 | 4.300000190734863 | 7 | ? | ? | ? | ? | ? | ? | ? | +| 163000 | 鉄の足甲 | 5.300000190734863 | 9 | ? | ? | ? | ? | ? | ? | ? | +| 2163000 | 鉄の足甲 | 5.300000190734863 | 9 | ? | ? | ? | ? | ? | ? | ? | +| 490000 | 鋳鉄の兜 | 5.400000095367432 | 9 | ? | ? | ? | ? | ? | ? | ? | +| 492000 | 鋳鉄の手甲 | 8.300000190734863 | 14 | ? | ? | ? | ? | ? | ? | ? | +| 493000 | 鋳鉄の足甲 | 8.300000190734863 | 14 | ? | ? | ? | ? | ? | ? | ? | +| 491000 | 鋳鉄の鎧 | 14.0 | 23 | ? | ? | ? | ? | ? | ? | ? | +| 580000 | 鍛冶の兜 | 4.5 | 8 | ? | ? | ? | ? | ? | ? | ? | +| 40000 | 闇の仮面 | 3.799999952316284 | 6 | ? | ? | ? | ? | ? | ? | ? | +| 42000 | 闇の手甲 | 5.800000190734863 | 9 | ? | ? | ? | ? | ? | ? | ? | +| 43000 | 闇の足甲 | 5.800000190734863 | 9 | ? | ? | ? | ? | ? | ? | ? | +| 41000 | 闇の鎧 | 9.800000190734863 | 16 | ? | ? | ? | ? | ? | ? | ? | +| 540000 | 陰の太陽の王冠 | 3.0 | | ? | ? | ? | ? | ? | ? | ? | +| 300000 | 隠密フード | 1.2000000476837158 | | ? | ? | ? | ? | ? | ? | ? | +| 900000 | 頭 | 0.0 | | ? | ? | ? | ? | ? | ? | ? | +| 390000 | 騎士の兜 | 4.199999809265137 | 8 | ? | ? | ? | ? | ? | ? | ? | +| 392000 | 騎士の手甲 | 3.5 | 6 | ? | ? | ? | ? | ? | ? | ? | +| 393000 | 騎士の足甲 | 6.400000095367432 | 12 | ? | ? | ? | ? | ? | ? | ? | +| 391000 | 騎士の鎧 | 10.899999618530273 | 20 | ? | ? | ? | ? | ? | ? | ? | +| 222000 | 魔術師のガントレット | 1.399999976158142 | | ? | ? | ? | ? | ? | ? | ? | +| 221000 | 魔術師のコート | 2.299999952316284 | | ? | ? | ? | ? | ? | ? | ? | +| 223000 | 魔術師のブーツ | 1.399999976158142 | | ? | ? | ? | ? | ? | ? | ? | +| 220000 | 魔術師の帽子 | 0.8999999761581421 | | ? | ? | ? | ? | ? | ? | ? | +| 372000 | 魔術鍛冶のガントレット | 1.399999976158142 | | ? | ? | ? | ? | ? | ? | ? | +| 371000 | 魔術鍛冶のコート | 2.299999952316284 | | ? | ? | ? | ? | ? | ? | ? | +| 373000 | 魔術鍛冶のブーツ | 1.399999976158142 | | ? | ? | ? | ? | ? | ? | ? | +| 370000 | 魔術鍛冶の帽子 | 0.8999999761581421 | | ? | ? | ? | ? | ? | ? | ? | +| 291000 | 黄の上衣 | 3.9000000953674316 | | ? | ? | ? | ? | ? | ? | ? | +| 290000 | 黄衣の冠 | 5.0 | | ? | ? | ? | ? | ? | ? | ? | +| 293000 | 黄衣の腰巻き | 4.0 | | ? | ? | ? | ? | ? | ? | ? | +| 292000 | 黄衣の長手袋 | 2.299999952316284 | | ? | ? | ? | ? | ? | ? | ? | +| 153000 | 黒のタイツ | 2.799999952316284 | | ? | ? | ? | ? | ? | ? | ? | +| 152000 | 黒のマンシェット | 1.7999999523162842 | | ? | ? | ? | ? | ? | ? | ? | +| 151000 | 黒の聖職衣 | 3.9000000953674316 | | ? | ? | ? | ? | ? | ? | ? | +| 463000 | 黒金糸のスカート | 3.0 | | ? | ? | ? | ? | ? | ? | ? | +| 460000 | 黒金糸のフード | 1.399999976158142 | | ? | ? | ? | ? | ? | ? | ? | +| 462000 | 黒金糸のロンググローブ | 1.2000000476837158 | | ? | ? | ? | ? | ? | ? | ? | +| 461000 | 黒金糸のローブ | 3.5 | | ? | ? | ? | ? | ? | ? | ? | +| 70000 | 黒鉄の兜 | 6.0 | 12 | ? | ? | ? | ? | ? | ? | ? | +| 72000 | 黒鉄の手甲 | 9.199999809265137 | 18 | ? | ? | ? | ? | ? | ? | ? | +| 73000 | 黒鉄の足甲 | 9.199999809265137 | 18 | ? | ? | ? | ? | ? | ? | ? | +| 71000 | 黒鉄の鎧 | 15.600000381469727 | 31 | ? | ? | ? | ? | ? | ? | ? | +| 303000 | 黒革のブーツ | 3.0 | | ? | ? | ? | ? | ? | ? | ? | +| 302000 | 黒革の手袋 | 1.7999999523162842 | | ? | ? | ? | ? | ? | ? | ? | +| 301000 | 黒革の鎧 | 3.0999999046325684 | | ? | ? | ? | ? | ? | ? | ? | +| 642000 | 黒魔術師のガントレット | | | ? | ? | ? | ? | ? | ? | ? | +| 2642000 | 黒魔術師のガントレット | | | ? | ? | ? | ? | ? | ? | ? | +| 641000 | 黒魔術師のコート | 1.7999999523162842 | | ? | ? | ? | ? | ? | ? | ? | +| 2641000 | 黒魔術師のコート | 1.7999999523162842 | | ? | ? | ? | ? | ? | ? | ? | +| 643000 | 黒魔術師のブーツ | | | ? | ? | ? | ? | ? | ? | ? | +| 2643000 | 黒魔術師のブーツ | | | ? | ? | ? | ? | ? | ? | ? | +| 640000 | 黒魔術師の帽子 | 0.699999988079071 | | ? | ? | ? | ? | ? | ? | ? | +| 2640000 | 黒魔術師の帽子 | 0.699999988079071 | | ? | ? | ? | ? | ? | ? | ? | +| 1100 | Mスポット | 0.0 | | ? | ? | ? | ? | ? | ? | ? | + +## SPELLS / MIRACLES / PYROMANCIES + +| ID | Name | Type | Slots | Uses | MpCost | Duration | GuardModelPoint | +|---|---|---|---|---|---|---|---| +| 3740 | 【DLC】追う者たち | ? | ? | ? | ? | ? | ? | +| 3710 | 【DLC】闇の玉 | ? | ? | ? | ? | ? | ? | +| 3730 | 【DLC】闇の霧 | ? | ? | ? | ? | ? | ? | +| 3720 | 【DLC】闇の飛沫 | ? | ? | ? | ? | ? | ? | +| 4530 | 【DLC】黒炎 | ? | ? | ? | ? | ? | ? | +| 3400 | インビジブルウェポン | ? | ? | ? | ? | ? | ? | +| 13400 | インビジブルウェポン | ? | ? | ? | ? | ? | ? | +| 3410 | インビジブルボディ | ? | ? | ? | ? | ? | ? | +| 13410 | インビジブルボディ | ? | ? | ? | ? | ? | ? | +| 4510 | カオス_ファイアストーム | ? | ? | ? | ? | ? | ? | +| 14510 | カオス_ファイアストーム | ? | ? | ? | ? | ? | ? | +| 4500 | カオス_ファイアボール | ? | ? | ? | ? | ? | ? | +| 14500 | カオス_ファイアボール | ? | ? | ? | ? | ? | ? | +| 4520 | カオス炎のムチ | ? | ? | ? | ? | ? | ? | +| 14520 | カオス炎のムチ | ? | ? | ? | ? | ? | ? | +| 5800 | グラビティ | ? | ? | ? | ? | ? | ? | +| 15800 | グラビティ | ? | ? | ? | ? | ? | ? | +| 5050 | グレートリジェネ | ? | ? | ? | ? | ? | ? | +| 15050 | グレートリジェネ | ? | ? | ? | ? | ? | ? | +| 3510 | サイレンス | ? | ? | ? | ? | ? | ? | +| 13510 | サイレンス | ? | ? | ? | ? | ? | ? | +| 3520 | サウンド | ? | ? | ? | ? | ? | ? | +| 13520 | サウンド | ? | ? | ? | ? | ? | ? | +| 3020 | ソウルの太矢 | ? | ? | ? | ? | ? | ? | +| 13020 | ソウルの太矢 | ? | ? | ? | ? | ? | ? | +| 3060 | ソウルの槍 | ? | ? | ? | ? | ? | ? | +| 13060 | ソウルの槍 | ? | ? | ? | ? | ? | ? | +| 3000 | ソウルの矢 | ? | ? | ? | ? | ? | ? | +| 13000 | ソウルの矢 | ? | ? | ? | ? | ? | ? | +| 3070 | ソウルの結晶槍 | ? | ? | ? | ? | ? | ? | +| 13070 | ソウルの結晶槍 | ? | ? | ? | ? | ? | ? | +| 5400 | ヒント | ? | ? | ? | ? | ? | ? | +| 15400 | ヒント | ? | ? | ? | ? | ? | ? | +| 4030 | ファイアストーム | ? | ? | ? | ? | ? | ? | +| 14030 | ファイアストーム | ? | ? | ? | ? | ? | ? | +| 4040 | ファイアストーム2 | ? | ? | ? | ? | ? | ? | +| 14040 | ファイアストーム2 | ? | ? | ? | ? | ? | ? | +| 4000 | ファイアボール | ? | ? | ? | ? | ? | ? | +| 14000 | ファイアボール | ? | ? | ? | ? | ? | ? | +| 4010 | ファイアボール2 | ? | ? | ? | ? | ? | ? | +| 14010 | ファイアボール2 | ? | ? | ? | ? | ? | ? | +| 4020 | ファイアボール3 | ? | ? | ? | ? | ? | ? | +| 14020 | ファイアボール3 | ? | ? | ? | ? | ? | ? | +| 5300 | フォース1 | ? | ? | ? | ? | ? | ? | +| 15300 | フォース1 | ? | ? | ? | ? | ? | ? | +| 5310 | フォース2 | ? | ? | ? | ? | ? | ? | +| 15310 | フォース2 | ? | ? | ? | ? | ? | ? | +| 5320 | フォース3 | ? | ? | ? | ? | ? | ? | +| 15320 | フォース3 | ? | ? | ? | ? | ? | ? | +| 3540 | フォーリングコントロール | ? | ? | ? | ? | ? | ? | +| 13540 | フォーリングコントロール | ? | ? | ? | ? | ? | ? | +| 3500 | ライト | ? | ? | ? | ? | ? | ? | +| 13500 | ライト | ? | ? | ? | ? | ? | ? | +| 5040 | リジェネ | ? | ? | ? | ? | ? | ? | +| 15040 | リジェネ | ? | ? | ? | ? | ? | ? | +| 5200 | 一度きり復活 | ? | ? | ? | ? | ? | ? | +| 15200 | 一度きり復活 | ? | ? | ? | ? | ? | ? | +| 3530 | 修復 | ? | ? | ? | ? | ? | ? | +| 13530 | 修復 | ? | ? | ? | ? | ? | ? | +| 5810 | 反魔法領域 | ? | ? | ? | ? | ? | ? | +| 15810 | 反魔法領域 | ? | ? | ? | ? | ? | ? | +| 5100 | 召喚1 | ? | ? | ? | ? | ? | ? | +| 15100 | 召喚1 | ? | ? | ? | ? | ? | ? | +| 5110 | 召喚2 | ? | ? | ? | ? | ? | ? | +| 15110 | 召喚2 | ? | ? | ? | ? | ? | ? | +| 5000 | 回復1 | ? | ? | ? | ? | ? | ? | +| 15000 | 回復1 | ? | ? | ? | ? | ? | ? | +| 5010 | 回復2 | ? | ? | ? | ? | ? | ? | +| 15010 | 回復2 | ? | ? | ? | ? | ? | ? | +| 5020 | 回復3 | ? | ? | ? | ? | ? | ? | +| 15020 | 回復3 | ? | ? | ? | ? | ? | ? | +| 5030 | 回復4 | ? | ? | ? | ? | ? | ? | +| 15030 | 回復4 | ? | ? | ? | ? | ? | ? | +| 5700 | 因果応報 | ? | ? | ? | ? | ? | ? | +| 5710 | 因果応報 | ? | ? | ? | ? | ? | ? | +| 15700 | 因果応報 | ? | ? | ? | ? | ? | ? | +| 15710 | 因果応報 | ? | ? | ? | ? | ? | ? | +| 5900 | 太陽の剣 | ? | ? | ? | ? | ? | ? | +| 15900 | 太陽の剣 | ? | ? | ? | ? | ? | ? | +| 5210 | 帰還 | ? | ? | ? | ? | ? | ? | +| 15210 | 帰還 | ? | ? | ? | ? | ? | ? | +| 3030 | 強いソウルの太矢 | ? | ? | ? | ? | ? | ? | +| 13030 | 強いソウルの太矢 | ? | ? | ? | ? | ? | ? | +| 3010 | 強いソウルの矢 | ? | ? | ? | ? | ? | ? | +| 13010 | 強いソウルの矢 | ? | ? | ? | ? | ? | ? | +| 3550 | 擬態 | ? | ? | ? | ? | ? | ? | +| 13550 | 擬態 | ? | ? | ? | ? | ? | ? | +| 5910 | 月光の剣 | ? | ? | ? | ? | ? | ? | +| 15910 | 月光の剣 | ? | ? | ? | ? | ? | ? | +| 3100 | 武器魔法強化1 | ? | ? | ? | ? | ? | ? | +| 13100 | 武器魔法強化1 | ? | ? | ? | ? | ? | ? | +| 3110 | 武器魔法強化2 | ? | ? | ? | ? | ? | ? | +| 13110 | 武器魔法強化2 | ? | ? | ? | ? | ? | ? | +| 3120 | 武器魔法強化3 | ? | ? | ? | ? | ? | ? | +| 13120 | 武器魔法強化3 | ? | ? | ? | ? | ? | ? | +| 4200 | 毒の霧 | ? | ? | ? | ? | ? | ? | +| 14200 | 毒の霧 | ? | ? | ? | ? | ? | ? | +| 4310 | 水のヴェール | ? | ? | ? | ? | ? | ? | +| 14310 | 水のヴェール | ? | ? | ? | ? | ? | ? | +| 3610 | 治癒 | ? | ? | ? | ? | ? | ? | +| 13610 | 治癒 | ? | ? | ? | ? | ? | ? | +| 4050 | 火炎放射 | ? | ? | ? | ? | ? | ? | +| 14050 | 火炎放射 | ? | ? | ? | ? | ? | ? | +| 4060 | 炎のムチ | ? | ? | ? | ? | ? | ? | +| 14060 | 炎のムチ | ? | ? | ? | ? | ? | ? | +| 4400 | 狂気の力 | ? | ? | ? | ? | ? | ? | +| 14400 | 狂気の力 | ? | ? | ? | ? | ? | ? | +| 4210 | 猛毒の霧 | ? | ? | ? | ? | ? | ? | +| 14210 | 猛毒の霧 | ? | ? | ? | ? | ? | ? | +| 3300 | 盾強化1 | ? | ? | ? | ? | ? | ? | +| 13300 | 盾強化1 | ? | ? | ? | ? | ? | ? | +| 3310 | 盾強化2 | ? | ? | ? | ? | ? | ? | +| 13310 | 盾強化2 | ? | ? | ? | ? | ? | ? | +| 3700 | 結晶ビーム | ? | ? | ? | ? | ? | ? | +| 13700 | 結晶ビーム | ? | ? | ? | ? | ? | ? | +| 3600 | 解呪 | ? | ? | ? | ? | ? | ? | +| 13600 | 解呪 | ? | ? | ? | ? | ? | ? | +| 4100 | 近接炎1 | ? | ? | ? | ? | ? | ? | +| 14100 | 近接炎1 | ? | ? | ? | ? | ? | ? | +| 4110 | 近接炎2 | ? | ? | ? | ? | ? | ? | +| 14110 | 近接炎2 | ? | ? | ? | ? | ? | ? | +| 3040 | 追尾するソウルの塊 | ? | ? | ? | ? | ? | ? | +| 13040 | 追尾するソウルの塊 | ? | ? | ? | ? | ? | ? | +| 3050 | 追尾するソウルの結晶塊 | ? | ? | ? | ? | ? | ? | +| 13050 | 追尾するソウルの結晶塊 | ? | ? | ? | ? | ? | ? | +| 4220 | 酸の霧 | ? | ? | ? | ? | ? | ? | +| 14220 | 酸の霧 | ? | ? | ? | ? | ? | ? | +| 4300 | 鉄の体 | ? | ? | ? | ? | ? | ? | +| 14300 | 鉄の体 | ? | ? | ? | ? | ? | ? | +| 5500 | 雷1 | ? | ? | ? | ? | ? | ? | +| 15500 | 雷1 | ? | ? | ? | ? | ? | ? | +| 5510 | 雷2 | ? | ? | ? | ? | ? | ? | +| 15510 | 雷2 | ? | ? | ? | ? | ? | ? | +| 5520 | 雷3 | ? | ? | ? | ? | ? | ? | +| 15520 | 雷3 | ? | ? | ? | ? | ? | ? | +| 4360 | 魅了 | ? | ? | ? | ? | ? | ? | +| 14360 | 魅了 | ? | ? | ? | ? | ? | ? | +| 5600 | 魔法防護1 | ? | ? | ? | ? | ? | ? | +| 15600 | 魔法防護1 | ? | ? | ? | ? | ? | ? | +| 5610 | 魔法防護2 | ? | ? | ? | ? | ? | ? | +| 15610 | 魔法防護2 | ? | ? | ? | ? | ? | ? | + +### Force / Homeward — Duration & key fields + +## GOODS (Consumables / Ammo / Items) + +| ID | Name | Type | Weight | MaxNum | SellPrice | +|---|---|---|---|---|---| +| 139 | Chaos Servant | | | ? | ? | +| 138 | Darkmoon Blade | | | ? | ? | +| 134 | Darkwraith | | | ? | ? | +| 3000 | EN弾A | 5 | | ? | ? | +| 3010 | EN弾A2 | 5 | | ? | ? | +| 3020 | EN弾B | 5 | | ? | ? | +| 3030 | EN弾B2 | 5 | | ? | ? | +| 3040 | EN弾C | 5 | | ? | ? | +| 3050 | EN弾C2 | 5 | | ? | ? | +| 3060 | EN弾D | 5 | | ? | ? | +| 3070 | EN弾D2 | 5 | | ? | ? | +| 137 | Forest Hunter | | | ? | ? | +| 136 | Gravelord Servant | | | ? | ? | +| 115 | NPC侵入アイテムA | | | ? | ? | +| 116 | NPC侵入アイテムB | | | ? | ? | +| 130 | None | | | ? | ? | +| 135 | Path of the Dragon | | | ? | ? | +| 132 | Princess's Guard | | | ? | ? | +| 133 | Warrior of Sunlight | | | ? | ? | +| 131 | Way of White | | | ? | ? | +| 140 | dummy10 | | | ? | ? | +| 141 | dummy11 | | | ? | ? | +| 142 | dummy12 | | | ? | ? | +| 143 | dummy13 | | | ? | ? | +| 144 | dummy14 | | | ? | ? | +| 145 | dummy15 | | | ? | ? | +| 710 | 【DLC】アルトリウスのソウル | | | ? | ? | +| 230 | 【DLC】エリンギの欠片 | | | ? | ? | +| 510 | 【DLC】ゴーのしゃべる石A | | | ? | ? | +| 511 | 【DLC】ゴーのしゃべる石B | | | ? | ? | +| 512 | 【DLC】ゴーのしゃべる石C | | | ? | ? | +| 513 | 【DLC】ゴーのしゃべる石D | | | ? | ? | +| 514 | 【DLC】ゴーのしゃべる石E | | | ? | ? | +| 2022 | 【DLC】ゴーを助ける鍵 | 1 | | ? | ? | +| 711 | 【DLC】深淵の主のソウル | | | ? | ? | +| 118 | 【DLC】臆病者の紫水晶 | | | ? | ? | +| 3740 | 【DLC】追う者たち | 5 | | ? | ? | +| 709 | 【DLC】金キメラのソウル | | | ? | ? | +| 3710 | 【DLC】闇の玉 | 5 | | ? | ? | +| 3730 | 【DLC】闇の霧 | 5 | | ? | ? | +| 3720 | 【DLC】闇の飛沫 | 5 | | ? | ? | +| 220 | 【DLC】闇フォース | | | ? | ? | +| 4530 | 【DLC】黒炎 | 5 | | ? | ? | +| 9011 | さあ!どうした! | | | ? | ? | +| 111 | ひび割れた赤い瞳 | | | ? | ? | +| 294 | またたびA | | | ? | ? | +| 2604 | アイテム売却メニュー アンロック | 1 | | ? | ? | +| 2002 | アルトリウスの紋章 | 1 | | ? | ? | +| 3400 | インビジブルウェポン | 5 | | ? | ? | +| 3410 | インビジブルボディ | 5 | | ? | ? | +| 9002 | エイエイオー | | | ? | ? | +| 200 | エストビン(HP)1_空 | | | ? | ? | +| 201 | エストビン(HP)1_補充 | | | ? | ? | +| 202 | エストビン(HP)2_空 | | | ? | ? | +| 203 | エストビン(HP)2_補充 | | | ? | ? | +| 204 | エストビン(HP)3_空 | | | ? | ? | +| 205 | エストビン(HP)3_補充 | | | ? | ? | +| 206 | エストビン(HP)4_空 | | | ? | ? | +| 207 | エストビン(HP)4_補充 | | | ? | ? | +| 208 | エストビン(HP)5_空 | | | ? | ? | +| 209 | エストビン(HP)5_補充 | | | ? | ? | +| 210 | エストビン(HP)6_空 | | | ? | ? | +| 211 | エストビン(HP)6_補充 | | | ? | ? | +| 212 | エストビン(HP)7_空 | | | ? | ? | +| 213 | エストビン(HP)7_補充 | | | ? | ? | +| 214 | エストビン(HP)8_空 | | | ? | ? | +| 215 | エストビン(HP)8_補充 | | | ? | ? | +| 296 | エスト使用不可 | | | ? | ? | +| 240 | エリクサー | | | ? | ? | +| 4510 | カオス_ファイアストーム | 5 | | ? | ? | +| 4500 | カオス_ファイアボール | 5 | | ? | ? | +| 4520 | カオス炎のムチ | 5 | | ? | ? | +| 5800 | グラビティ | 5 | | ? | ? | +| 5050 | グレートリジェネ | 5 | | ? | ? | +| 703 | ゴーレムのソウル | | | ? | ? | +| 3510 | サイレンス | 5 | | ? | ? | +| 3520 | サウンド | 5 | | ? | ? | +| 260 | スタミナ草 | | | ? | ? | +| 400 | ソウル1 | | | ? | ? | +| 409 | ソウル10 | | | ? | ? | +| 401 | ソウル2 | | | ? | ? | +| 402 | ソウル3 | | | ? | ? | +| 403 | ソウル4 | | | ? | ? | +| 404 | ソウル5 | | | ? | ? | +| 405 | ソウル6 | | | ? | ? | +| 406 | ソウル7 | | | ? | ? | +| 407 | ソウル8 | | | ? | ? | +| 408 | ソウル9 | | | ? | ? | +| 117 | ダークリング | | | ? | ? | +| 2500 | デーモンの火1 | 1 | | ? | ? | +| 2501 | デーモンの火2 | 1 | | ? | ? | +| 2502 | デーモンの火3 | 1 | | ? | ? | +| 2503 | デーモンの火4 | 1 | | ? | ? | +| 2504 | デーモンの火5 | 1 | | ? | ? | +| 1120 | デーモン武器強化素材 | 2 | | ? | ? | +| 5400 | ヒント | 5 | | ? | ? | +| 4030 | ファイアストーム | 5 | | ? | ? | +| 4040 | ファイアストーム2 | 5 | | ? | ? | +| 4000 | ファイアボール | 5 | | ? | ? | +| 4010 | ファイアボール2 | 5 | | ? | ? | +| 4020 | ファイアボール3 | 5 | | ? | ? | +| 5300 | フォース1 | 5 | | ? | ? | +| 5310 | フォース2 | 5 | | ? | ? | +| 5320 | フォース3 | 5 | | ? | ? | +| 3540 | フォーリングコントロール | 5 | | ? | ? | +| 500 | ベイグラント人間性1 | | | ? | ? | +| 501 | ベイグラント人間性2 | | | ? | ? | +| 3500 | ライト | 5 | | ? | ? | +| 108 | ランキング閲覧A | | | ? | ? | +| 112 | ランキング閲覧B | | | ? | ? | +| 5040 | リジェネ | 5 | | ? | ? | +| 2606 | レベルアップメニュー アンロック | 1 | | ? | ? | +| 2605 | ワープメニュー アンロック | 1 | | ? | ? | +| 5200 | 一度きり復活 | 5 | | ? | ? | +| 9003 | 一礼 | | | ? | ? | +| 9013 | 丁寧な一例 | | | ? | ? | +| 2100 | 万能鍵 | 1 | | ? | ? | +| 9008 | 上を指差す | | | ? | ? | +| 800 | 上級転職解放 | 1 | | ? | ? | +| 9009 | 下を指差す | | | ? | ? | +| 2018 | 下層部屋の鍵 | 1 | | ? | ? | +| 2014 | 不死街下層の鍵 | 1 | | ? | ? | +| 2019 | 不死街塔の鍵 | 1 | | ? | ? | +| 2016 | 不死院の鍵 | 1 | | ? | ? | +| 2012 | 不死院二階の鍵 | 1 | | ? | ? | +| 2609 | 予備メニュー アンロック | 1 | | ? | ? | +| 350 | 人間性のかけら | 4 | | ? | ? | +| 2607 | 人間性を捧げるメニュー アンロック | 1 | | ? | ? | +| 370 | 便利石 | | | ? | ? | +| 3530 | 修復 | 5 | | ? | ? | +| 2608 | 倉庫メニュー アンロック | 1 | | ? | ? | +| 706 | 処刑者スモウのソウル | | | ? | ? | +| 270 | 出血治療 | | | ? | ? | +| 9001 | 前を指さす | | | ? | ? | +| 707 | 半竜プリシラのソウル | | | ? | ? | +| 275 | 卵治療 | | | ? | ? | +| 5810 | 反魔法領域 | 5 | | ? | ? | +| 5100 | 召喚1 | 5 | | ? | ? | +| 5110 | 召喚2 | 5 | | ? | ? | +| 9005 | 呆れる | | | ? | ? | +| 274 | 呪治療 | | | ? | ? | +| 5000 | 回復1 | 5 | | ? | ? | +| 5010 | 回復2 | 5 | | ? | ? | +| 5020 | 回復3 | 5 | | ? | ? | +| 5030 | 回復4 | 5 | | ? | ? | +| 5700 | 因果応報 | 5 | | ? | ? | +| 9012 | 土下座 | | | ? | ? | +| 2015 | 地下リフトの鍵 | 1 | | ? | ? | +| 2010 | 地下牢の鍵 | 1 | | ? | ? | +| 109 | 墓王の瞳 | | | ? | ? | +| 2006 | 大牢屋の鍵 | 1 | | ? | ? | +| 702 | 大王グウィンのソウル | | | ? | ? | +| 9010 | 天を仰ぐ | | | ? | ? | +| 5900 | 太陽の剣 | 5 | | ? | ? | +| 375 | 太陽の友情の証 | | | ? | ? | +| 9007 | 太陽賛美 | | | ? | ? | +| 2009 | 家屋の鍵 | 1 | | ? | ? | +| 2013 | 封印の鍵 | 1 | | ? | ? | +| 2008 | 小ロンド遺跡の鍵 | 1 | | ? | ? | +| 2011 | 巡礼者の大鍵 | 1 | | ? | ? | +| 5210 | 帰還 | 5 | | ? | ? | +| 330 | 帰還石 | | | ? | ? | +| 385 | 干からびた指 | | | ? | ? | +| 376 | 形見のブローチ | | | ? | ? | +| 374 | 復讐の証 | | | ? | ? | +| 9006 | 手をふる | | | ? | ? | +| 9000 | 手招き | | | ? | ? | +| 290 | 投げナイフ | | | ? | ? | +| 3550 | 擬態 | 5 | | ? | ? | +| 2017 | 教会牢の鍵 | 1 | | ? | ? | +| 810 | 暗黒転職解放 | 1 | | ? | ? | +| 2005 | 書庫の鍵 | 1 | | ? | ? | +| 2020 | 書庫塔牢屋の別鍵 | 1 | | ? | ? | +| 801 | 最上級転職解放 | 1 | | ? | ? | +| 5910 | 月光の剣 | 5 | | ? | ? | +| 705 | 月光蝶のソウル | | | ? | ? | +| 106 | 橙チョーク | | | ? | ? | +| 9004 | 歓喜 | | | ? | ? | +| 280 | 武器修理 | | | ? | ? | +| 312 | 武器対霊強化 | | | ? | ? | +| 2600 | 武器強化メニュー アンロック | 1 | | ? | ? | +| 313 | 武器毒化 | | | ? | ? | +| 310 | 武器炎強化 | | | ? | ? | +| 311 | 武器雷強化 | | | ? | ? | +| 3100 | 武器魔法強化1 | 5 | | ? | ? | +| 3110 | 武器魔法強化2 | 5 | | ? | ? | +| 3120 | 武器魔法強化3 | 5 | | ? | ? | +| 4200 | 毒の霧 | 5 | | ? | ? | +| 291 | 毒投げナイフ | | | ? | ? | +| 271 | 毒治療 | | | ? | ? | +| 2021 | 民家の鍵 | 1 | | ? | ? | +| 4310 | 水のヴェール | 5 | | ? | ? | +| 3610 | 治癒 | 5 | | ? | ? | +| 2520 | 深淵の宝 | 1 | | ? | ? | +| 700 | 混沌の娘クラーグのソウル | | | ? | ? | +| 813 | 混沌の炎転職解放 | 1 | | ? | ? | +| 391 | 火の防人のソウルB | | | ? | ? | +| 392 | 火の防人のソウルC | | | ? | ? | +| 393 | 火の防人のソウルD | | | ? | ? | +| 394 | 火の防人のソウルE | | | ? | ? | +| 395 | 火の防人のソウルF | | | ? | ? | +| 396 | 火の防人のソウルG | | | ? | ? | +| 292 | 火炎壷 | | | ? | ? | +| 4050 | 火炎放射 | 5 | | ? | ? | +| 390 | 灰色の聖女の人間性 | | | ? | ? | +| 4060 | 炎のムチ | 5 | | ? | ? | +| 812 | 炎上級転職解放 | 1 | | ? | ? | +| 2004 | 牢屋の鍵 | 1 | | ? | ? | +| 1130 | 特殊強化素材 | 2 | | ? | ? | +| 4400 | 狂気の力 | 5 | | ? | ? | +| 4210 | 猛毒の霧 | 5 | | ? | ? | +| 272 | 猛毒治療 | | | ? | ? | +| 2510 | 王の器 | 1 | | ? | ? | +| 2007 | 病み村の鍵 | 1 | | ? | ? | +| 100 | 白チョーク | | | ? | ? | +| 3300 | 盾強化1 | 5 | | ? | ? | +| 3310 | 盾強化2 | 5 | | ? | ? | +| 9014 | 祈り | | | ? | ? | +| 809 | 神聖上級転職解放 | 1 | | ? | ? | +| 808 | 神聖転職解放 | 1 | | ? | ? | +| 1110 | 竜のうろこ | 2 | | ? | ? | +| 114 | 竜の瞳 | | | ? | ? | +| 378 | 竜変身(全身) | | | ? | ? | +| 377 | 竜変身(頭) | | | ? | ? | +| 2003 | 籠牢の鍵 | 1 | | ? | ? | +| 293 | 糞団子 | | | ? | ? | +| 1080 | 素材I | 2 | | ? | ? | +| 1000 | 素材A | 2 | | ? | ? | +| 1010 | 素材B | 2 | | ? | ? | +| 1020 | 素材C | 2 | | ? | ? | +| 1030 | 素材D | 2 | | ? | ? | +| 1040 | 素材E | 2 | | ? | ? | +| 1050 | 素材F | 2 | | ? | ? | +| 1060 | 素材G | 2 | | ? | ? | +| 1070 | 素材H | 2 | | ? | ? | +| 1090 | 素材J | 2 | | ? | ? | +| 1100 | 素材K | 2 | | ? | ? | +| 101 | 紫チョーク | | | ? | ? | +| 3700 | 結晶ビーム | 5 | | ? | ? | +| 802 | 結晶転職解放 | 1 | | ? | ? | +| 2602 | 装備修理メニュー アンロック | 1 | | ? | ? | +| 3600 | 解呪 | 5 | | ? | ? | +| 373 | 賞金首登録アイテム | | | ? | ? | +| 102 | 赤い瞳 | | | ? | ? | +| 4100 | 近接炎1 | 5 | | ? | ? | +| 4110 | 近接炎2 | 5 | | ? | ? | +| 371 | 遠眼鏡 | | | ? | ? | +| 4220 | 酸の霧 | 5 | | ? | ? | +| 380 | 金品1 | | | ? | ? | +| 381 | 金品2 | | | ? | ? | +| 382 | 金品3 | | | ? | ? | +| 383 | 金品4 | | | ? | ? | +| 384 | 金品5 | 1 | | ? | ? | +| 4300 | 鉄の体 | 5 | | ? | ? | +| 2001 | 鉄格子の鍵 | 1 | | ? | ? | +| 2200 | 鍛冶屋の好物 | 1 | | ? | ? | +| 2601 | 防具強化メニュー アンロック | 1 | | ? | ? | +| 708 | 陰の太陽グウィンドリンのソウル | | | ? | ? | +| 5500 | 雷1 | 5 | | ? | ? | +| 5510 | 雷2 | 5 | | ? | ? | +| 5520 | 雷3 | 5 | | ? | ? | +| 113 | 青い瞳 | | | ? | ? | +| 701 | 騎士アルトリウスのソウル | | | ? | ? | +| 704 | 騎士ロードリクのソウル | | | ? | ? | +| 4360 | 魅了 | 5 | | ? | ? | +| 806 | 魔法上級A転職解放 | 1 | | ? | ? | +| 807 | 魔法上級B転職解放 | 1 | | ? | ? | +| 2603 | 魔法装備メニュー アンロック | 1 | | ? | ? | +| 5600 | 魔法防護1 | 5 | | ? | ? | +| 5610 | 魔法防護2 | 5 | | ? | ? | +| 103 | 黒水晶 | | | ? | ? | +| 297 | 黒火炎壺 | | | ? | ? | + +### Ammo — Weight / Stack Limit / Damage + +### Estus Flask & Estus Shard + +## BOSSES / ENEMIES + +### Bosses — HP, Souls, Resistances +| ID | Name | HP | Souls | PoisonRes | BleedRes | CurseRes | PoiseHP | +|---|---|---|---|---|---|---|---| +| 801 | チュートリアル_デブデーモン | ? | ? | ? | ? | ? | ? | +| 1810810 | チュートリアル_デブデーモン | ? | ? | ? | ? | ? | ? | +| 1810800 | チュートリアル_ミニデブデーモン | ? | ? | ? | ? | ? | ? | +| 0 | テスト | ? | ? | ? | ? | ? | ? | +| 1 | テスト1 | ? | ? | ? | ? | ? | ? | +| 500 | 不浄1_蛭デーモン | ? | ? | ? | ? | ? | ? | +| 501 | 不浄2_蠅たかり | ? | ? | ? | ? | ? | ? | +| 502 | 不浄3_聖女リーブラ | ? | ? | ? | ? | ? | ? | +| 301 | 古砦1_審判者 | ? | ? | ? | ? | ? | ? | +| 302 | 古砦2_嵐の戦士 | ? | ? | ? | ? | ? | ? | +| 303 | 古砦3_嵐の獣 | ? | ? | ? | ? | ? | ? | +| 600 | 坑道1_大蜘蛛 | ? | ? | ? | ? | ? | ? | +| 601 | 坑道2_炎怪人 | ? | ? | ? | ? | ? | ? | +| 602 | 坑道3_ドラゴンデーモン(坑道) | ? | ? | ? | ? | ? | ? | +| 1010800 | 城下1_ガーゴイル | ? | ? | ? | ? | ? | ? | +| 1010750 | 城下1_ナタデーモン | ? | ? | ? | ? | ? | ? | +| 1010700 | 城下1_ハンマーデーモン | ? | ? | ? | ? | ? | ? | +| 1000800 | 城下2_貪食ドラゴン | ? | ? | ? | ? | ? | ? | +| 1300800 | 墓地1_三人羽織 | ? | ? | ? | ? | ? | ? | +| 1310800 | 墓地2_墓王ニト | ? | ? | ? | ? | ? | ? | +| 1800800 | 大墓_薪の王 | ? | ? | ? | ? | ? | ? | +| 1410800 | 廃都_キングイザリス | ? | ? | ? | ? | ? | ? | +| 1410400 | 廃都_デブデーモン | ? | ? | ? | ? | ? | ? | +| 1410700 | 廃都_ムカデーモン | ? | ? | ? | ? | ? | ? | +| 1410600 | 廃都_爛れ続けるもの | ? | ? | ? | ? | ? | ? | +| 1400800 | 影町_焔の魔女クラグスパイダー | ? | ? | ? | ? | ? | ? | +| 1200801 | 森庭_カゲロウ龍 | ? | ? | ? | ? | ? | ? | +| 1200800 | 森庭_聖剣の狼 | ? | ? | ? | ? | ? | ? | +| 1600800 | 深淵_ジャイールデーモン | ? | ? | ? | ? | ? | ? | +| 400 | 牢城1_カミサマ | ? | ? | ? | ? | ? | ? | +| 401 | 牢城2_キメラ | ? | ? | ? | ? | ? | ? | +| 402 | 牢城3_召喚NPC | ? | ? | ? | ? | ? | ? | +| 1500800 | 王城1_アイアンゴーレム | ? | ? | ? | ? | ? | ? | +| 200 | 王城1_ファランクス(本体) | ? | ? | ? | ? | ? | ? | +| 1510801 | 王城2_ヒュージグリフィス | ? | ? | ? | ? | ? | ? | +| 1510811 | 王城2_ライトニングスモウ | ? | ? | ? | ? | ? | ? | +| 201 | 王城2_王の盾 | ? | ? | ? | ? | ? | ? | +| 1510650 | 王城2_王母弟 | ? | ? | ? | ? | ? | ? | +| 202 | 王城3_王の剣 | ? | ? | ? | ? | ? | ? | +| 203 | 王城4_レンドル王 | ? | ? | ? | ? | ? | ? | +| 100 | 石柱_なりそこない | ? | ? | ? | ? | ? | ? | +| 1700800 | 結晶塔_シース | ? | ? | ? | ? | ? | ? | +| 1100160 | 絵画世界_半竜プリシラ | ? | ? | ? | ? | ? | ? | +| 1210820 | 過去森_アルトリウス | ? | ? | ? | ? | ? | ? | +| 1210840 | 過去森_深淵の主 | ? | ? | ? | ? | ? | ? | +| 1210800 | 過去森_金キメラ | ? | ? | ? | ? | ? | ? | +| 1210401 | 過去森_黒竜 | ? | ? | ? | ? | ? | ? | + +### Boss Focus: Bell Gargoyles, O&S, Sif, Firesage, Sanctuary Guardian, Quelaag + +### All Characters — Poise & Curse Resistance +| ID | Name | Poise | CurseRes | HP | DefPhys | +|---|---|---|---|---|---| +| 520 | DS2Test 川上用 | ? | ? | ? | ? | +| 522 | DS2Test 川上用2 | ? | ? | ? | ? | +| 521 | DS2Test 川上用味方 | ? | ? | ? | ? | +| 540 | DS2テスト 渡辺用 | ? | ? | ? | ? | +| 541 | DS2テスト 渡辺用予備 | ? | ? | ? | ? | +| 550 | DS2テスト 自動テスト用徘徊 (渡辺管理) | ? | ? | ? | ? | +| 551 | DS2テスト 自動テスト用徘徊予備 (渡辺管理) | ? | ? | ? | ? | +| 1003 | DS2 4末〆 門を閉めるNPC | ? | ? | ? | ? | +| 1000 | DS2 帰巣テスト 騎士_剣 | ? | ? | ? | ? | +| 500 | DS2プロト ハシゴが大好きな騎士 | ? | ? | ? | ? | +| 501 | DS2プロト 仲間を助けるデカ獄吏 | ? | ? | ? | ? | +| 10100 | NPC会話テスト1 (壺に化けるNPC) | ? | ? | ? | ? | +| 10101 | NPC会話テスト2 | ? | ? | ? | ? | +| 6030 | ”ビッグハット”ロガーン 王城1〜拠点 | ? | ? | ? | ? | +| 6031 | ”ビッグハット”ロガーン 結晶 | ? | ? | ? | ? | +| 6032 | ”ビッグハット”ロガーン 結晶 亡者 | ? | ? | ? | ? | +| 1 | あたりさわりのないデータ(コピペ元推奨) | ? | ? | ? | ? | +| 6170 | さまよう混沌 | ? | ? | ? | ? | +| 6284 | たまねぎ騎士 廃都 | ? | ? | ? | ? | +| 6283 | たまねぎ騎士 影町 | ? | ? | ? | ? | +| 6282 | たまねぎ騎士 拠点 | ? | ? | ? | ? | +| 6280 | たまねぎ騎士 王城1 | ? | ? | ? | ? | +| 6281 | たまねぎ騎士 王城2 | ? | ? | ? | ? | +| 6291 | たまねぎ騎士の娘 地底湖 | ? | ? | ? | ? | +| 6290 | たまねぎ騎士の娘 結晶〜拠点 | ? | ? | ? | ? | +| 410000 | アルトリウス | ? | ? | ? | ? | +| 414000 | エリンギ | ? | ? | ? | ? | +| 6740 | キアラン | ? | ? | ? | ? | +| 523100 | キングイザリス(第三形態) | ? | ? | ? | ? | +| 6620 | クラーグの姉妹 | ? | ? | ? | ? | +| 511 | スケルトン_曲剣パリィ | ? | ? | ? | ? | +| 409000 | スナイパーA | ? | ? | ? | ? | +| 409010 | スナイパーA(侵入) | ? | ? | ? | ? | +| 223200 | チュート ミニデブデーモン | ? | ? | ? | ? | +| 250022 | チュート 不死人 | ? | ? | ? | ? | +| 250021 | チュート 不死人(弓) | ? | ? | ? | ? | +| 250020 | チュート 不死人(武器なし) | ? | ? | ? | ? | +| 255030 | チュート 不死人(重戦士・ロングソード) | ? | ? | ? | ? | +| 7240 | チュートリアル_ベイグラントNPC_持たざるもの | ? | ? | ? | ? | +| 6810 | チュートリアルの囚人1 | ? | ? | ? | ? | +| 6811 | チュートリアルの囚人2 | ? | ? | ? | ? | +| 6560 | トゲ騎士 城下2 NPCマルチ侵入 | ? | ? | ? | ? | +| 6561 | トゲ騎士 廃都前半 NPCマルチ侵入 | ? | ? | ? | ? | +| 6562 | トゲ騎士 廃都後半 NPCマルチ侵入 | ? | ? | ? | ? | +| 6260 | トリックスター | ? | ? | ? | ? | +| 6370 | ドラゴンの神官 | ? | ? | ? | ? | +| 342001 | ドラゴンゾンビ | ? | ? | ? | ? | +| 6400 | ベルカ騎士 | ? | ? | ? | ? | +| 349009 | レベル10 ドリフトアイテム 2段階目 | ? | ? | ? | ? | +| 349059 | レベル10 ドリフトアイテム 3段階目(ソウルブラック) | ? | ? | ? | ? | +| 349109 | レベル10 ドリフト人間性 1段階目 | ? | ? | ? | ? | +| 349209 | レベル10 ドリフト人間性 2段階目(ソウルブラック) | ? | ? | ? | ? | +| 349010 | レベル11 ドリフトアイテム 2段階目 | ? | ? | ? | ? | +| 349060 | レベル11 ドリフトアイテム 3段階目(ソウルブラック) | ? | ? | ? | ? | +| 349110 | レベル11 ドリフト人間性 1段階目 | ? | ? | ? | ? | +| 349210 | レベル11 ドリフト人間性 2段階目(ソウルブラック) | ? | ? | ? | ? | +| 349011 | レベル12 ドリフトアイテム 2段階目 | ? | ? | ? | ? | +| 349061 | レベル12 ドリフトアイテム 3段階目(ソウルブラック) | ? | ? | ? | ? | +| 349111 | レベル12 ドリフト人間性 1段階目 | ? | ? | ? | ? | +| 349211 | レベル12 ドリフト人間性 2段階目(ソウルブラック) | ? | ? | ? | ? | +| 349012 | レベル13 ドリフトアイテム 2段階目 | ? | ? | ? | ? | +| 349062 | レベル13 ドリフトアイテム 3段階目(ソウルブラック) | ? | ? | ? | ? | +| 349112 | レベル13 ドリフト人間性 1段階目 | ? | ? | ? | ? | +| 349212 | レベル13 ドリフト人間性 2段階目(ソウルブラック) | ? | ? | ? | ? | +| 349013 | レベル14 ドリフトアイテム 2段階目 | ? | ? | ? | ? | +| 349063 | レベル14 ドリフトアイテム 3段階目(ソウルブラック) | ? | ? | ? | ? | +| 349113 | レベル14 ドリフト人間性 1段階目 | ? | ? | ? | ? | +| 349213 | レベル14 ドリフト人間性 2段階目(ソウルブラック) | ? | ? | ? | ? | +| 349014 | レベル15 ドリフトアイテム 2段階目 | ? | ? | ? | ? | +| 349064 | レベル15 ドリフトアイテム 3段階目(ソウルブラック) | ? | ? | ? | ? | +| 349114 | レベル15 ドリフト人間性 1段階目 | ? | ? | ? | ? | +| 349214 | レベル15 ドリフト人間性 2段階目(ソウルブラック) | ? | ? | ? | ? | +| 349000 | レベル1 ドリフトアイテム 2段階目 | ? | ? | ? | ? | +| 349050 | レベル1 ドリフトアイテム 3段階目(ソウルブラック) | ? | ? | ? | ? | +| 349100 | レベル1 ドリフト人間性 1段階目 | ? | ? | ? | ? | +| 349200 | レベル1 ドリフト人間性 2段階目(ソウルブラック) | ? | ? | ? | ? | +| 349001 | レベル2 ドリフトアイテム 2段階目 | ? | ? | ? | ? | +| 349051 | レベル2 ドリフトアイテム 3段階目(ソウルブラック) | ? | ? | ? | ? | +| 349101 | レベル2 ドリフト人間性 1段階目 | ? | ? | ? | ? | +| 349201 | レベル2 ドリフト人間性 2段階目(ソウルブラック) | ? | ? | ? | ? | +| 349002 | レベル3 ドリフトアイテム 2段階目 | ? | ? | ? | ? | +| 349052 | レベル3 ドリフトアイテム 3段階目(ソウルブラック) | ? | ? | ? | ? | +| 349102 | レベル3 ドリフト人間性 1段階目 | ? | ? | ? | ? | +| 349202 | レベル3 ドリフト人間性 2段階目(ソウルブラック) | ? | ? | ? | ? | +| 349003 | レベル4 ドリフトアイテム 2段階目 | ? | ? | ? | ? | +| 349053 | レベル4 ドリフトアイテム 3段階目(ソウルブラック) | ? | ? | ? | ? | +| 349103 | レベル4 ドリフト人間性 1段階目 | ? | ? | ? | ? | +| 349203 | レベル4 ドリフト人間性 2段階目(ソウルブラック) | ? | ? | ? | ? | +| 349004 | レベル5 ドリフトアイテム 2段階目 | ? | ? | ? | ? | +| 349054 | レベル5 ドリフトアイテム 3段階目(ソウルブラック) | ? | ? | ? | ? | +| 349104 | レベル5 ドリフト人間性 1段階目 | ? | ? | ? | ? | +| 349204 | レベル5 ドリフト人間性 2段階目(ソウルブラック) | ? | ? | ? | ? | +| 349005 | レベル6 ドリフトアイテム 2段階目 | ? | ? | ? | ? | +| 349055 | レベル6 ドリフトアイテム 3段階目(ソウルブラック) | ? | ? | ? | ? | +| 349105 | レベル6 ドリフト人間性 1段階目 | ? | ? | ? | ? | +| 349205 | レベル6 ドリフト人間性 2段階目(ソウルブラック) | ? | ? | ? | ? | +| 349006 | レベル7 ドリフトアイテム 2段階目 | ? | ? | ? | ? | +| 349056 | レベル7 ドリフトアイテム 3段階目(ソウルブラック) | ? | ? | ? | ? | +| 349106 | レベル7 ドリフト人間性 1段階目 | ? | ? | ? | ? | +| 349206 | レベル7 ドリフト人間性 2段階目(ソウルブラック) | ? | ? | ? | ? | +| 349007 | レベル8 ドリフトアイテム 2段階目 | ? | ? | ? | ? | +| 349057 | レベル8 ドリフトアイテム 3段階目(ソウルブラック) | ? | ? | ? | ? | +| 349107 | レベル8 ドリフト人間性 1段階目 | ? | ? | ? | ? | +| 349207 | レベル8 ドリフト人間性 2段階目(ソウルブラック) | ? | ? | ? | ? | +| 349008 | レベル9 ドリフトアイテム 2段階目 | ? | ? | ? | ? | +| 349058 | レベル9 ドリフトアイテム 3段階目(ソウルブラック) | ? | ? | ? | ? | +| 349108 | レベル9 ドリフト人間性 1段階目 | ? | ? | ? | ? | +| 349208 | レベル9 ドリフト人間性 2段階目(ソウルブラック) | ? | ? | ? | ? | +| 6040 | ロガーンの弟子 城下1〜拠点 | ? | ? | ? | ? | +| 6041 | ロガーンの弟子 王城1 亡者 | ? | ? | ? | ? | +| 6490 | ロートレクのお供1 | ? | ? | ? | ? | +| 6500 | ロートレクのお供2 | ? | ? | ? | ? | +| 352000 | ワイバーン | ? | ? | ? | ? | +| 514 | ワイバーン・鳥制御 | ? | ? | ? | ? | +| 293002 | 不死院 スケルトン(車輪 ソウルブラック) | ? | ? | ? | ? | +| 293001 | 不死院 スケルトン(車輪) | ? | ? | ? | ? | +| 342000 | 不死院 ドラゴンゾンビ | ? | ? | ? | ? | +| 342100 | 不死院 ドラゴンゾンビ(下半身) | ? | ? | ? | ? | +| 342200 | 不死院 ドラゴンゾンビ(翼) | ? | ? | ? | ? | +| 273000 | 不死院 ヒロイン | ? | ? | ? | ? | +| 273100 | 不死院 ヒロインの尻尾 | ? | ? | ? | ? | +| 250010 | 不死院 不死人 | ? | ? | ? | ? | +| 283010 | 不死院 不死人ファランクス | ? | ? | ? | ? | +| 250011 | 不死院 不死人(たいまつ) | ? | ? | ? | ? | +| 250012 | 不死院 不死人(弓) | ? | ? | ? | ? | +| 257021 | 不死院 不死人(重騎士・大メイス) | ? | ? | ? | ? | +| 257022 | 不死院 不死人(重騎士・大剣 ソウルブラック) | ? | ? | ? | ? | +| 257020 | 不死院 不死人(重騎士・大剣) | ? | ? | ? | ? | +| 284003 | 不死院 不死人(鬱血・たいまつ ソウルブラック) | ? | ? | ? | ? | +| 284000 | 不死院 不死人(鬱血・たいまつ) | ? | ? | ? | ? | +| 284004 | 不死院 不死人(鬱血・素手 ソウルブラック) | ? | ? | ? | ? | +| 284002 | 不死院 不死人(鬱血・素手・特別Drop) | ? | ? | ? | ? | +| 284001 | 不死院 不死人(鬱血・素手) | ? | ? | ? | ? | +| 231000 | 不死院 凶鳥人 | ? | ? | ? | ? | +| 120103 | 不死院 犬ネズミ(小) | ? | ? | ? | ? | +| 120300 | 不死院 雪ネズミ | ? | ? | ? | ? | +| 6050 | 亡国の王女 | ? | ? | ? | ? | +| 6700 | 亡国の王女(過去森) | ? | ? | ? | ? | +| 417100 | 人間性(中) | ? | ? | ? | ? | +| 417000 | 人間性(大) | ? | ? | ? | ? | +| 417200 | 人間性(小) | ? | ? | ? | ? | +| 502 | 会話するスケルトンテスト | ? | ? | ? | ? | +| 7160 | 地底湖_ベイグラントNPC_ドラゴンニュート | ? | ? | ? | ? | +| 325001 | 地底湖 イザリスクイーン | ? | ? | ? | ? | +| 327001 | 地底湖 バジリスク | ? | ? | ? | ? | +| 228001 | 地底湖 子キノコ | ? | ? | ? | ? | +| 345000 | 地底湖 座禅ドラゴン | ? | ? | ? | ? | +| 345100 | 地底湖 座禅ドラゴンの尻尾 | ? | ? | ? | ? | +| 353000 | 地底湖 湖獣 | ? | ? | ? | ? | +| 353100 | 地底湖 湖獣の太い首 | ? | ? | ? | ? | +| 330000 | 地底湖 結晶トカゲ | ? | ? | ? | ? | +| 227001 | 地底湖 親キノコ | ? | ? | ? | ? | +| 7110 | 城下1・前半_ベイグラントNPC_盗賊 | ? | ? | ? | ? | +| 7111 | 城下1・後半_ベイグラントNPC_盗賊 | ? | ? | ? | ? | +| 7100 | 城下2_ベイグラントNPC_戦士 | ? | ? | ? | ? | +| 225000 | 城下1・前 ハンマーデーモン | ? | ? | ? | ? | +| 250000 | 城下1・前 不死人 | ? | ? | ? | ? | +| 250001 | 城下1・前 不死人(たいまつ) | ? | ? | ? | ? | +| 251001 | 城下1・前 不死人(乞食) | ? | ? | ? | ? | +| 254014 | 城下1・前 不死人(戦士・アクス ソウルブラック) | ? | ? | ? | ? | +| 254011 | 城下1・前 不死人(戦士・アクス) | ? | ? | ? | ? | +| 254013 | 城下1・前 不死人(戦士・剣 ソウルブラック) | ? | ? | ? | ? | +| 254010 | 城下1・前 不死人(戦士・剣) | ? | ? | ? | ? | +| 254012 | 城下1・前 不死人(戦士・盾なし・火炎瓶好き) | ? | ? | ? | ? | +| 255002 | 城下1・前 不死人(重戦士・ボウガン) | ? | ? | ? | ? | +| 255001 | 城下1・前 不死人(重戦士・ロングソード) | ? | ? | ? | ? | +| 255000 | 城下1・前 不死人(重戦士・槍) | ? | ? | ? | ? | +| 330060 | 城下1・前 結晶トカゲ | ? | ? | ? | ? | +| 279000 | 城下1・前 黒騎士(剣) | ? | ? | ? | ? | +| 346000 | 城下1・後 アーマードタスク | ? | ? | ? | ? | +| 535000 | 城下1・後 ガーゴイル | ? | ? | ? | ? | +| 535200 | 城下1・後 ガーゴイルの尻尾 | ? | ? | ? | ? | +| 535001 | 城下1・後 ガーゴイル(2体目) | ? | ? | ? | ? | +| 224000 | 城下1・後 ナタデーモン | ? | ? | ? | ? | +| 343000 | 城下1・後 ヘルカイト | ? | ? | ? | ? | +| 343100 | 城下1・後 ヘルカイトの尻尾 | ? | ? | ? | ? | +| 250050 | 城下1・後 不死人 | ? | ? | ? | ? | +| 250051 | 城下1・後 不死人(たいまつ) | ? | ? | ? | ? | +| 250053 | 城下1・後 不死人(ソウルブラック) | ? | ? | ? | ? | +| 250052 | 城下1・後 不死人(弓) | ? | ? | ? | ? | +| 252001 | 城下1・後 不死人(盗賊 ソウルブラック) | ? | ? | ? | ? | +| 252000 | 城下1・後 不死人(盗賊) | ? | ? | ? | ? | +| 256001 | 城下1・後 不死人(軽騎士・ボウガン専門) | ? | ? | ? | ? | +| 256004 | 城下1・後 不死人(軽騎士・レイピア ソウルブラック) | ? | ? | ? | ? | +| 256002 | 城下1・後 不死人(軽騎士・レイピア) | ? | ? | ? | ? | +| 256003 | 城下1・後 不死人(軽騎士・ロング ソウルブラック) | ? | ? | ? | ? | +| 256000 | 城下1・後 不死人(軽騎士・ロング) | ? | ? | ? | ? | +| 255042 | 城下1・後 不死人(重戦士・ボウガン) | ? | ? | ? | ? | +| 255044 | 城下1・後 不死人(重戦士・ロングソード ソウルブラック) | ? | ? | ? | ? | +| 255041 | 城下1・後 不死人(重戦士・ロングソード) | ? | ? | ? | ? | +| 255043 | 城下1・後 不死人(重戦士・槍 ソウルブラック) | ? | ? | ? | ? | +| 255040 | 城下1・後 不死人(重戦士・槍) | ? | ? | ? | ? | +| 257001 | 城下1・後 不死人(重騎士・大メイス) | ? | ? | ? | ? | +| 257002 | 城下1・後 不死人(重騎士・大剣 ソウルブラック) | ? | ? | ? | ? | +| 257000 | 城下1・後 不死人(重騎士・大剣) | ? | ? | ? | ? | +| 334000 | 城下1・後 公使の黒犬 | ? | ? | ? | ? | +| 334003 | 城下1・後 公使の黒犬(ナタの眷属) | ? | ? | ? | ? | +| 237000 | 城下1・後 四騎士D | ? | ? | ? | ? | +| 230001 | 城下1・後 徘徊デーモン | ? | ? | ? | ? | +| 120101 | 城下1・後 犬ネズミ(小) | ? | ? | ? | ? | +| 264000 | 城下1・後 鍛冶屋アンドレ | ? | ? | ? | ? | +| 279001 | 城下1・後 黒騎士(特大剣) | ? | ? | ? | ? | +| 320000 | 城下2 うごめく腐肉 | ? | ? | ? | ? | +| 327000 | 城下2 バジリスク | ? | ? | ? | ? | +| 250030 | 城下2 不死人 | ? | ? | ? | ? | +| 250033 | 城下2 不死人(たいまつ ソウルブラック) | ? | ? | ? | ? | +| 250031 | 城下2 不死人(たいまつ) | ? | ? | ? | ? | +| 266001 | 城下2 不死人(コック ソウルブラック) | ? | ? | ? | ? | +| 266000 | 城下2 不死人(コック) | ? | ? | ? | ? | +| 250032 | 城下2 不死人(ソウルブラック) | ? | ? | ? | ? | +| 334001 | 城下2 公使の黒犬 | ? | ? | ? | ? | +| 334002 | 城下2 公使の黒犬(宝守り・強) | ? | ? | ? | ? | +| 237002 | 城下2 四騎士D | ? | ? | ? | ? | +| 120000 | 城下2 犬ネズミ | ? | ? | ? | ? | +| 120200 | 城下2 犬ネズミ(大) | ? | ? | ? | ? | +| 120104 | 城下2 犬ネズミ(小 ソウルブラック) | ? | ? | ? | ? | +| 120102 | 城下2 犬ネズミ(小) | ? | ? | ? | ? | +| 526000 | 城下2 貪食ドラゴン | ? | ? | ? | ? | +| 526100 | 城下2 貪食ドラゴンの尻尾 | ? | ? | ? | ? | +| 7140 | 墓地1_ベイグラントNPC_聖職者 | ? | ? | ? | ? | +| 279020 | 墓地1 黒騎士(斧) | ? | ? | ? | ? | +| 7150 | 墓地2_ベイグラントNPC_聖職者 | ? | ? | ? | ? | +| 279030 | 墓地2 黒騎士(槍) | ? | ? | ? | ? | +| 6320 | 墓地の卑怯者パッチ 墓地1 | ? | ? | ? | ? | +| 6321 | 墓地の卑怯者パッチ 墓地2〜拠点 | ? | ? | ? | ? | +| 350101 | 墓地1 ウィプス | ? | ? | ? | ? | +| 291002 | 墓地1 スケルトン(大)_大剣 | ? | ? | ? | ? | +| 291001 | 墓地1 スケルトン(大)_大弓 | ? | ? | ? | ? | +| 293003 | 墓地1 スケルトン(車輪 ソウルブラック)) | ? | ? | ? | ? | +| 293000 | 墓地1 スケルトン(車輪) | ? | ? | ? | ? | +| 290012 | 墓地1 スケルトン_大曲剣 | ? | ? | ? | ? | +| 290014 | 墓地1 スケルトン_大曲剣(ソウルブラック) | ? | ? | ? | ? | +| 290022 | 墓地1 スケルトン_大曲剣(不死) | ? | ? | ? | ? | +| 290011 | 墓地1 スケルトン_弓 | ? | ? | ? | ? | +| 290021 | 墓地1 スケルトン_弓(不死) | ? | ? | ? | ? | +| 290010 | 墓地1 スケルトン_曲剣 | ? | ? | ? | ? | +| 290013 | 墓地1 スケルトン_曲剣(ソウルブラック) | ? | ? | ? | ? | +| 290020 | 墓地1 スケルトン_曲剣(不死) | ? | ? | ? | ? | +| 265000 | 墓地1 不死人(墓守) | ? | ? | ? | ? | +| 230000 | 墓地1 徘徊デーモン | ? | ? | ? | ? | +| 330030 | 墓地1 結晶トカゲ | ? | ? | ? | ? | +| 292002 | 墓地1 骨太スケルトン(つるはし・ポリ劇用) | ? | ? | ? | ? | +| 292000 | 墓地1 骨太スケルトン(鉱夫) | ? | ? | ? | ? | +| 332000 | 墓地1 3人羽織 | ? | ? | ? | ? | +| 332001 | 墓地1 3人羽織(分身) | ? | ? | ? | ? | +| 291011 | 墓地2 スケルトン(大)_大剣 | ? | ? | ? | ? | +| 291015 | 墓地2 スケルトン(大)_大剣(ソウルブラック) | ? | ? | ? | ? | +| 291012 | 墓地2 スケルトン(大)_大剣(不死) | ? | ? | ? | ? | +| 291014 | 墓地2 スケルトン(大)_大剣(王の封印後・強) | ? | ? | ? | ? | +| 291010 | 墓地2 スケルトン(大)_大弓 | ? | ? | ? | ? | +| 291013 | 墓地2 スケルトン(大)_大弓(王の封印後・強) | ? | ? | ? | ? | +| 295001 | 墓地2 スケルトン(獣 ソウルブラック) | ? | ? | ? | ? | +| 295000 | 墓地2 スケルトン(獣) | ? | ? | ? | ? | +| 294000 | 墓地2 スケルトン(赤子) | ? | ? | ? | ? | +| 290032 | 墓地2 スケルトン_大曲剣(不死) | ? | ? | ? | ? | +| 290031 | 墓地2 スケルトン_弓(不死) | ? | ? | ? | ? | +| 290030 | 墓地2 スケルトン_曲剣(不死) | ? | ? | ? | ? | +| 296000 | 墓地2 トーテムスケルトン | ? | ? | ? | ? | +| 522000 | 墓地2 墓王 | ? | ? | ? | ? | +| 330050 | 墓地2 結晶トカゲ | ? | ? | ? | ? | +| 332002 | 墓地2 3人羽織(雑魚) | ? | ? | ? | ? | +| 6130 | 壺の呪術師 城下2〜拠点 | ? | ? | ? | ? | +| 6131 | 壺の呪術師 影町 亡者 | ? | ? | ? | ? | +| 7230 | 大墓_ベイグラントNPC_持たざるもの | ? | ? | ? | ? | +| 537000 | 大墓 薪の王 | ? | ? | ? | ? | +| 279060 | 大墓 黒騎士(剣 ソウルブラック) | ? | ? | ? | ? | +| 279050 | 大墓 黒騎士(剣) | ? | ? | ? | ? | +| 279062 | 大墓 黒騎士(斧 ソウルブラック) | ? | ? | ? | ? | +| 279052 | 大墓 黒騎士(斧) | ? | ? | ? | ? | +| 279063 | 大墓 黒騎士(槍 ソウルブラック) | ? | ? | ? | ? | +| 279053 | 大墓 黒騎士(槍) | ? | ? | ? | ? | +| 279100 | 大墓 黒騎士(演出用) | ? | ? | ? | ? | +| 279061 | 大墓 黒騎士(特大剣 ソウルブラック) | ? | ? | ? | ? | +| 279051 | 大墓 黒騎士(特大剣) | ? | ? | ? | ? | +| 6540 | 太陽の騎士 城下1 NPCマルチ協力 | ? | ? | ? | ? | +| 6001 | 太陽の騎士 城下1後半 | ? | ? | ? | ? | +| 6000 | 太陽の騎士 城下1(「誓約したい」のタイミングでも使うので王城2レベルに) | ? | ? | ? | ? | +| 6541 | 太陽の騎士 城下2 NPCマルチ協力 | ? | ? | ? | ? | +| 6544 | 太陽の騎士 大墓 NPCマルチ協力 | ? | ? | ? | ? | +| 6003 | 太陽の騎士 廃都 | ? | ? | ? | ? | +| 6543 | 太陽の騎士 廃都 NPCマルチ協力 | ? | ? | ? | ? | +| 6004 | 太陽の騎士 廃都 太陽虫 | ? | ? | ? | ? | +| 6002 | 太陽の騎士 王城2 | ? | ? | ? | ? | +| 6542 | 太陽の騎士 王城2 NPCマルチ協力 | ? | ? | ? | ? | +| 10 | 宝テスト1 | ? | ? | ? | ? | +| 11 | 宝テスト2 | ? | ? | ? | ? | +| 12 | 宝テスト3 | ? | ? | ? | ? | +| 6801 | 山賊A 門番 | ? | ? | ? | ? | +| 6802 | 山賊B 戦士 | ? | ? | ? | ? | +| 6803 | 山賊C 弓使い | ? | ? | ? | ? | +| 6804 | 山賊D 魔法(攻撃) | ? | ? | ? | ? | +| 6805 | 山賊E 魔法(回復) | ? | ? | ? | ? | +| 6806 | 山賊F 隠密 | ? | ? | ? | ? | +| 223100 | 廃都・前 スノウデーモン | ? | ? | ? | ? | +| 224001 | 廃都・前 ナタデーモン | ? | ? | ? | ? | +| 224002 | 廃都・前 ナタデーモン(ソウルブラック) | ? | ? | ? | ? | +| 225002 | 廃都・前 ハンマーデーモン | ? | ? | ? | ? | +| 225003 | 廃都・前 ハンマーデーモン(7英雄) | ? | ? | ? | ? | +| 520000 | 廃都・前 ムカデ巨人 | ? | ? | ? | ? | +| 520200 | 廃都・前 ムカデ巨人の尻尾 | ? | ? | ? | ? | +| 520100 | 廃都・前 ムカデ巨人の腕 | ? | ? | ? | ? | +| 243000 | 廃都・前 動く石像 | ? | ? | ? | ? | +| 348000 | 廃都・前 太陽虫 | ? | ? | ? | ? | +| 348001 | 廃都・前 太陽虫(強) | ? | ? | ? | ? | +| 525000 | 廃都・前 爛れ続けるもの | ? | ? | ? | ? | +| 339000 | 廃都・前 穴掘りウジ虫 | ? | ? | ? | ? | +| 339001 | 廃都・前 穴掘りウジ虫(地面) | ? | ? | ? | ? | +| 339002 | 廃都・前 穴掘りウジ虫(壁) | ? | ? | ? | ? | +| 339003 | 廃都・前 穴掘りウジ虫(天井) | ? | ? | ? | ? | +| 7180 | 廃都・前半_ベイグラントNPC_呪術師 | ? | ? | ? | ? | +| 324000 | 廃都・後 イザリス | ? | ? | ? | ? | +| 324001 | 廃都・後 イザリス(ソウルブラック) | ? | ? | ? | ? | +| 523000 | 廃都・後 キングイザリス | ? | ? | ? | ? | +| 342101 | 廃都・後 ドラゴンゾンビ(下半身) | ? | ? | ? | ? | +| 540000 | 廃都・後 ボスイザリス | ? | ? | ? | ? | +| 540100 | 廃都・後 ボスイザリスコア | ? | ? | ? | ? | +| 243001 | 廃都・後 動く石像 | ? | ? | ? | ? | +| 230005 | 廃都・後 徘徊デーモン | ? | ? | ? | ? | +| 330020 | 廃都・後 結晶トカゲ | ? | ? | ? | ? | +| 223000 | 強チュート デブデーモン | ? | ? | ? | ? | +| 250025 | 強チュート 不死人 | ? | ? | ? | ? | +| 250023 | 強チュート 不死人(たいまつ) | ? | ? | ? | ? | +| 250024 | 強チュート 不死人(弓) | ? | ? | ? | ? | +| 255031 | 強チュート 不死人(重戦士・ロングソード) | ? | ? | ? | ? | +| 255032 | 強チュート 不死人(重戦士・槍) | ? | ? | ? | ? | +| 279070 | 強チュート 黒騎士(剣) | ? | ? | ? | ? | +| 7170 | 影町_ベイグラントNPC_放浪者 | ? | ? | ? | ? | +| 321000 | 影町 たまご背負い | ? | ? | ? | ? | +| 321001 | 影町 たまご背負い(味方) | ? | ? | ? | ? | +| 534000 | 影町 クラグスパイダー妹 | ? | ? | ? | ? | +| 340000 | 影町 クラグスパイダー(子) | ? | ? | ? | ? | +| 206002 | 影町 グール_人体 | ? | ? | ? | ? | +| 206005 | 影町 グール_人体(ソウルブラック) | ? | ? | ? | ? | +| 206000 | 影町 グール_剣 | ? | ? | ? | ? | +| 206003 | 影町 グール_剣(ソウルブラック) | ? | ? | ? | ? | +| 206001 | 影町 グール_槍 | ? | ? | ? | ? | +| 206004 | 影町 グール_槍(ソウルブラック) | ? | ? | ? | ? | +| 524000 | 影町 プリンスイザリス(下向き) | ? | ? | ? | ? | +| 253002 | 影町 不死人(蓑虫・吹き矢) | ? | ? | ? | ? | +| 281001 | 影町 不死人(蛮兵 ソウルブラック) | ? | ? | ? | ? | +| 281101 | 影町 不死人(蛮兵・岩 ソウルブラック) | ? | ? | ? | ? | +| 281100 | 影町 不死人(蛮兵・岩) | ? | ? | ? | ? | +| 281000 | 影町 不死人(蛮兵) | ? | ? | ? | ? | +| 334100 | 影町 公使の炎犬 | ? | ? | ? | ? | +| 338000 | 影町 大ヒル | ? | ? | ? | ? | +| 309000 | 影町 大蚊 | ? | ? | ? | ? | +| 322000 | 影町 寄生虫 | ? | ? | ? | ? | +| 528000 | 影町 焔の魔女クラグスパイダー | ? | ? | ? | ? | +| 6250 | 心折れた商人 | ? | ? | ? | ? | +| 6271 | 心折れた戦士 城下1 亡者 | ? | ? | ? | ? | +| 6270 | 心折れた戦士 拠点 | ? | ? | ? | ? | +| 6420 | 忍者 | ? | ? | ? | ? | +| 6421 | 忍者(侵入世界) | ? | ? | ? | ? | +| 6590 | 抱かれ騎士ロートレク 城下1 NPCマルチ協力 | ? | ? | ? | ? | +| 6300 | 抱かれ騎士ロートレク 城下1〜拠点 | ? | ? | ? | ? | +| 6591 | 抱かれ騎士ロートレク 城下2 NPCマルチ協力 | ? | ? | ? | ? | +| 6301 | 抱かれ騎士ロートレク 王城2 侵入世界 | ? | ? | ? | ? | +| 291000 | 拠点 スケルトン(大)_大剣 | ? | ? | ? | ? | +| 290002 | 拠点 スケルトン_大曲剣 | ? | ? | ? | ? | +| 290001 | 拠点 スケルトン_弓 | ? | ? | ? | ? | +| 290000 | 拠点 スケルトン_曲剣 | ? | ? | ? | ? | +| 251000 | 拠点 不死人(乞食) | ? | ? | ? | ? | +| 254001 | 拠点 不死人(戦士・アクス) | ? | ? | ? | ? | +| 254000 | 拠点 不死人(戦士・剣) | ? | ? | ? | ? | +| 254002 | 拠点 不死人(戦士・盾なし・火炎瓶好き) | ? | ? | ? | ? | +| 255010 | 拠点 不死人(重戦士・ロングソード) | ? | ? | ? | ? | +| 351000 | 拠点 大鴉 | ? | ? | ? | ? | +| 275000 | 拠点 灰色の聖女 | ? | ? | ? | ? | +| 120100 | 拠点 犬ネズミ(小) | ? | ? | ? | ? | +| 533000 | 拠点・大墓 地の王の探索者(フラムト) | ? | ? | ? | ? | +| 412000 | 旧土偶騎士 | ? | ? | ? | ? | +| 412001 | 旧土偶騎士 ソウルブラック | ? | ? | ? | ? | +| 413011 | 旧樹人(鋏) キャストオフ | ? | ? | ? | ? | +| 413010 | 旧樹人(鋏)  | ? | ? | ? | ? | +| 413014 | 旧樹人(鋏) ソウルブラック | ? | ? | ? | ? | +| 413012 | 旧樹人(鋏) 上裸 | ? | ? | ? | ? | +| 413013 | 旧樹人(鋏) 下裸 | ? | ? | ? | ? | +| 413000 | 旧樹人(鋤) | ? | ? | ? | ? | +| 413001 | 旧樹人(鋤) キャストオフ | ? | ? | ? | ? | +| 413004 | 旧樹人(鋤) ソウルブラック | ? | ? | ? | ? | +| 413002 | 旧樹人(鋤) 上裸 | ? | ? | ? | ? | +| 413003 | 旧樹人(鋤) 下裸 | ? | ? | ? | ? | +| 6010 | 暗月の騎士 | ? | ? | ? | ? | +| 6650 | 暗月剣(軽騎士) | ? | ? | ? | ? | +| 6640 | 暗月剣(重騎士) | ? | ? | ? | ? | +| 341000 | 森庭・前 カエルエイ | ? | ? | ? | ? | +| 323000 | 森庭・前 カゲロウ龍 | ? | ? | ? | ? | +| 271001 | 森庭・前 クリスタルガード | ? | ? | ? | ? | +| 271100 | 森庭・前 クリスタルガード(琥珀) | ? | ? | ? | ? | +| 335000 | 森庭・前 動く木 | ? | ? | ? | ? | +| 238000 | 森庭・前 土偶騎士 | ? | ? | ? | ? | +| 238002 | 森庭・前 土偶騎士(ソウルブラック) | ? | ? | ? | ? | +| 337000 | 森庭・前 木登りトカゲ | ? | ? | ? | ? | +| 233000 | 森庭・前 樹人 | ? | ? | ? | ? | +| 353001 | 森庭・前 湖獣 | ? | ? | ? | ? | +| 353101 | 森庭・前 湖獣の太い首 | ? | ? | ? | ? | +| 330040 | 森庭・前 結晶トカゲ | ? | ? | ? | ? | +| 279010 | 森庭・前 黒騎士(槍) | ? | ? | ? | ? | +| 7130 | 森庭・前半_ベイグラントNPC_狩人 | ? | ? | ? | ? | +| 341001 | 森庭・後 カエルエイ | ? | ? | ? | ? | +| 226001 | 森庭・後 ヤリデーモン | ? | ? | ? | ? | +| 536100 | 森庭・後 化け猫(白) | ? | ? | ? | ? | +| 536000 | 森庭・後 口避け大猫 | ? | ? | ? | ? | +| 238001 | 森庭・後 土偶騎士 | ? | ? | ? | ? | +| 228000 | 森庭・後 子キノコ | ? | ? | ? | ? | +| 228002 | 森庭・後 子キノコ(ソウルブラック) | ? | ? | ? | ? | +| 233001 | 森庭・後 樹人 | ? | ? | ? | ? | +| 521000 | 森庭・後 聖剣の狼 | ? | ? | ? | ? | +| 227000 | 森庭・後 親キノコ | ? | ? | ? | ? | +| 227002 | 森庭・後 親キノコ(ソウルブラック) | ? | ? | ? | ? | +| 7131 | 森庭・後半_ベイグラントNPC_狩人 | ? | ? | ? | ? | +| 503 | 棺投げ専用 スケルトン(大) | ? | ? | ? | ? | +| 6531 | 沼のおばさん 影町 NPCマルチ侵入 | ? | ? | ? | ? | +| 6530 | 沼のおばさん 影町 NPCマルチ協力 | ? | ? | ? | ? | +| 0 | 消すべからず | ? | ? | ? | ? | +| 7210 | 深淵_ベイグラントNPC_山賊 | ? | ? | ? | ? | +| 350100 | 深淵  ウィプス | ? | ? | ? | ? | +| 350000 | 深淵  ビッグゼリー | ? | ? | ? | ? | +| 539001 | 深淵 ジャイール・デーモン(個別キャラ用) | ? | ? | ? | ? | +| 539000 | 深淵 ジャイール・デーモン(総HP用) | ? | ? | ? | ? | +| 239000 | 深淵 ダークレイス | ? | ? | ? | ? | +| 239003 | 深淵 ダークレイス(ソウルブラック) | ? | ? | ? | ? | +| 342002 | 深淵 ドラゴンゾンビ | ? | ? | ? | ? | +| 352002 | 深淵 ワイバーン(地上) | ? | ? | ? | ? | +| 352005 | 深淵 ワイバーン(飛行) | ? | ? | ? | ? | +| 250040 | 深淵 不死人 | ? | ? | ? | ? | +| 268000 | 深淵 死霊女 | ? | ? | ? | ? | +| 267000 | 深淵 死霊男 | ? | ? | ? | ? | +| 450000 | 深淵の主 | ? | ? | ? | ? | +| 533001 | 深淵・大墓 地の王の探索者(カアス) | ? | ? | ? | ? | +| 415000 | 深淵人 | ? | ? | ? | ? | +| 415001 | 深淵人 ソウルブラック | ? | ? | ? | ? | +| 415020 | 深淵人 目光 | ? | ? | ? | ? | +| 416000 | 深淵人魔術師 | ? | ? | ? | ? | +| 416001 | 深淵人魔術師 ソウルブラック | ? | ? | ? | ? | +| 416020 | 深淵人魔術師 目光 | ? | ? | ? | ? | +| 416010 | 深淵人魔術師 (超専守・イベント用) | ? | ? | ? | ? | +| 6060 | 灰色の聖女 | ? | ? | ? | ? | +| 21 | 炎ダメージテスト用 | ? | ? | ? | ? | +| 7190 | 王城1_ベイグラントNPC_戦士 | ? | ? | ? | ? | +| 6600 | 王城1塔のNPC(リカール) | ? | ? | ? | ? | +| 7200 | 王城2_ベイグラントNPC_騎士 | ? | ? | ? | ? | +| 232000 | 王城1 アイアンゴーレム | ? | ? | ? | ? | +| 278000 | 王城1 ミミック | ? | ? | ? | ? | +| 256011 | 王城1 不死人(軽騎士・ボウガン専門) | ? | ? | ? | ? | +| 256014 | 王城1 不死人(軽騎士・レイピア ソウルブラック) | ? | ? | ? | ? | +| 256012 | 王城1 不死人(軽騎士・レイピア) | ? | ? | ? | ? | +| 256013 | 王城1 不死人(軽騎士・ロング ソウルブラック) | ? | ? | ? | ? | +| 256010 | 王城1 不死人(軽騎士・ロング) | ? | ? | ? | ? | +| 257011 | 王城1 不死人(重騎士・大メイス) | ? | ? | ? | ? | +| 257012 | 王城1 不死人(重騎士・大剣 ソウルブラック) | ? | ? | ? | ? | +| 257010 | 王城1 不死人(重騎士・大剣) | ? | ? | ? | ? | +| 286002 | 王城1 巨人奴隷(岩セット係) | ? | ? | ? | ? | +| 286000 | 王城1 巨人奴隷(火炎壺) | ? | ? | ? | ? | +| 230002 | 王城1 徘徊デーモン その1 | ? | ? | ? | ? | +| 230003 | 王城1 徘徊デーモン その2 | ? | ? | ? | ? | +| 269000 | 王城1 蛇人A | ? | ? | ? | ? | +| 269004 | 王城1 蛇人A(ソウルブラック) | ? | ? | ? | ? | +| 269003 | 王城1 蛇人A(強) | ? | ? | ? | ? | +| 270000 | 王城1 蛇人B | ? | ? | ? | ? | +| 270002 | 王城1 蛇人B(ソウルブラック) | ? | ? | ? | ? | +| 240000 | 王城2 アサシン | ? | ? | ? | ? | +| 535100 | 王城2 ガーゴイル(色違い) | ? | ? | ? | ? | +| 535300 | 王城2 ガーゴイル(色違い)の尻尾 | ? | ? | ? | ? | +| 535301 | 王城2 ガーゴイル(色違い)の尻尾(アイテムドロップなし) | ? | ? | ? | ? | +| 527000 | 王城2 グリフィス | ? | ? | ? | ? | +| 527100 | 王城2 グリフィス(大) | ? | ? | ? | ? | +| 241005 | 王城2 ホワイトナイト(剣 ソウルブラック) | ? | ? | ? | ? | +| 241000 | 王城2 ホワイトナイト(剣) | ? | ? | ? | ? | +| 241004 | 王城2 ホワイトナイト(弓) | ? | ? | ? | ? | +| 241006 | 王城2 ホワイトナイト(槍 ソウルブラック) | ? | ? | ? | ? | +| 241003 | 王城2 ホワイトナイト(槍) | ? | ? | ? | ? | +| 278010 | 王城2 ミミック1 | ? | ? | ? | ? | +| 278011 | 王城2 ミミック2 | ? | ? | ? | ? | +| 278012 | 王城2 ミミック3 | ? | ? | ? | ? | +| 278013 | 王城2 ミミック4 | ? | ? | ? | ? | +| 226000 | 王城2 ヤリデーモン | ? | ? | ? | ? | +| 236000 | 王城2 四騎士C | ? | ? | ? | ? | +| 236001 | 王城2 四騎士C(雷) | ? | ? | ? | ? | +| 286001 | 王城2 巨人奴隷(鍛冶屋) | ? | ? | ? | ? | +| 287000 | 王城2 巨人衛兵 | ? | ? | ? | ? | +| 287010 | 王城2 巨人衛兵(下位版) | ? | ? | ? | ? | +| 287011 | 王城2 巨人衛兵(下位版 ソウルブラック) | ? | ? | ? | ? | +| 287001 | 王城2 巨人衛兵(ソウルブラック) | ? | ? | ? | ? | +| 230004 | 王城2 徘徊デーモン | ? | ? | ? | ? | +| 531000 | 王城2 皇母マリア | ? | ? | ? | ? | +| 532000 | 王城2 皇母妹 | ? | ? | ? | ? | +| 6180 | 癒し手 | ? | ? | ? | ? | +| 6070 | 白の聖女 | ? | ? | ? | ? | +| 6550 | 神殿騎士 墓地1 NPCマルチ協力 | ? | ? | ? | ? | +| 6551 | 神殿騎士 墓地2 NPCマルチ侵入 | ? | ? | ? | ? | +| 100000 | 篝火用ダミーキャラ | ? | ? | ? | ? | +| 7220 | 結晶塔_ベイグラントNPC_魔術師 | ? | ? | ? | ? | +| 346100 | 結晶塔 アーマードタスク(強化版) | ? | ? | ? | ? | +| 325000 | 結晶塔 イザリスクイーン | ? | ? | ? | ? | +| 323001 | 結晶塔 カゲロウ龍 | ? | ? | ? | ? | +| 271000 | 結晶塔 クリスタルガード | ? | ? | ? | ? | +| 271002 | 結晶塔 クリスタルガード(ソウルブラック) | ? | ? | ? | ? | +| 271101 | 結晶塔 クリスタルガード(琥珀) | ? | ? | ? | ? | +| 333000 | 結晶塔 ビシャーチャ | ? | ? | ? | ? | +| 333002 | 結晶塔 ビシャーチャ(シスター妹) | ? | ? | ? | ? | +| 333001 | 結晶塔 ビシャーチャ(シスター姉) | ? | ? | ? | ? | +| 333003 | 結晶塔 ビシャーチャ(ソウルブラック) | ? | ? | ? | ? | +| 278020 | 結晶塔 ミミック1 | ? | ? | ? | ? | +| 278021 | 結晶塔 ミミック2 | ? | ? | ? | ? | +| 280000 | 結晶塔 不死人(結晶)_剣 | ? | ? | ? | ? | +| 280001 | 結晶塔 不死人(結晶)_弓 | ? | ? | ? | ? | +| 237001 | 結晶塔 四騎士D | ? | ? | ? | ? | +| 237003 | 結晶塔 四騎士D(ソウルブラック) | ? | ? | ? | ? | +| 529000 | 結晶塔 白竜シース | ? | ? | ? | ? | +| 529100 | 結晶塔 白竜シースの尻尾 | ? | ? | ? | ? | +| 529001 | 結晶塔 白竜シース(書庫) | ? | ? | ? | ? | +| 330010 | 結晶塔 結晶トカゲ | ? | ? | ? | ? | +| 269002 | 結晶塔 蛇人A | ? | ? | ? | ? | +| 269001 | 結晶塔 蛇人A(看守) | ? | ? | ? | ? | +| 270001 | 結晶塔 蛇人B(看守長) | ? | ? | ? | ? | +| 6610 | 結晶騎士 | ? | ? | ? | ? | +| 6350 | 絵師エレーアミス | ? | ? | ? | ? | +| 7120 | 絵画世界_ベイグラントNPC_放浪者 | ? | ? | ? | ? | +| 452000 | 聖剣の狼 | ? | ? | ? | ? | +| 452010 | 聖剣の狼(共闘) | ? | ? | ? | ? | +| 6080 | 聖女の騎士A | ? | ? | ? | ? | +| 6091 | 聖女の騎士B 墓地2 亡者 | ? | ? | ? | ? | +| 6090 | 聖女の騎士B 拠点 | ? | ? | ? | ? | +| 6100 | 聖女の騎士C | ? | ? | ? | ? | +| 6101 | 聖女の騎士C 墓地2 亡者 | ? | ? | ? | ? | +| 6580 | 見張り塔のNPC(ハベル) | ? | ? | ? | ? | +| 278030 | 過去森 ミミック1 | ? | ? | ? | ? | +| 278031 | 過去森 ミミック2 | ? | ? | ? | ? | +| 453100 | 過去森 化け猫(白) | ? | ? | ? | ? | +| 330070 | 過去森 結晶トカゲ | ? | ? | ? | ? | +| 6310 | 野武士 | ? | ? | ? | ? | +| 6311 | 野武士(侵入世界) | ? | ? | ? | ? | +| 347100 | 金キメラ | ? | ? | ? | ? | +| 347200 | 金キメラの尻尾 | ? | ? | ? | ? | +| 347101 | 金キメラ(ザコ) | ? | ? | ? | ? | +| 347000 | 金キメラ(旧) | ? | ? | ? | ? | +| 6220 | 鍛冶屋リッケルト | ? | ? | ? | ? | +| 418000 | 鎖人 | ? | ? | ? | ? | +| 418001 | 鎖人 ソウルブラック | ? | ? | ? | ? | +| 6020 | 騎士オストラ | ? | ? | ? | ? | +| 6021 | 騎士オストラ(亡者) | ? | ? | ? | ? | +| 6520 | 魔女 森庭 NPCマルチ協力 | ? | ? | ? | ? | +| 6521 | 魔女 深淵 NPCマルチ協力 | ? | ? | ? | ? | +| 6410 | 魔女マロース | ? | ? | ? | ? | +| 411000 | 鷹の目のゴー | ? | ? | ? | ? | +| 6570 | 黄衣 絵画世界 NPCマルチ侵入 | ? | ? | ? | ? | +| 419000 | 黒犬(黒竜眷属) | ? | ? | ? | ? | +| 451000 | 黒竜 | ? | ? | ? | ? | +| 451100 | 黒竜_尻尾 | ? | ? | ? | ? | +| 451001 | 黒竜(羽根破損) | ? | ? | ? | ? | +| 6511 | 黒鉄の騎士 廃都 通常敵 | ? | ? | ? | ? | +| 6510 | 黒鉄の騎士 王城1 NPCマルチ協力 | ? | ? | ? | ? | +| 6390 | 黒騎士タルカス | ? | ? | ? | ? | +| 200 | DS2 お手軽ロジックテスト用 | ? | ? | ? | ? | +| 510 | DS2テスト 騎士想定 | ? | ? | ? | ? | + +## PLAYERS / ENGINE MECHANICS + +### Players Param — Equip Load & Scaling +- {'ID': '1', 'Name': 'LEVELUPプレゼン版_騎士', 'RightHandWeapon1': '201005', 'RightHandWeapon2': '1330000', 'LeftHandWeapon1': '1452000', 'HeadArmor': '390000', 'BodyArmor': '391000', 'HandsArmor': '392000', 'LegsArmor': '393000', 'RingSlot1': '100', 'SpellSlot1': '4000', 'SpellSlot2': '4100', 'GoodSlot1': '201', 'FaceID': '31', 'Level': '1', 'Vitality': '18', 'Attunement': '14', 'Endurance': '22', 'Strength': '19', 'Dexterity': '15', 'Intelligence': '14', 'Faith': '8', 'Luck': '13', 'Humanity': '5', 'Resistance': '17', 'GoodSlot1Count': '5', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '2', 'Name': 'IGNITEデモプレイ版_騎士', 'RightHandWeapon1': '201000', 'RightHandWeapon2': '351000', 'LeftHandWeapon1': '1456000', 'LeftHandWeapon2': '1330000', 'HeadArmor': '350000', 'BodyArmor': '351000', 'HandsArmor': '352000', 'LegsArmor': '353000', 'RingSlot1': '100', 'SpellSlot1': '4000', 'SpellSlot2': '4300', 'SpellSlot3': '3550', 'GoodSlot1': '200', 'FaceID': '-1', 'Vitality': '14', 'Attunement': '18', 'Endurance': '50', 'Strength': '12', 'Dexterity': '11', 'Intelligence': '8', 'Faith': '9', 'Luck': '11', 'Humanity': '3', 'Resistance': '15', 'GoodSlot1Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1', 'Covenant': '1'} +- {'ID': '3', 'Name': 'SCEオンラインチェック用(誓約なし)', 'SoulCount': '10000000', 'RightHandWeapon1': '201015', 'LeftHandWeapon1': '1450015', 'HeadArmor': '210000', 'BodyArmor': '211000', 'HandsArmor': '212000', 'LegsArmor': '213000', 'RingSlot1': '138', 'RingSlot2': '148', 'GoodSlot1': '106', 'GoodSlot2': '100', 'GoodSlot3': '101', 'GoodSlot4': '113', 'GoodSlot5': '102', 'GoodSlot6': '114', 'GoodSlot7': '109', 'GoodSlot8': '103', 'GoodSlot9': '108', 'GoodSlot10': '373', 'FaceID': '6270', 'Level': '1', 'Vitality': '99', 'Attunement': '99', 'Endurance': '99', 'Strength': '99', 'Dexterity': '99', 'Intelligence': '99', 'Faith': '99', 'Luck': '99', 'Humanity': '99', 'Resistance': '99', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot4Count': '1', 'GoodSlot5Count': '1', 'GoodSlot6Count': '1', 'GoodSlot7Count': '10', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '10', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '4', 'Name': 'SCEオンラインチェック用(白教)', 'SoulCount': '10000000', 'RightHandWeapon1': '201015', 'LeftHandWeapon1': '1450015', 'HeadArmor': '210000', 'BodyArmor': '211000', 'HandsArmor': '212000', 'LegsArmor': '213000', 'RingSlot1': '138', 'RingSlot2': '148', 'GoodSlot1': '106', 'GoodSlot2': '100', 'GoodSlot3': '101', 'GoodSlot4': '113', 'GoodSlot5': '102', 'GoodSlot6': '114', 'GoodSlot7': '109', 'GoodSlot8': '103', 'GoodSlot9': '108', 'GoodSlot10': '373', 'FaceID': '6270', 'Level': '1', 'Vitality': '99', 'Attunement': '99', 'Endurance': '99', 'Strength': '99', 'Dexterity': '99', 'Intelligence': '99', 'Faith': '99', 'Luck': '99', 'Humanity': '99', 'Resistance': '99', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot4Count': '1', 'GoodSlot5Count': '1', 'GoodSlot6Count': '1', 'GoodSlot7Count': '10', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '10', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1', 'Covenant': '1'} +- {'ID': '5', 'Name': 'SCEオンラインチェック用(王女の守り)', 'SoulCount': '10000000', 'RightHandWeapon1': '201015', 'LeftHandWeapon1': '1450015', 'HeadArmor': '210000', 'BodyArmor': '211000', 'HandsArmor': '212000', 'LegsArmor': '213000', 'RingSlot1': '138', 'RingSlot2': '148', 'GoodSlot1': '106', 'GoodSlot2': '100', 'GoodSlot3': '101', 'GoodSlot4': '113', 'GoodSlot5': '102', 'GoodSlot6': '114', 'GoodSlot7': '109', 'GoodSlot8': '103', 'GoodSlot9': '108', 'GoodSlot10': '373', 'FaceID': '6270', 'Level': '1', 'Vitality': '99', 'Attunement': '99', 'Endurance': '99', 'Strength': '99', 'Dexterity': '99', 'Intelligence': '99', 'Faith': '99', 'Luck': '99', 'Humanity': '99', 'Resistance': '99', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot4Count': '1', 'GoodSlot5Count': '1', 'GoodSlot6Count': '1', 'GoodSlot7Count': '10', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '10', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1', 'Covenant': '2'} +- {'ID': '6', 'Name': 'SCEオンラインチェック用(太陽の戦士)', 'SoulCount': '10000000', 'RightHandWeapon1': '201015', 'LeftHandWeapon1': '1450015', 'HeadArmor': '210000', 'BodyArmor': '211000', 'HandsArmor': '212000', 'LegsArmor': '213000', 'RingSlot1': '138', 'RingSlot2': '148', 'GoodSlot1': '106', 'GoodSlot2': '100', 'GoodSlot3': '101', 'GoodSlot4': '113', 'GoodSlot5': '102', 'GoodSlot6': '114', 'GoodSlot7': '109', 'GoodSlot8': '103', 'GoodSlot9': '108', 'GoodSlot10': '373', 'FaceID': '6270', 'Level': '1', 'Vitality': '99', 'Attunement': '99', 'Endurance': '99', 'Strength': '99', 'Dexterity': '99', 'Intelligence': '99', 'Faith': '99', 'Luck': '99', 'Humanity': '99', 'Resistance': '99', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot4Count': '1', 'GoodSlot5Count': '1', 'GoodSlot6Count': '1', 'GoodSlot7Count': '10', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '10', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1', 'Covenant': '3'} +- {'ID': '7', 'Name': 'SCEオンラインチェック用(ダークレイス)', 'SoulCount': '10000000', 'RightHandWeapon1': '201015', 'LeftHandWeapon1': '1450015', 'HeadArmor': '210000', 'BodyArmor': '211000', 'HandsArmor': '212000', 'LegsArmor': '213000', 'RingSlot1': '138', 'RingSlot2': '139', 'GoodSlot1': '106', 'GoodSlot2': '100', 'GoodSlot3': '101', 'GoodSlot4': '113', 'GoodSlot5': '102', 'GoodSlot6': '114', 'GoodSlot7': '109', 'GoodSlot8': '103', 'GoodSlot9': '108', 'GoodSlot10': '373', 'FaceID': '6270', 'Level': '1', 'Vitality': '99', 'Attunement': '99', 'Endurance': '99', 'Strength': '99', 'Dexterity': '99', 'Intelligence': '99', 'Faith': '99', 'Luck': '99', 'Humanity': '99', 'Resistance': '99', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot4Count': '1', 'GoodSlot5Count': '1', 'GoodSlot6Count': '1', 'GoodSlot7Count': '10', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '10', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1', 'Covenant': '4'} +- {'ID': '8', 'Name': 'SCEオンラインチェック用(古竜への道)', 'SoulCount': '10000000', 'RightHandWeapon1': '201015', 'LeftHandWeapon1': '1450015', 'HeadArmor': '210000', 'BodyArmor': '211000', 'HandsArmor': '212000', 'LegsArmor': '213000', 'RingSlot1': '138', 'RingSlot2': '139', 'GoodSlot1': '106', 'GoodSlot2': '100', 'GoodSlot3': '101', 'GoodSlot4': '113', 'GoodSlot5': '102', 'GoodSlot6': '114', 'GoodSlot7': '109', 'GoodSlot8': '103', 'GoodSlot9': '108', 'GoodSlot10': '373', 'FaceID': '6270', 'Level': '1', 'Vitality': '99', 'Attunement': '99', 'Endurance': '99', 'Strength': '99', 'Dexterity': '99', 'Intelligence': '99', 'Faith': '99', 'Luck': '99', 'Humanity': '99', 'Resistance': '99', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot4Count': '1', 'GoodSlot5Count': '1', 'GoodSlot6Count': '1', 'GoodSlot7Count': '10', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '10', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1', 'Covenant': '5'} +- {'ID': '9', 'Name': 'SCEオンラインチェック用(墓王の眷属)', 'SoulCount': '10000000', 'RightHandWeapon1': '201015', 'LeftHandWeapon1': '1450015', 'HeadArmor': '210000', 'BodyArmor': '211000', 'HandsArmor': '212000', 'LegsArmor': '213000', 'RingSlot1': '138', 'RingSlot2': '139', 'GoodSlot1': '106', 'GoodSlot2': '100', 'GoodSlot3': '101', 'GoodSlot4': '113', 'GoodSlot5': '102', 'GoodSlot6': '114', 'GoodSlot7': '109', 'GoodSlot8': '103', 'GoodSlot9': '108', 'GoodSlot10': '373', 'FaceID': '6270', 'Level': '1', 'Vitality': '99', 'Attunement': '99', 'Endurance': '99', 'Strength': '99', 'Dexterity': '99', 'Intelligence': '99', 'Faith': '99', 'Luck': '99', 'Humanity': '99', 'Resistance': '99', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot4Count': '1', 'GoodSlot5Count': '1', 'GoodSlot6Count': '1', 'GoodSlot7Count': '10', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '10', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1', 'Covenant': '6'} +- {'ID': '10', 'Name': 'SCEオンラインチェック用(森の狩猟者)', 'SoulCount': '10000000', 'RightHandWeapon1': '201015', 'LeftHandWeapon1': '1450015', 'HeadArmor': '210000', 'BodyArmor': '211000', 'HandsArmor': '212000', 'LegsArmor': '213000', 'RingSlot1': '103', 'GoodSlot1': '106', 'GoodSlot2': '100', 'GoodSlot3': '101', 'GoodSlot4': '113', 'GoodSlot5': '102', 'GoodSlot6': '114', 'GoodSlot7': '109', 'GoodSlot8': '103', 'GoodSlot9': '108', 'GoodSlot10': '373', 'FaceID': '6270', 'Level': '1', 'Vitality': '99', 'Attunement': '99', 'Endurance': '99', 'Strength': '99', 'Dexterity': '99', 'Intelligence': '99', 'Faith': '99', 'Luck': '99', 'Humanity': '99', 'Resistance': '99', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot4Count': '1', 'GoodSlot5Count': '1', 'GoodSlot6Count': '1', 'GoodSlot7Count': '10', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '10', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1', 'Covenant': '7'} +- {'ID': '11', 'Name': 'SCEオンラインチェック用(暗月の剣)', 'SoulCount': '10000000', 'RightHandWeapon1': '201015', 'LeftHandWeapon1': '1450015', 'HeadArmor': '210000', 'BodyArmor': '211000', 'HandsArmor': '212000', 'LegsArmor': '213000', 'RingSlot1': '102', 'GoodSlot1': '106', 'GoodSlot2': '100', 'GoodSlot3': '101', 'GoodSlot4': '113', 'GoodSlot5': '102', 'GoodSlot6': '114', 'GoodSlot7': '109', 'GoodSlot8': '103', 'GoodSlot9': '108', 'GoodSlot10': '373', 'FaceID': '6270', 'Level': '1', 'Vitality': '99', 'Attunement': '99', 'Endurance': '99', 'Strength': '99', 'Dexterity': '99', 'Intelligence': '99', 'Faith': '99', 'Luck': '99', 'Humanity': '99', 'Resistance': '99', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot4Count': '1', 'GoodSlot5Count': '1', 'GoodSlot6Count': '1', 'GoodSlot7Count': '10', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '10', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1', 'Covenant': '8'} +- {'ID': '12', 'Name': 'SCEオンラインチェック用(混沌の従者)', 'SoulCount': '10000000', 'RightHandWeapon1': '201015', 'LeftHandWeapon1': '1450015', 'HeadArmor': '210000', 'BodyArmor': '211000', 'HandsArmor': '212000', 'LegsArmor': '213000', 'RingSlot1': '138', 'RingSlot2': '139', 'GoodSlot1': '106', 'GoodSlot2': '100', 'GoodSlot3': '101', 'GoodSlot4': '113', 'GoodSlot5': '102', 'GoodSlot6': '114', 'GoodSlot7': '109', 'GoodSlot8': '103', 'GoodSlot9': '112', 'FaceID': '6270', 'Level': '1', 'Vitality': '99', 'Attunement': '99', 'Endurance': '99', 'Strength': '99', 'Dexterity': '99', 'Intelligence': '99', 'Faith': '99', 'Luck': '99', 'Humanity': '99', 'Resistance': '99', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot4Count': '1', 'GoodSlot5Count': '1', 'GoodSlot6Count': '1', 'GoodSlot7Count': '10', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1', 'Covenant': '9'} +- {'ID': '100', 'Name': '【PC版】GGD用_アルトリウス', 'SoulCount': '1000000', 'RightHandWeapon1': '9012000', 'RightHandWeapon2': '9011000', 'LeftHandWeapon1': '9014000', 'LeftHandWeapon2': '9010000', 'HeadArmor': '660000', 'BodyArmor': '661000', 'HandsArmor': '662000', 'LegsArmor': '663000', 'FaceID': '-1', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '101', 'Name': '【PC版】GGD用_スナイパー', 'SoulCount': '1000000', 'RightHandWeapon1': '1253000', 'RightHandWeapon2': '9016000', 'HeadArmor': '700000', 'BodyArmor': '701000', 'HandsArmor': '702000', 'LegsArmor': '703000', 'BoltSlot1': '2102000', 'FaceID': '-1', 'BoltSlot1Count': '99', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '1000', 'Name': 'プロト版_騎士', 'SoulCount': '50000', 'RightHandWeapon1': '201000', 'RightHandWeapon2': '300000', 'LeftHandWeapon1': '1450000', 'LeftHandWeapon2': '1200000', 'HeadArmor': '210000', 'BodyArmor': '211000', 'HandsArmor': '212000', 'LegsArmor': '213000', 'ArrowSlot1': '2000000', 'FaceID': '-1', 'ArrowSlot1Count': '50', 'Vitality': '21', 'Attunement': '8', 'Endurance': '21', 'Strength': '18', 'Dexterity': '18', 'Intelligence': '7', 'Faith': '9', 'Luck': '11', 'Humanity': '5', 'Resistance': '10', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1', 'Covenant': '7'} +- {'ID': '1001', 'Name': 'プロト版_魔術師', 'SoulCount': '50000', 'RightHandWeapon1': '1300000', 'RightHandWeapon2': '701000', 'LeftHandWeapon1': '1404000', 'HeadArmor': '230000', 'BodyArmor': '231000', 'HandsArmor': '232000', 'LegsArmor': '233000', 'SpellSlot1': '4000', 'SpellSlot2': '6100', 'SpellSlot3': '3100', 'FaceID': '-1', 'Vitality': '14', 'Attunement': '20', 'Endurance': '24', 'Strength': '12', 'Dexterity': '8', 'Intelligence': '20', 'Faith': '5', 'Luck': '10', 'Humanity': '5', 'Resistance': '10', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1', 'Covenant': '6'} +- {'ID': '1002', 'Name': 'プロト版_たまねぎ騎士', 'SoulCount': '50000', 'RightHandWeapon1': '350000', 'RightHandWeapon2': '1300000', 'LeftHandWeapon1': '1501000', 'HeadArmor': '10000', 'BodyArmor': '11000', 'HandsArmor': '12000', 'LegsArmor': '13000', 'FaceID': '-1', 'Vitality': '16', 'Attunement': '14', 'Endurance': '28', 'Strength': '20', 'Dexterity': '7', 'Intelligence': '15', 'Faith': '8', 'Luck': '5', 'Humanity': '5', 'Resistance': '10', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2'} +- {'ID': '1003', 'Name': 'プロト版_壷に化けるNPC', 'SoulCount': '50000', 'RightHandWeapon1': '801000', 'LeftHandWeapon1': '1501000', 'LeftHandWeapon2': '1300000', 'HeadArmor': '240000', 'BodyArmor': '241000', 'HandsArmor': '242000', 'LegsArmor': '243000', 'SpellSlot1': '3550', 'FaceID': '-1', 'DefaultAI': '10100', 'Vitality': '14', 'Attunement': '8', 'Endurance': '13', 'Strength': '14', 'Dexterity': '11', 'Intelligence': '8', 'Faith': '8', 'Luck': '10', 'Humanity': '5', 'Resistance': '10', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '1010', 'Name': '2009年12月版_騎士', 'SoulCount': '50000', 'RightHandWeapon1': '201000', 'RightHandWeapon2': '1050000', 'LeftHandWeapon1': '1501000', 'LeftHandWeapon2': '1300000', 'HeadArmor': '210000', 'BodyArmor': '211000', 'HandsArmor': '212000', 'LegsArmor': '213000', 'FaceID': '-1', 'Vitality': '20', 'Attunement': '12', 'Endurance': '24', 'Strength': '18', 'Dexterity': '15', 'Intelligence': '7', 'Faith': '9', 'Luck': '11', 'Humanity': '5', 'Resistance': '10', 'HeadScale': '100', 'ChestScale': '100', 'AbdomenScale': '100', 'ArmScale': '100', 'LegScale': '100', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '1011', 'Name': '2009年12月版_神職', 'SoulCount': '50000', 'RightHandWeapon1': '801000', 'LeftHandWeapon1': '1450000', 'LeftHandWeapon2': '1300000', 'HeadArmor': '180000', 'BodyArmor': '181000', 'HandsArmor': '182000', 'LegsArmor': '183000', 'FaceID': '-1', 'Vitality': '16', 'Attunement': '16', 'Endurance': '28', 'Strength': '15', 'Dexterity': '12', 'Intelligence': '5', 'Faith': '18', 'Luck': '6', 'Humanity': '5', 'Resistance': '10', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '1012', 'Name': '2009年12月版_魔術師', 'SoulCount': '50000', 'RightHandWeapon1': '1300000', 'RightHandWeapon2': '201000', 'LeftHandWeapon1': '1404000', 'HeadArmor': '220000', 'BodyArmor': '221000', 'HandsArmor': '222000', 'LegsArmor': '223000', 'FaceID': '-1', 'Vitality': '14', 'Attunement': '24', 'Endurance': '16', 'Strength': '12', 'Dexterity': '12', 'Intelligence': '25', 'Faith': '3', 'Luck': '10', 'Humanity': '5', 'Resistance': '10', 'HeadScale': '-100', 'ChestScale': '-100', 'AbdomenScale': '-100', 'ArmScale': '-100', 'LegScale': '-100', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '1030', 'Name': '2010年4月版_盗賊', 'SoulCount': '50000', 'RightHandWeapon1': '800000', 'RightHandWeapon2': '1000000', 'LeftHandWeapon1': '1450000', 'LeftHandWeapon2': '1300000', 'HeadArmor': '50000', 'BodyArmor': '51000', 'HandsArmor': '52000', 'LegsArmor': '53000', 'FaceID': '-1', 'Vitality': '20', 'Attunement': '14', 'Endurance': '19', 'Strength': '18', 'Dexterity': '15', 'Intelligence': '7', 'Faith': '9', 'Luck': '8', 'Humanity': '3', 'Resistance': '6', 'HeadScale': '-100', 'ChestScale': '-100', 'AbdomenScale': '-100', 'ArmScale': '-100', 'LegScale': '-100', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '1031', 'Name': '2010年4月版_忍者', 'SoulCount': '50000', 'RightHandWeapon1': '201000', 'RightHandWeapon2': '1050000', 'LeftHandWeapon1': '1404000', 'LeftHandWeapon2': '1300000', 'HeadArmor': '60000', 'BodyArmor': '61000', 'HandsArmor': '62000', 'LegsArmor': '63000', 'RingSlot1': '128', 'SpellSlot1': '3550', 'FaceID': '-1', 'Vitality': '14', 'Attunement': '21', 'Endurance': '15', 'Strength': '14', 'Dexterity': '17', 'Intelligence': '20', 'Faith': '3', 'Luck': '5', 'Humanity': '2', 'Resistance': '8', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '1032', 'Name': '2010年4月版_黒騎士', 'SoulCount': '50000', 'RightHandWeapon1': '350000', 'RightHandWeapon2': '1100000', 'LeftHandWeapon1': '1501000', 'LeftHandWeapon2': '1300000', 'HeadArmor': '70000', 'BodyArmor': '71000', 'HandsArmor': '72000', 'LegsArmor': '73000', 'FaceID': '-1', 'Vitality': '99', 'Attunement': '99', 'Endurance': '99', 'Strength': '99', 'Dexterity': '99', 'Intelligence': '99', 'Faith': '99', 'Luck': '99', 'Humanity': '99', 'Resistance': '99', 'HeadScale': '100', 'ChestScale': '100', 'AbdomenScale': '100', 'ArmScale': '100', 'LegScale': '100', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '1040', 'Name': '2011年1月版_戦士', 'RightHandWeapon1': '201000', 'RightHandWeapon2': '1100000', 'LeftHandWeapon1': '1452000', 'HeadArmor': '210000', 'BodyArmor': '211000', 'HandsArmor': '212000', 'LegsArmor': '213000', 'FaceID': '1', 'Vitality': '15', 'Attunement': '9', 'Endurance': '12', 'Strength': '12', 'Dexterity': '11', 'Intelligence': '8', 'Faith': '8', 'Luck': '10', 'Humanity': '3', 'Resistance': '10', 'ChestScale': '100', 'ArmScale': '100', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '1041', 'Name': '2011年1月版_狩人', 'RightHandWeapon1': '401000', 'RightHandWeapon2': '1000000', 'LeftHandWeapon1': '1201000', 'LeftHandWeapon2': '1402000', 'HeadArmor': '240000', 'BodyArmor': '241000', 'HandsArmor': '242000', 'LegsArmor': '243000', 'ArrowSlot1': '2000000', 'ArrowSlot2': '2003000', 'RingSlot1': '100', 'FaceID': '1', 'ArrowSlot1Count': '30', 'ArrowSlot2Count': '10', 'Vitality': '12', 'Attunement': '10', 'Endurance': '13', 'Strength': '11', 'Dexterity': '12', 'Intelligence': '9', 'Faith': '8', 'Luck': '12', 'Humanity': '2', 'Resistance': '11', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '1042', 'Name': '2011年1月版_呪術師', 'RightHandWeapon1': '1300000', 'RightHandWeapon2': '701000', 'LeftHandWeapon1': '1402000', 'HeadArmor': '230000', 'BodyArmor': '231000', 'HandsArmor': '232000', 'LegsArmor': '233000', 'RingSlot1': '100', 'RingSlot2': '2', 'SpellSlot1': '4020', 'SpellSlot2': '4360', 'SpellSlot3': '3550', 'SpellSlot4': '6100', 'FaceID': '1', 'Vitality': '9', 'Attunement': '15', 'Endurance': '10', 'Strength': '9', 'Dexterity': '11', 'Intelligence': '15', 'Faith': '6', 'Luck': '11', 'Humanity': '3', 'Resistance': '9', 'HeadScale': '100', 'ChestScale': '100', 'ArmScale': '100', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '1043', 'Name': '2011年1月版_騎士', 'RightHandWeapon1': '202000', 'RightHandWeapon2': '802000', 'LeftHandWeapon1': '1450000', 'LeftHandWeapon2': '1360000', 'HeadArmor': '10000', 'BodyArmor': '11000', 'HandsArmor': '12000', 'LegsArmor': '13000', 'RingSlot1': '100', 'RingSlot2': '2', 'SpellSlot1': '5000', 'SpellSlot2': '5300', 'SpellSlot3': '5500', 'FaceID': '1', 'Vitality': '17', 'Attunement': '20', 'Endurance': '18', 'Strength': '14', 'Dexterity': '12', 'Intelligence': '13', 'Faith': '14', 'Luck': '13', 'Humanity': '5', 'Resistance': '14', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '1050', 'Name': '2011年4月版_戦士', 'RightHandWeapon1': '201000', 'RightHandWeapon2': '1000000', 'LeftHandWeapon1': '1450000', 'HeadArmor': '210000', 'BodyArmor': '211000', 'HandsArmor': '212000', 'LegsArmor': '213000', 'GoodSlot1': '201', 'FaceID': '30', 'Level': '1', 'Vitality': '14', 'Attunement': '4', 'Endurance': '10', 'Strength': '16', 'Dexterity': '9', 'Intelligence': '2', 'Faith': '6', 'Luck': '7', 'Humanity': '3', 'Resistance': '10', 'GoodSlot1Count': '5', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '1051', 'Name': '2011年4月版_騎士', 'RightHandWeapon1': '202000', 'RightHandWeapon2': '1360000', 'LeftHandWeapon1': '1452000', 'HeadArmor': '390000', 'BodyArmor': '391000', 'HandsArmor': '392000', 'LegsArmor': '393000', 'SpellSlot1': '5300', 'SpellSlot2': '5000', 'GoodSlot1': '201', 'GoodSlot7': '5000', 'GoodSlot8': '5300', 'FaceID': '31', 'Level': '1', 'Vitality': '12', 'Attunement': '12', 'Endurance': '12', 'Strength': '12', 'Dexterity': '8', 'Intelligence': '5', 'Faith': '10', 'Luck': '4', 'Humanity': '5', 'Resistance': '6', 'GoodSlot1Count': '5', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '1052', 'Name': '2011年4月版_魔術師', 'RightHandWeapon1': '1300000', 'RightHandWeapon2': '100000', 'LeftHandWeapon1': '1460000', 'HeadArmor': '220000', 'BodyArmor': '221000', 'HandsArmor': '222000', 'LegsArmor': '223000', 'SpellSlot1': '3300', 'SpellSlot2': '3000', 'GoodSlot1': '201', 'GoodSlot7': '3000', 'GoodSlot8': '3300', 'GoodSlot9': '2603', 'FaceID': '32', 'Level': '1', 'Vitality': '8', 'Attunement': '15', 'Endurance': '6', 'Strength': '7', 'Dexterity': '12', 'Intelligence': '13', 'Faith': '5', 'Luck': '6', 'Humanity': '3', 'Resistance': '9', 'GoodSlot1Count': '5', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2'} +- {'ID': '1053', 'Name': '2011年4月版_呪術師', 'RightHandWeapon1': '1330000', 'RightHandWeapon2': '700000', 'LeftHandWeapon1': '1403000', 'HeadArmor': '230000', 'BodyArmor': '231000', 'HandsArmor': '232000', 'LegsArmor': '233000', 'SpellSlot1': '4000', 'GoodSlot1': '201', 'GoodSlot8': '4000', 'GoodSlot9': '2603', 'FaceID': '33', 'Level': '1', 'Vitality': '9', 'Attunement': '12', 'Endurance': '9', 'Strength': '8', 'Dexterity': '11', 'Intelligence': '16', 'Faith': '5', 'Luck': '5', 'Humanity': '2', 'Resistance': '7', 'GoodSlot1Count': '5', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '1054', 'Name': '2011年4月版_戦士', 'RightHandWeapon1': '203000', 'HeadArmor': '210000', 'BodyArmor': '211000', 'HandsArmor': '212000', 'LegsArmor': '213000', 'FaceID': '30', 'Level': '1', 'Vitality': '14', 'Attunement': '4', 'Endurance': '10', 'Strength': '16', 'Dexterity': '9', 'Intelligence': '2', 'Faith': '6', 'Luck': '7', 'Resistance': '10', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'DrawType': '4', 'Gender': '1'} +- {'ID': '1055', 'Name': '2011年4月版_騎士', 'RightHandWeapon1': '203000', 'HeadArmor': '390000', 'BodyArmor': '391000', 'HandsArmor': '392000', 'LegsArmor': '393000', 'SpellSlot1': '5300', 'SpellSlot2': '5000', 'GoodSlot7': '5000', 'GoodSlot8': '5300', 'FaceID': '31', 'Level': '1', 'Vitality': '12', 'Attunement': '12', 'Endurance': '12', 'Strength': '12', 'Dexterity': '8', 'Intelligence': '5', 'Faith': '10', 'Luck': '4', 'Resistance': '6', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'DrawType': '4', 'Gender': '1'} +- {'ID': '1056', 'Name': '2011年4月版_魔術師', 'RightHandWeapon1': '203000', 'HeadArmor': '220000', 'BodyArmor': '221000', 'HandsArmor': '222000', 'LegsArmor': '223000', 'SpellSlot1': '3300', 'SpellSlot2': '3000', 'GoodSlot7': '3000', 'GoodSlot8': '3300', 'GoodSlot9': '2603', 'FaceID': '32', 'Level': '1', 'Vitality': '8', 'Attunement': '15', 'Endurance': '6', 'Strength': '7', 'Dexterity': '12', 'Intelligence': '13', 'Faith': '5', 'Luck': '6', 'Resistance': '9', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'DrawType': '4'} +- {'ID': '1057', 'Name': '2011年4月版_呪術師', 'RightHandWeapon1': '203000', 'HeadArmor': '230000', 'BodyArmor': '231000', 'HandsArmor': '232000', 'LegsArmor': '233000', 'SpellSlot1': '4000', 'GoodSlot8': '4000', 'GoodSlot9': '2603', 'FaceID': '33', 'Level': '1', 'Vitality': '9', 'Attunement': '12', 'Endurance': '9', 'Strength': '8', 'Dexterity': '11', 'Intelligence': '16', 'Faith': '5', 'Luck': '5', 'Resistance': '7', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'DrawType': '4', 'Gender': '1'} +- {'ID': '2000', 'Name': '初期キャラ_戦士', 'RightHandWeapon1': '212000', 'HeadArmor': '210000', 'BodyArmor': '211000', 'HandsArmor': '212000', 'LegsArmor': '213000', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '-1', 'Level': '4', 'Vitality': '11', 'Attunement': '8', 'Endurance': '12', 'Strength': '13', 'Dexterity': '13', 'Intelligence': '9', 'Faith': '9', 'Luck': '10', 'Resistance': '11', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'DrawType': '4', 'Gender': '1'} +- {'ID': '2001', 'Name': '初期キャラ_騎士', 'RightHandWeapon1': '212000', 'HeadArmor': '390000', 'BodyArmor': '391000', 'HandsArmor': '392000', 'LegsArmor': '393000', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '-1', 'Level': '5', 'Vitality': '14', 'Attunement': '10', 'Endurance': '10', 'Strength': '11', 'Dexterity': '11', 'Intelligence': '9', 'Faith': '11', 'Luck': '10', 'Resistance': '10', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '13', 'DrawType': '4', 'Gender': '1', 'Covenant': '1'} +- {'ID': '2002', 'Name': '初期キャラ_放浪者', 'RightHandWeapon1': '212000', 'HeadArmor': '360000', 'BodyArmor': '361000', 'HandsArmor': '362000', 'LegsArmor': '363000', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '-1', 'Level': '3', 'Vitality': '10', 'Attunement': '11', 'Endurance': '10', 'Strength': '10', 'Dexterity': '14', 'Intelligence': '11', 'Faith': '8', 'Luck': '10', 'Resistance': '12', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'DrawType': '4', 'Gender': '1'} +- {'ID': '2003', 'Name': '初期キャラ_盗賊', 'RightHandWeapon1': '212000', 'HeadArmor': '300000', 'BodyArmor': '301000', 'HandsArmor': '302000', 'LegsArmor': '303000', 'GoodSlot1': '2100', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '-1', 'Level': '5', 'Vitality': '9', 'Attunement': '11', 'Endurance': '9', 'Strength': '9', 'Dexterity': '15', 'Intelligence': '12', 'Faith': '11', 'Luck': '10', 'Resistance': '10', 'GoodSlot1Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'DrawType': '4', 'Gender': '1'} +- {'ID': '2004', 'Name': '初期キャラ_山賊', 'RightHandWeapon1': '212000', 'HeadArmor': '50000', 'BodyArmor': '51000', 'HandsArmor': '52000', 'LegsArmor': '53000', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '-1', 'Level': '4', 'Vitality': '12', 'Attunement': '8', 'Endurance': '14', 'Strength': '14', 'Dexterity': '9', 'Intelligence': '8', 'Faith': '10', 'Luck': '10', 'Resistance': '11', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'DrawType': '4', 'Gender': '1'} +- {'ID': '2005', 'Name': '初期キャラ_狩人', 'RightHandWeapon1': '212000', 'HeadArmor': '900000', 'BodyArmor': '241000', 'HandsArmor': '242000', 'LegsArmor': '243000', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '-1', 'Level': '4', 'Vitality': '11', 'Attunement': '9', 'Endurance': '11', 'Strength': '12', 'Dexterity': '14', 'Intelligence': '9', 'Faith': '9', 'Luck': '10', 'Resistance': '11', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'DrawType': '4', 'Gender': '1'} +- {'ID': '2006', 'Name': '初期キャラ_魔術師', 'RightHandWeapon1': '212000', 'HeadArmor': '220000', 'BodyArmor': '221000', 'HandsArmor': '222000', 'LegsArmor': '223000', 'SpellSlot1': '3000', 'GoodSlot1': '3000', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '-1', 'Level': '3', 'Vitality': '8', 'Attunement': '15', 'Endurance': '8', 'Strength': '9', 'Dexterity': '11', 'Intelligence': '15', 'Faith': '8', 'Luck': '10', 'Resistance': '8', 'GoodSlot1Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'DrawType': '4', 'Gender': '1'} +- {'ID': '2007', 'Name': '初期キャラ_呪術師', 'RightHandWeapon1': '212000', 'HeadArmor': '230000', 'BodyArmor': '231000', 'HandsArmor': '232000', 'LegsArmor': '233000', 'SpellSlot1': '4000', 'GoodSlot1': '4000', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '-1', 'Level': '1', 'Vitality': '10', 'Attunement': '12', 'Endurance': '11', 'Strength': '12', 'Dexterity': '9', 'Intelligence': '10', 'Faith': '8', 'Luck': '10', 'Resistance': '12', 'GoodSlot1Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'DrawType': '4', 'Gender': '1'} +- {'ID': '2008', 'Name': '初期キャラ_僧侶', 'RightHandWeapon1': '212000', 'HeadArmor': '900000', 'BodyArmor': '311000', 'HandsArmor': '312000', 'LegsArmor': '313000', 'SpellSlot1': '5000', 'GoodSlot1': '5000', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '-1', 'Level': '2', 'Vitality': '11', 'Attunement': '11', 'Endurance': '9', 'Strength': '12', 'Dexterity': '8', 'Intelligence': '8', 'Faith': '14', 'Luck': '10', 'Resistance': '11', 'GoodSlot1Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '13', 'DrawType': '4', 'Gender': '1', 'Covenant': '1'} +- {'ID': '2009', 'Name': '初期キャラ_持たざるもの', 'RightHandWeapon1': '212000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '-1', 'Level': '6', 'Vitality': '11', 'Attunement': '11', 'Endurance': '11', 'Strength': '11', 'Dexterity': '11', 'Intelligence': '11', 'Faith': '11', 'Luck': '10', 'Resistance': '11', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'DrawType': '4', 'Gender': '1'} +- {'ID': '2020', 'Name': 'タイトル選択_戦士', 'RightHandWeapon1': '201000', 'RightHandWeapon2': '1250000', 'LeftHandWeapon1': '1450000', 'HeadArmor': '210000', 'BodyArmor': '211000', 'HandsArmor': '212000', 'LegsArmor': '213000', 'BoltSlot1': '2100000', 'GoodSlot1': '201', 'GoodSlot2': '100', 'GoodSlot3': '106', 'GoodSlot5': '2607', 'FaceID': '30', 'BoltSlot1Count': '20', 'Level': '1', 'Vitality': '15', 'Attunement': '6', 'Endurance': '11', 'Strength': '12', 'Dexterity': '13', 'Intelligence': '6', 'Faith': '5', 'Luck': '7', 'Humanity': '1', 'Resistance': '10', 'GoodSlot1Count': '5', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot5Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '2021', 'Name': 'タイトル選択_騎士+奇跡', 'RightHandWeapon1': '202000', 'RightHandWeapon2': '1000000', 'LeftHandWeapon1': '1452000', 'LeftHandWeapon2': '1360000', 'HeadArmor': '390000', 'BodyArmor': '391000', 'HandsArmor': '392000', 'LegsArmor': '393000', 'SpellSlot1': '5000', 'SpellSlot2': '5300', 'GoodSlot1': '201', 'GoodSlot2': '100', 'GoodSlot3': '106', 'GoodSlot5': '2607', 'GoodSlot6': '5000', 'GoodSlot7': '5300', 'FaceID': '31', 'Level': '1', 'Vitality': '13', 'Attunement': '12', 'Endurance': '12', 'Strength': '14', 'Dexterity': '6', 'Intelligence': '4', 'Faith': '10', 'Luck': '4', 'Humanity': '1', 'Resistance': '11', 'GoodSlot1Count': '5', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot5Count': '1', 'GoodSlot6Count': '1', 'GoodSlot7Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '2022', 'Name': 'タイトル選択_魔術師', 'RightHandWeapon1': '1300000', 'RightHandWeapon2': '100000', 'LeftHandWeapon1': '1460000', 'BodyArmor': '221000', 'HandsArmor': '222000', 'LegsArmor': '223000', 'SpellSlot1': '3000', 'SpellSlot2': '3300', 'GoodSlot1': '201', 'GoodSlot2': '100', 'GoodSlot3': '106', 'GoodSlot5': '2607', 'GoodSlot6': '3000', 'GoodSlot7': '3300', 'FaceID': '32', 'Level': '1', 'Vitality': '7', 'Attunement': '15', 'Endurance': '9', 'Strength': '8', 'Dexterity': '10', 'Intelligence': '16', 'Faith': '5', 'Luck': '5', 'Humanity': '1', 'Resistance': '9', 'GoodSlot1Count': '5', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot5Count': '1', 'GoodSlot6Count': '1', 'GoodSlot7Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2'} +- {'ID': '2023', 'Name': 'タイトル選択_呪術師', 'RightHandWeapon1': '1330000', 'RightHandWeapon2': '700000', 'LeftHandWeapon1': '1408000', 'LeftHandWeapon2': '1200000', 'HeadArmor': '230000', 'BodyArmor': '231000', 'HandsArmor': '232000', 'LegsArmor': '233000', 'ArrowSlot1': '2000000', 'SpellSlot1': '4000', 'SpellSlot2': '4310', 'GoodSlot1': '201', 'GoodSlot2': '109', 'GoodSlot3': '106', 'GoodSlot5': '2607', 'GoodSlot6': '4000', 'GoodSlot7': '4310', 'FaceID': '33', 'ArrowSlot1Count': '20', 'Level': '1', 'Vitality': '9', 'Attunement': '13', 'Endurance': '9', 'Strength': '10', 'Dexterity': '7', 'Intelligence': '12', 'Faith': '3', 'Luck': '13', 'Humanity': '1', 'Resistance': '9', 'GoodSlot1Count': '5', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot5Count': '1', 'GoodSlot6Count': '1', 'GoodSlot7Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1', 'Covenant': '6'} +- {'ID': '2024', 'Name': 'タイトル選択_太陽騎士', 'RightHandWeapon1': '206001', 'RightHandWeapon2': '301001', 'LeftHandWeapon1': '1472000', 'LeftHandWeapon2': '1360000', 'HeadArmor': '160000', 'BodyArmor': '161000', 'HandsArmor': '162000', 'LegsArmor': '163000', 'RingSlot1': '100', 'SpellSlot1': '6000', 'SpellSlot2': '5500', 'GoodSlot1': '201', 'GoodSlot2': '100', 'GoodSlot3': '106', 'GoodSlot5': '2607', 'GoodSlot6': '6000', 'GoodSlot7': '5500', 'FaceID': '34', 'Level': '40', 'Vitality': '20', 'Attunement': '14', 'Endurance': '16', 'Strength': '21', 'Dexterity': '17', 'Intelligence': '6', 'Faith': '16', 'Luck': '5', 'Humanity': '1', 'Resistance': '10', 'GoodSlot1Count': '5', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot5Count': '1', 'GoodSlot6Count': '1', 'GoodSlot7Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '7', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1', 'Covenant': '2'} +- {'ID': '2025', 'Name': 'タイトル選択_黒騎士', 'RightHandWeapon1': '310000', 'RightHandWeapon2': '1105000', 'LeftHandWeapon1': '1474000', 'HeadArmor': '320000', 'BodyArmor': '321000', 'HandsArmor': '322000', 'LegsArmor': '323000', 'GoodSlot1': '201', 'GoodSlot2': '102', 'GoodSlot3': '106', 'GoodSlot5': '2607', 'FaceID': '30', 'Level': '1', 'Vitality': '8', 'Attunement': '7', 'Endurance': '10', 'Strength': '13', 'Dexterity': '12', 'Intelligence': '7', 'Faith': '5', 'Luck': '8', 'Humanity': '1', 'Resistance': '10', 'GoodSlot1Count': '5', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot5Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '2100', 'Name': '普通', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '2', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'Gender': '1'} +- {'ID': '2101', 'Name': '痩せ型', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '1', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'HeadScale': '-50', 'ChestScale': '-50', 'AbdomenScale': '-50', 'ArmScale': '-50', 'LegScale': '-50', 'Gender': '1'} +- {'ID': '2102', 'Name': 'とても痩せ型', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '1', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'HeadScale': '-100', 'ChestScale': '-100', 'AbdomenScale': '-100', 'ArmScale': '-100', 'LegScale': '-100', 'Gender': '1'} +- {'ID': '2103', 'Name': '太め', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '2', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'HeadScale': '50', 'ChestScale': '50', 'AbdomenScale': '50', 'ArmScale': '50', 'LegScale': '50', 'Gender': '1'} +- {'ID': '2104', 'Name': 'とても太め', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '2', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'HeadScale': '100', 'ChestScale': '100', 'AbdomenScale': '100', 'ArmScale': '100', 'LegScale': '100', 'Gender': '1'} +- {'ID': '2105', 'Name': '上半身太り', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '3', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'ChestScale': '100', 'ArmScale': '100', 'Gender': '1'} +- {'ID': '2106', 'Name': '下半身太り', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '3', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'AbdomenScale': '100', 'LegScale': '100', 'Gender': '1'} +- {'ID': '2107', 'Name': '頭でっかち', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '3', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'HeadScale': '100', 'Gender': '1'} +- {'ID': '2108', 'Name': '頭ちっちゃい', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '3', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'HeadScale': '-100', 'Gender': '1'} +- {'ID': '2200', 'Name': '普通', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '2', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'Gender': '1'} +- {'ID': '2201', 'Name': '痩せ型', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '1', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'HeadScale': '-50', 'ChestScale': '-50', 'AbdomenScale': '-50', 'ArmScale': '-50', 'LegScale': '-50', 'Gender': '1'} +- {'ID': '2202', 'Name': 'とても痩せ型', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '1', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'HeadScale': '-100', 'ChestScale': '-100', 'AbdomenScale': '-100', 'ArmScale': '-100', 'LegScale': '-100', 'Gender': '1'} +- {'ID': '2203', 'Name': '太め', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '2', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'HeadScale': '50', 'ChestScale': '50', 'AbdomenScale': '50', 'ArmScale': '50', 'LegScale': '50', 'Gender': '1'} +- {'ID': '2204', 'Name': 'とても太め', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '2', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'HeadScale': '100', 'ChestScale': '100', 'AbdomenScale': '100', 'ArmScale': '100', 'LegScale': '100', 'Gender': '1'} +- {'ID': '2205', 'Name': '上半身太り', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '3', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'ChestScale': '100', 'ArmScale': '100', 'Gender': '1'} +- {'ID': '2206', 'Name': '下半身太り', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '3', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'AbdomenScale': '100', 'LegScale': '100', 'Gender': '1'} +- {'ID': '2207', 'Name': '頭でっかち', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '3', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'HeadScale': '100', 'Gender': '1'} +- {'ID': '2208', 'Name': '頭ちっちゃい', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '3', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'HeadScale': '-100', 'Gender': '1'} +- {'ID': '2300', 'Name': '男性顔タイプ1', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '1000', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'HeadScale': '50', 'ChestScale': '50', 'AbdomenScale': '50', 'ArmScale': '50', 'LegScale': '50', 'Gender': '1'} +- {'ID': '2301', 'Name': '男性顔タイプ2', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '1001', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'HeadScale': '50', 'ChestScale': '50', 'AbdomenScale': '50', 'ArmScale': '50', 'LegScale': '50', 'Gender': '1'} +- {'ID': '2302', 'Name': '男性顔タイプ3', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '1002', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'HeadScale': '50', 'ChestScale': '50', 'AbdomenScale': '50', 'ArmScale': '50', 'LegScale': '50', 'Gender': '1'} +- {'ID': '2303', 'Name': '男性顔タイプ4', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '1003', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'HeadScale': '50', 'ChestScale': '50', 'AbdomenScale': '50', 'ArmScale': '50', 'LegScale': '50', 'Gender': '1'} +- {'ID': '2304', 'Name': '男性顔タイプ5', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '1004', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'HeadScale': '50', 'ChestScale': '50', 'AbdomenScale': '50', 'ArmScale': '50', 'LegScale': '50', 'Gender': '1'} +- {'ID': '2305', 'Name': '男性顔タイプ6', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '1005', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'HeadScale': '50', 'ChestScale': '50', 'AbdomenScale': '50', 'ArmScale': '50', 'LegScale': '50', 'Gender': '1'} +- {'ID': '2306', 'Name': '男性顔タイプ7', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '1006', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'HeadScale': '50', 'ChestScale': '50', 'AbdomenScale': '50', 'ArmScale': '50', 'LegScale': '50', 'Gender': '1'} +- {'ID': '2307', 'Name': '男性顔タイプ8', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '1007', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'HeadScale': '50', 'ChestScale': '50', 'AbdomenScale': '50', 'ArmScale': '50', 'LegScale': '50', 'Gender': '1'} +- {'ID': '2308', 'Name': '男性顔タイプ9', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '1008', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'HeadScale': '50', 'ChestScale': '50', 'AbdomenScale': '50', 'ArmScale': '50', 'LegScale': '50', 'Gender': '1'} +- {'ID': '2309', 'Name': '男性顔タイプ10', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '1009', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'HeadScale': '50', 'ChestScale': '50', 'AbdomenScale': '50', 'ArmScale': '50', 'LegScale': '50', 'Gender': '1'} +- {'ID': '2310', 'Name': '女性顔タイプ1', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '2000', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'HeadScale': '50', 'ChestScale': '50', 'AbdomenScale': '50', 'ArmScale': '50', 'LegScale': '50'} +- {'ID': '2311', 'Name': '女性顔タイプ2', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '2001', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'HeadScale': '50', 'ChestScale': '50', 'AbdomenScale': '50', 'ArmScale': '50', 'LegScale': '50'} +- {'ID': '2312', 'Name': '女性顔タイプ3', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '2002', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'HeadScale': '50', 'ChestScale': '50', 'AbdomenScale': '50', 'ArmScale': '50', 'LegScale': '50'} +- {'ID': '2313', 'Name': '女性顔タイプ4', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '2003', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'HeadScale': '50', 'ChestScale': '50', 'AbdomenScale': '50', 'ArmScale': '50', 'LegScale': '50'} +- {'ID': '2314', 'Name': '女性顔タイプ5', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '2004', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'HeadScale': '50', 'ChestScale': '50', 'AbdomenScale': '50', 'ArmScale': '50', 'LegScale': '50'} +- {'ID': '2315', 'Name': '女性顔タイプ6', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '2005', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'HeadScale': '50', 'ChestScale': '50', 'AbdomenScale': '50', 'ArmScale': '50', 'LegScale': '50'} +- {'ID': '2316', 'Name': '女性顔タイプ7', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '2006', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'HeadScale': '50', 'ChestScale': '50', 'AbdomenScale': '50', 'ArmScale': '50', 'LegScale': '50'} +- {'ID': '2317', 'Name': '女性顔タイプ8', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '2007', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'HeadScale': '50', 'ChestScale': '50', 'AbdomenScale': '50', 'ArmScale': '50', 'LegScale': '50'} +- {'ID': '2318', 'Name': '女性顔タイプ9', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '2008', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'HeadScale': '50', 'ChestScale': '50', 'AbdomenScale': '50', 'ArmScale': '50', 'LegScale': '50'} +- {'ID': '2319', 'Name': '女性顔タイプ10', 'SoulCount': '50000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'FaceID': '2009', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'HeadScale': '50', 'ChestScale': '50', 'AbdomenScale': '50', 'ArmScale': '50', 'LegScale': '50'} +- {'ID': '2400', 'Name': '不要'} +- {'ID': '2401', 'Name': '女神の祝福', 'GoodSlot1': '240', 'GoodSlot1Count': '3'} +- {'ID': '2402', 'Name': '黒火炎壷', 'GoodSlot1': '297', 'GoodSlot1Count': '10'} +- {'ID': '2403', 'Name': '人間性の双子', 'GoodSlot1': '501', 'GoodSlot1Count': '1'} +- {'ID': '2404', 'Name': '遠眼鏡', 'GoodSlot1': '371', 'GoodSlot1Count': '1'} +- {'ID': '2405', 'Name': 'ペンダント', 'GoodSlot1': '376', 'GoodSlot1Count': '1'} +- {'ID': '2406', 'Name': '万能鍵', 'GoodSlot1': '2100', 'GoodSlot1Count': '1'} +- {'ID': '2407', 'Name': '小さな生命の指輪', 'RingSlot1': '111'} +- {'ID': '2408', 'Name': '古い魔女の指輪', 'RingSlot1': '137'} +- {'ID': '3000', 'Name': '初期キャラ_戦士', 'RightHandWeapon1': '201000', 'LeftHandWeapon1': '1450000', 'HeadArmor': '210000', 'BodyArmor': '211000', 'HandsArmor': '212000', 'LegsArmor': '213000', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '-1', 'Level': '4', 'Vitality': '11', 'Attunement': '8', 'Endurance': '12', 'Strength': '13', 'Dexterity': '13', 'Intelligence': '9', 'Faith': '9', 'Luck': '10', 'Resistance': '11', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '3001', 'Name': '初期キャラ_騎士', 'RightHandWeapon1': '202000', 'LeftHandWeapon1': '1452000', 'HeadArmor': '390000', 'BodyArmor': '391000', 'HandsArmor': '392000', 'LegsArmor': '393000', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '-1', 'Level': '5', 'Vitality': '14', 'Attunement': '10', 'Endurance': '10', 'Strength': '11', 'Dexterity': '11', 'Intelligence': '9', 'Faith': '11', 'Luck': '10', 'Resistance': '10', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '13', 'Gender': '1', 'Covenant': '1'} +- {'ID': '3002', 'Name': '初期キャラ_放浪者', 'RightHandWeapon1': '400000', 'LeftHandWeapon1': '1408000', 'HeadArmor': '360000', 'BodyArmor': '361000', 'HandsArmor': '362000', 'LegsArmor': '363000', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '-1', 'Level': '3', 'Vitality': '10', 'Attunement': '11', 'Endurance': '10', 'Strength': '10', 'Dexterity': '14', 'Intelligence': '11', 'Faith': '8', 'Luck': '10', 'Resistance': '12', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '3003', 'Name': '初期キャラ_盗賊', 'RightHandWeapon1': '103000', 'LeftHandWeapon1': '1404000', 'HeadArmor': '300000', 'BodyArmor': '301000', 'HandsArmor': '302000', 'LegsArmor': '303000', 'GoodSlot1': '2100', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '-1', 'Level': '5', 'Vitality': '9', 'Attunement': '11', 'Endurance': '9', 'Strength': '9', 'Dexterity': '15', 'Intelligence': '12', 'Faith': '11', 'Luck': '10', 'Resistance': '10', 'GoodSlot1Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '3004', 'Name': '初期キャラ_山賊', 'RightHandWeapon1': '701000', 'LeftHandWeapon1': '1462000', 'HeadArmor': '50000', 'BodyArmor': '51000', 'HandsArmor': '52000', 'LegsArmor': '53000', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '-1', 'Level': '4', 'Vitality': '12', 'Attunement': '8', 'Endurance': '14', 'Strength': '14', 'Dexterity': '9', 'Intelligence': '8', 'Faith': '10', 'Luck': '10', 'Resistance': '11', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '3005', 'Name': '初期キャラ_狩人', 'RightHandWeapon1': '200000', 'RightHandWeapon2': '1200000', 'LeftHandWeapon1': '1402000', 'HeadArmor': '900000', 'BodyArmor': '241000', 'HandsArmor': '242000', 'LegsArmor': '243000', 'ArrowSlot1': '2000000', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '-1', 'ArrowSlot1Count': '30', 'Level': '4', 'Vitality': '11', 'Attunement': '9', 'Endurance': '11', 'Strength': '12', 'Dexterity': '14', 'Intelligence': '9', 'Faith': '9', 'Luck': '10', 'Resistance': '11', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '3006', 'Name': '初期キャラ_魔術師', 'RightHandWeapon1': '100000', 'RightHandWeapon2': '1300000', 'LeftHandWeapon1': '1403000', 'HeadArmor': '220000', 'BodyArmor': '221000', 'HandsArmor': '222000', 'LegsArmor': '223000', 'SpellSlot1': '3000', 'GoodSlot1': '3000', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '-1', 'Level': '3', 'Vitality': '8', 'Attunement': '15', 'Endurance': '8', 'Strength': '9', 'Dexterity': '11', 'Intelligence': '15', 'Faith': '8', 'Luck': '10', 'Resistance': '8', 'GoodSlot1Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '3007', 'Name': '初期キャラ_呪術師', 'RightHandWeapon1': '700000', 'RightHandWeapon2': '1330000', 'LeftHandWeapon1': '1406000', 'HeadArmor': '230000', 'BodyArmor': '231000', 'HandsArmor': '232000', 'LegsArmor': '233000', 'SpellSlot1': '4000', 'GoodSlot1': '4000', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '-1', 'Level': '1', 'Vitality': '10', 'Attunement': '12', 'Endurance': '11', 'Strength': '12', 'Dexterity': '9', 'Intelligence': '10', 'Faith': '8', 'Luck': '10', 'Resistance': '12', 'GoodSlot1Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '3008', 'Name': '初期キャラ_僧侶', 'RightHandWeapon1': '801000', 'RightHandWeapon2': '1361000', 'LeftHandWeapon1': '1400000', 'HeadArmor': '900000', 'BodyArmor': '311000', 'HandsArmor': '312000', 'LegsArmor': '313000', 'SpellSlot1': '5000', 'GoodSlot1': '5000', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '-1', 'Level': '2', 'Vitality': '11', 'Attunement': '11', 'Endurance': '9', 'Strength': '12', 'Dexterity': '8', 'Intelligence': '8', 'Faith': '14', 'Luck': '10', 'Resistance': '11', 'GoodSlot1Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '13', 'Gender': '1', 'Covenant': '1'} +- {'ID': '3009', 'Name': '初期キャラ_持たざるもの', 'RightHandWeapon1': '800000', 'LeftHandWeapon1': '1409000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '903000', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '-1', 'Level': '6', 'Vitality': '11', 'Attunement': '11', 'Endurance': '11', 'Strength': '11', 'Dexterity': '11', 'Intelligence': '11', 'Faith': '11', 'Luck': '10', 'Resistance': '11', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '6000', 'Name': '太陽の騎士\u3000城下1', 'RightHandWeapon1': '206003', 'RightHandWeapon2': '1365000', 'LeftHandWeapon1': '1472003', 'HeadArmor': '160002', 'BodyArmor': '161002', 'HandsArmor': '162002', 'LegsArmor': '163002', 'RingSlot1': '139', 'SpellSlot1': '15500', 'SpellSlot2': '15010', 'FaceID': '6000', 'Level': '35', 'Vitality': '16', 'Attunement': '12', 'Endurance': '20', 'Strength': '20', 'Dexterity': '14', 'Intelligence': '9', 'Faith': '14', 'Luck': '1', 'Humanity': '5', 'Resistance': '15', 'ChestScale': '70', 'AbdomenScale': '10', 'ArmScale': '30', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1', 'Covenant': '3'} +- {'ID': '6002', 'Name': '太陽の騎士\u3000王城2', 'RightHandWeapon1': '206012', 'RightHandWeapon2': '1365000', 'LeftHandWeapon1': '1472012', 'HeadArmor': '160010', 'BodyArmor': '161010', 'HandsArmor': '162010', 'LegsArmor': '163010', 'RingSlot1': '139', 'SpellSlot1': '15500', 'SpellSlot2': '15010', 'FaceID': '6000', 'Level': '75', 'Vitality': '24', 'Attunement': '12', 'Endurance': '23', 'Strength': '30', 'Dexterity': '25', 'Intelligence': '10', 'Faith': '14', 'Luck': '1', 'Humanity': '5', 'Resistance': '22', 'ChestScale': '70', 'AbdomenScale': '10', 'ArmScale': '30', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1', 'Covenant': '3'} +- {'ID': '6003', 'Name': '太陽の騎士\u3000廃都', 'RightHandWeapon1': '206015', 'RightHandWeapon2': '1365000', 'LeftHandWeapon1': '1472015', 'HeadArmor': '160010', 'BodyArmor': '161010', 'HandsArmor': '162010', 'LegsArmor': '163010', 'RingSlot1': '139', 'SpellSlot1': '15500', 'SpellSlot2': '15010', 'FaceID': '6000', 'Level': '95', 'Vitality': '25', 'Attunement': '12', 'Endurance': '25', 'Strength': '40', 'Dexterity': '30', 'Intelligence': '11', 'Faith': '14', 'Luck': '1', 'Humanity': '5', 'Resistance': '23', 'ChestScale': '70', 'AbdomenScale': '10', 'ArmScale': '30', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1', 'Covenant': '3'} +- {'ID': '6004', 'Name': '太陽の騎士\u3000廃都(太陽虫Ver)', 'RightHandWeapon1': '206015', 'RightHandWeapon2': '1365000', 'LeftHandWeapon1': '1472015', 'HeadArmor': '190000', 'BodyArmor': '161010', 'HandsArmor': '162010', 'LegsArmor': '163010', 'RingSlot1': '139', 'SpellSlot1': '15500', 'SpellSlot2': '15010', 'FaceID': '6001', 'Level': '95', 'Vitality': '25', 'Attunement': '12', 'Endurance': '25', 'Strength': '40', 'Dexterity': '30', 'Intelligence': '11', 'Faith': '14', 'Luck': '1', 'Humanity': '5', 'Resistance': '23', 'HeadScale': '50', 'ChestScale': '70', 'AbdomenScale': '10', 'ArmScale': '30', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1', 'Covenant': '3'} +- {'ID': '6010', 'Name': '暗月の騎士', 'RightHandWeapon1': '602012', 'LeftHandWeapon1': '101012', 'LeftHandWeapon2': '1366000', 'HeadArmor': '450005', 'BodyArmor': '451005', 'HandsArmor': '452005', 'LegsArmor': '453005', 'SpellSlot1': '15910', 'FaceID': '6010', 'Level': '75', 'Vitality': '17', 'Attunement': '11', 'Endurance': '21', 'Strength': '26', 'Dexterity': '32', 'Intelligence': '13', 'Faith': '24', 'Luck': '1', 'Resistance': '16', 'HeadScale': '-40', 'ChestScale': '-20', 'AbdomenScale': '-50', 'ArmScale': '-30', 'LegScale': '-40', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Covenant': '8'} +- {'ID': '6020', 'Name': '騎士オストラ', 'RightHandWeapon1': '209008', 'LeftHandWeapon1': '1456005', 'HeadArmor': '350006', 'BodyArmor': '351006', 'HandsArmor': '352006', 'LegsArmor': '353006', 'FaceID': '6020', 'Level': '1', 'Vitality': '1', 'Attunement': '1', 'Endurance': '1', 'Strength': '1', 'Dexterity': '1', 'Intelligence': '1', 'Faith': '1', 'Luck': '1', 'Resistance': '1', 'HeadScale': '-20', 'ChestScale': '20', 'AbdomenScale': '-30', 'LegScale': '-10', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1'} +- {'ID': '6021', 'Name': '騎士オストラ(敵対)', 'RightHandWeapon1': '209008', 'LeftHandWeapon1': '1456005', 'HeadArmor': '2350006', 'BodyArmor': '2351006', 'HandsArmor': '2352006', 'LegsArmor': '2353006', 'FaceID': '6021', 'Level': '55', 'Vitality': '20', 'Attunement': '9', 'Endurance': '16', 'Strength': '26', 'Dexterity': '27', 'Intelligence': '9', 'Faith': '16', 'Luck': '1', 'Resistance': '17', 'HeadScale': '-20', 'ChestScale': '20', 'AbdomenScale': '-30', 'LegScale': '-10', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'DrawType': '4', 'Gender': '1'} +- {'ID': '6030', 'Name': '”ビッグハット”ロガーン\u3000王城1〜拠点', 'RightHandWeapon1': '1303000', 'RightHandWeapon2': '400010', 'LeftHandWeapon1': '1403010', 'HeadArmor': '380005', 'BodyArmor': '381005', 'HandsArmor': '382008', 'LegsArmor': '383008', 'SpellSlot1': '13010', 'SpellSlot2': '13030', 'SpellSlot3': '13040', 'SpellSlot4': '13060', 'FaceID': '6030', 'Level': '65', 'Vitality': '17', 'Attunement': '22', 'Endurance': '17', 'Strength': '11', 'Dexterity': '16', 'Intelligence': '41', 'Faith': '12', 'Luck': '1', 'Resistance': '14', 'HeadScale': '100', 'ChestScale': '-100', 'AbdomenScale': '50', 'ArmScale': '-100', 'LegScale': '-100', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1'} +- {'ID': '6031', 'Name': '”ビッグハット”ロガーン\u3000結晶', 'RightHandWeapon1': '1303000', 'RightHandWeapon2': '400014', 'LeftHandWeapon1': '1403014', 'HeadArmor': '380005', 'BodyArmor': '381005', 'HandsArmor': '382010', 'LegsArmor': '383010', 'SpellSlot1': '13010', 'SpellSlot2': '13030', 'SpellSlot3': '13050', 'SpellSlot4': '13070', 'FaceID': '6030', 'Level': '85', 'Vitality': '17', 'Attunement': '22', 'Endurance': '18', 'Strength': '12', 'Dexterity': '17', 'Intelligence': '55', 'Faith': '12', 'Luck': '1', 'Resistance': '17', 'HeadScale': '100', 'ChestScale': '-100', 'AbdomenScale': '50', 'ArmScale': '-100', 'LegScale': '-100', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1'} +- {'ID': '6032', 'Name': '”ビッグハット”ロガーン\u3000結晶亡者', 'RightHandWeapon1': '1306000', 'RightHandWeapon2': '400014', 'LeftHandWeapon1': '1403014', 'HeadArmor': '380005', 'SpellSlot1': '13010', 'SpellSlot2': '13030', 'SpellSlot3': '13050', 'SpellSlot4': '13070', 'SpellSlot5': '13700', 'FaceID': '6030', 'Level': '85', 'Vitality': '17', 'Attunement': '22', 'Endurance': '18', 'Strength': '12', 'Dexterity': '17', 'Intelligence': '55', 'Faith': '12', 'Luck': '1', 'Resistance': '17', 'HeadScale': '100', 'ChestScale': '-100', 'AbdomenScale': '50', 'ArmScale': '-100', 'LegScale': '-100', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1'} +- {'ID': '6040', 'Name': 'ロガーンの弟子\u3000城下1〜拠点', 'RightHandWeapon1': '1300000', 'RightHandWeapon2': '600006', 'LeftHandWeapon1': '1403006', 'HeadArmor': '640004', 'BodyArmor': '641004', 'HandsArmor': '642004', 'LegsArmor': '643004', 'SpellSlot1': '13000', 'SpellSlot2': '13020', 'FaceID': '6040', 'Level': '45', 'Vitality': '14', 'Attunement': '15', 'Endurance': '17', 'Strength': '13', 'Dexterity': '16', 'Intelligence': '30', 'Faith': '9', 'Luck': '1', 'Humanity': '3', 'Resistance': '16', 'HeadScale': '-20', 'ChestScale': '20', 'AbdomenScale': '-10', 'ArmScale': '-10', 'LegScale': '-10', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1'} +- {'ID': '6041', 'Name': 'ロガーンの弟子\u3000王城1亡者', 'RightHandWeapon1': '1300000', 'RightHandWeapon2': '600010', 'LeftHandWeapon1': '1403010', 'HeadArmor': '2640008', 'BodyArmor': '2641008', 'HandsArmor': '2642008', 'LegsArmor': '2643008', 'RingSlot1': '123', 'SpellSlot1': '13000', 'SpellSlot2': '13020', 'FaceID': '6041', 'Level': '65', 'Vitality': '18', 'Attunement': '15', 'Endurance': '19', 'Strength': '13', 'Dexterity': '16', 'Intelligence': '42', 'Faith': '9', 'Luck': '1', 'Resistance': '18', 'HeadScale': '-20', 'ChestScale': '20', 'AbdomenScale': '-10', 'ArmScale': '-10', 'LegScale': '-10', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'DrawType': '4', 'Gender': '1'} +- {'ID': '6050', 'Name': '亡国の王女', 'HeadArmor': '330000', 'BodyArmor': '331000', 'HandsArmor': '332000', 'LegsArmor': '333000', 'RingSlot1': '116', 'FaceID': '6050', 'Level': '5', 'Vitality': '9', 'Attunement': '15', 'Endurance': '10', 'Strength': '9', 'Dexterity': '11', 'Intelligence': '18', 'Faith': '10', 'Luck': '1', 'Resistance': '8', 'HeadScale': '-20', 'ChestScale': '-30', 'AbdomenScale': '-40', 'ArmScale': '-60', 'LegScale': '-40', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2'} +- {'ID': '6051', 'Name': '亡国の王女(召喚時)', 'HeadArmor': '330000', 'BodyArmor': '331000', 'HandsArmor': '332000', 'LegsArmor': '333000', 'RingSlot1': '116', 'FaceID': '6050', 'Level': '5', 'Vitality': '9', 'Attunement': '15', 'Endurance': '10', 'Strength': '9', 'Dexterity': '11', 'Intelligence': '18', 'Faith': '10', 'Luck': '1', 'Resistance': '8', 'HeadScale': '-20', 'ChestScale': '-30', 'AbdomenScale': '-40', 'ArmScale': '-60', 'LegScale': '-40', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2'} +- {'ID': '6070', 'Name': '白の聖女', 'RightHandWeapon1': '1363000', 'HeadArmor': '410000', 'BodyArmor': '411000', 'HandsArmor': '412000', 'LegsArmor': '413000', 'SpellSlot1': '15010', 'FaceID': '6070', 'Level': '5', 'Vitality': '8', 'Attunement': '13', 'Endurance': '12', 'Strength': '8', 'Dexterity': '9', 'Intelligence': '14', 'Faith': '19', 'Luck': '1', 'Humanity': '12', 'Resistance': '7', 'HeadScale': '-30', 'ChestScale': '50', 'AbdomenScale': '-30', 'ArmScale': '-50', 'LegScale': '30', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Covenant': '1'} +- {'ID': '6071', 'Name': '白の聖女(亡者)', 'RightHandWeapon1': '1363000', 'HeadArmor': '2410000', 'BodyArmor': '2411000', 'HandsArmor': '2412000', 'LegsArmor': '2413000', 'SpellSlot1': '15010', 'FaceID': '6071', 'Level': '5', 'Vitality': '8', 'Attunement': '13', 'Endurance': '12', 'Strength': '8', 'Dexterity': '9', 'Intelligence': '14', 'Faith': '19', 'Luck': '1', 'Resistance': '7', 'HeadScale': '-30', 'ChestScale': '50', 'AbdomenScale': '-30', 'ArmScale': '-50', 'LegScale': '30', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'DrawType': '4', 'Covenant': '1'} +- {'ID': '6080', 'Name': '聖女の騎士A', 'RightHandWeapon1': '802000', 'RightHandWeapon2': '1362000', 'LeftHandWeapon1': '1451000', 'BodyArmor': '651000', 'HandsArmor': '652000', 'LegsArmor': '653000', 'SpellSlot1': '15020', 'SpellSlot2': '15300', 'FaceID': '6080', 'Level': '25', 'Vitality': '11', 'Attunement': '13', 'Endurance': '14', 'Strength': '13', 'Dexterity': '14', 'Intelligence': '11', 'Faith': '17', 'Luck': '1', 'Humanity': '2', 'Resistance': '17', 'HeadScale': '100', 'ChestScale': '-30', 'AbdomenScale': '50', 'ArmScale': '-40', 'LegScale': '60', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1', 'Covenant': '1'} +- {'ID': '6090', 'Name': '聖女の騎士B\u3000拠点', 'RightHandWeapon1': '801014', 'RightHandWeapon2': '1362000', 'LeftHandWeapon1': '1477014', 'BodyArmor': '181010', 'HandsArmor': '182010', 'LegsArmor': '183010', 'SpellSlot1': '15300', 'FaceID': '6090', 'Level': '25', 'Vitality': '13', 'Attunement': '11', 'Endurance': '15', 'Strength': '15', 'Dexterity': '13', 'Intelligence': '10', 'Faith': '15', 'Luck': '1', 'Humanity': '5', 'Resistance': '18', 'ChestScale': '20', 'AbdomenScale': '-10', 'ArmScale': '20', 'LegScale': '10', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1', 'Covenant': '1'} +- {'ID': '6091', 'Name': '聖女の騎士B\u3000墓地2亡者', 'RightHandWeapon1': '801014', 'RightHandWeapon2': '1362000', 'LeftHandWeapon1': '1477014', 'BodyArmor': '2181010', 'HandsArmor': '2182010', 'LegsArmor': '2183010', 'SpellSlot1': '15300', 'FaceID': '6091', 'Level': '85', 'Vitality': '21', 'Attunement': '13', 'Endurance': '28', 'Strength': '18', 'Dexterity': '21', 'Intelligence': '16', 'Faith': '30', 'Luck': '1', 'Resistance': '23', 'ChestScale': '20', 'AbdomenScale': '-10', 'ArmScale': '20', 'LegScale': '10', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'DrawType': '4', 'Gender': '1', 'Covenant': '1'} +- {'ID': '6100', 'Name': '聖女の騎士C\u3000拠点', 'RightHandWeapon1': '702014', 'RightHandWeapon2': '1362000', 'LeftHandWeapon1': '1477014', 'HeadArmor': '180010', 'BodyArmor': '181010', 'HandsArmor': '182010', 'LegsArmor': '183010', 'SpellSlot1': '15040', 'FaceID': '6100', 'Level': '25', 'Vitality': '15', 'Attunement': '11', 'Endurance': '12', 'Strength': '19', 'Dexterity': '13', 'Intelligence': '8', 'Faith': '17', 'Luck': '1', 'Humanity': '3', 'Resistance': '15', 'HeadScale': '-50', 'ChestScale': '100', 'ArmScale': '100', 'LegScale': '50', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1', 'Covenant': '1'} +- {'ID': '6101', 'Name': '聖女の騎士C\u3000墓地2亡者', 'RightHandWeapon1': '702014', 'RightHandWeapon2': '1362000', 'LeftHandWeapon1': '1477014', 'HeadArmor': '2180010', 'BodyArmor': '2181010', 'HandsArmor': '2182010', 'LegsArmor': '2183010', 'SpellSlot1': '15040', 'FaceID': '6101', 'Level': '85', 'Vitality': '26', 'Attunement': '13', 'Endurance': '22', 'Strength': '26', 'Dexterity': '18', 'Intelligence': '14', 'Faith': '26', 'Luck': '1', 'Resistance': '25', 'HeadScale': '-50', 'ChestScale': '100', 'ArmScale': '100', 'LegScale': '50', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'DrawType': '4', 'Gender': '1', 'Covenant': '1'} +- {'ID': '6130', 'Name': '壺の呪術師\u3000城下2', 'RightHandWeapon1': '1330800', 'RightHandWeapon2': '700008', 'LeftHandWeapon1': '1406008', 'HeadArmor': '230006', 'BodyArmor': '231006', 'HandsArmor': '232006', 'LegsArmor': '233006', 'SpellSlot1': '14000', 'SpellSlot2': '14010', 'SpellSlot3': '14100', 'FaceID': '6130', 'Level': '55', 'Vitality': '17', 'Attunement': '16', 'Endurance': '20', 'Strength': '16', 'Dexterity': '17', 'Intelligence': '26', 'Faith': '9', 'Luck': '1', 'Humanity': '5', 'Resistance': '19', 'HeadScale': '30', 'ChestScale': '30', 'AbdomenScale': '30', 'ArmScale': '-30', 'LegScale': '-40', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1'} +- {'ID': '6131', 'Name': '壺の呪術師\u3000影町亡者', 'RightHandWeapon1': '1330800', 'RightHandWeapon2': '700008', 'LeftHandWeapon1': '1406008', 'HeadArmor': '2230006', 'BodyArmor': '2231006', 'HandsArmor': '2232006', 'LegsArmor': '2233006', 'SpellSlot1': '14000', 'SpellSlot2': '14010', 'SpellSlot3': '14100', 'FaceID': '6131', 'Level': '55', 'Vitality': '17', 'Attunement': '16', 'Endurance': '20', 'Strength': '16', 'Dexterity': '17', 'Intelligence': '26', 'Faith': '9', 'Luck': '1', 'Resistance': '19', 'HeadScale': '30', 'ChestScale': '30', 'AbdomenScale': '30', 'ArmScale': '-30', 'LegScale': '-40', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'DrawType': '4', 'Gender': '1'} +- {'ID': '6170', 'Name': 'さまよう混沌', 'RightHandWeapon1': '1332500', 'HeadArmor': '460000', 'BodyArmor': '461000', 'HandsArmor': '462000', 'LegsArmor': '463000', 'SpellSlot1': '14020', 'SpellSlot2': '14040', 'SpellSlot3': '14110', 'FaceID': '6170', 'Level': '95', 'Vitality': '16', 'Attunement': '30', 'Endurance': '23', 'Strength': '9', 'Dexterity': '10', 'Intelligence': '62', 'Faith': '13', 'Luck': '1', 'Resistance': '17', 'HeadScale': '-50', 'ChestScale': '-20', 'AbdomenScale': '-60', 'ArmScale': '-60', 'LegScale': '-30', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2'} +- {'ID': '6180', 'Name': '癒し手', 'RightHandWeapon1': '1302000', 'LeftHandWeapon1': '102005', 'HeadArmor': '140004', 'BodyArmor': '141004', 'HandsArmor': '142004', 'LegsArmor': '143004', 'SpellSlot1': '13020', 'SpellSlot2': '13030', 'SpellSlot3': '13610', 'FaceID': '6180', 'Level': '45', 'Vitality': '15', 'Attunement': '17', 'Endurance': '16', 'Strength': '13', 'Dexterity': '14', 'Intelligence': '29', 'Faith': '11', 'Luck': '1', 'Humanity': '4', 'Resistance': '15', 'HeadScale': '30', 'ChestScale': '-20', 'AbdomenScale': '-20', 'ArmScale': '-20', 'LegScale': '-20', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1'} +- {'ID': '6220', 'Name': '鍛冶屋リッケルト', 'HeadArmor': '370000', 'BodyArmor': '371000', 'HandsArmor': '372000', 'LegsArmor': '373000', 'FaceID': '6220', 'Level': '5', 'Vitality': '14', 'Attunement': '11', 'Endurance': '12', 'Strength': '13', 'Dexterity': '11', 'Intelligence': '8', 'Faith': '9', 'Luck': '1', 'Resistance': '12', 'HeadScale': '30', 'ChestScale': '-40', 'AbdomenScale': '-30', 'ArmScale': '50', 'LegScale': '-30', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1'} +- {'ID': '6250', 'Name': '心折れた商人', 'RightHandWeapon1': '351010', 'LeftHandWeapon1': '1501010', 'HeadArmor': '490008', 'BodyArmor': '491008', 'HandsArmor': '492008', 'LegsArmor': '493008', 'RingSlot1': '100', 'FaceID': '6250', 'Level': '65', 'Vitality': '23', 'Attunement': '11', 'Endurance': '26', 'Strength': '32', 'Dexterity': '16', 'Intelligence': '9', 'Faith': '9', 'Luck': '1', 'Resistance': '24', 'HeadScale': '100', 'ChestScale': '100', 'ArmScale': '100', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1'} +- {'ID': '6260', 'Name': 'トリックスター', 'RightHandWeapon1': '205000', 'RightHandWeapon2': '304000', 'LeftHandWeapon1': '1471005', 'HeadArmor': '110000', 'BodyArmor': '111000', 'HandsArmor': '112000', 'LegsArmor': '113000', 'FaceID': '6260', 'Level': '65', 'Vitality': '19', 'Attunement': '13', 'Endurance': '22', 'Strength': '29', 'Dexterity': '23', 'Intelligence': '13', 'Faith': '14', 'Luck': '1', 'Resistance': '17', 'HeadScale': '40', 'ChestScale': '20', 'AbdomenScale': '-20', 'ArmScale': '-30', 'LegScale': '20', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1'} +- {'ID': '6270', 'Name': '心折れた戦士\u3000拠点', 'RightHandWeapon1': '201010', 'LeftHandWeapon1': '1450010', 'BodyArmor': '171008', 'HandsArmor': '172008', 'LegsArmor': '173008', 'FaceID': '6270', 'Level': '65', 'Vitality': '20', 'Attunement': '14', 'Endurance': '24', 'Strength': '26', 'Dexterity': '25', 'Intelligence': '11', 'Faith': '8', 'Luck': '1', 'Resistance': '22', 'HeadScale': '40', 'ChestScale': '-30', 'AbdomenScale': '20', 'ArmScale': '-30', 'LegScale': '-30', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1'} +- {'ID': '6271', 'Name': '心折れた戦士\u3000城下1亡者', 'RightHandWeapon1': '201010', 'LeftHandWeapon1': '1450010', 'BodyArmor': '2171008', 'HandsArmor': '2172008', 'LegsArmor': '2173008', 'FaceID': '6271', 'Level': '65', 'Vitality': '20', 'Attunement': '14', 'Endurance': '24', 'Strength': '26', 'Dexterity': '25', 'Intelligence': '11', 'Faith': '8', 'Luck': '1', 'Resistance': '22', 'HeadScale': '40', 'ChestScale': '-30', 'AbdomenScale': '20', 'ArmScale': '-30', 'LegScale': '-30', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'DrawType': '4', 'Gender': '1'} +- {'ID': '6280', 'Name': 'たまねぎ騎士\u3000王城1', 'RightHandWeapon1': '350015', 'LeftHandWeapon1': '1475015', 'HeadArmor': '10005', 'BodyArmor': '11005', 'HandsArmor': '12005', 'LegsArmor': '13005', 'RingSlot1': '147', 'FaceID': '6280', 'Level': '95', 'Vitality': '28', 'Attunement': '8', 'Endurance': '26', 'Strength': '44', 'Dexterity': '31', 'Intelligence': '8', 'Faith': '9', 'Luck': '1', 'Humanity': '4', 'Resistance': '26', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1'} +- {'ID': '6281', 'Name': 'たまねぎ騎士\u3000王城2', 'RightHandWeapon1': '350015', 'LeftHandWeapon1': '1475015', 'HeadArmor': '10005', 'BodyArmor': '11005', 'HandsArmor': '12005', 'LegsArmor': '13005', 'RingSlot1': '147', 'FaceID': '6280', 'Level': '95', 'Vitality': '28', 'Attunement': '8', 'Endurance': '26', 'Strength': '44', 'Dexterity': '31', 'Intelligence': '8', 'Faith': '9', 'Luck': '1', 'Humanity': '4', 'Resistance': '26', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1'} +- {'ID': '6282', 'Name': 'たまねぎ騎士\u3000拠点', 'RightHandWeapon1': '350015', 'LeftHandWeapon1': '1475015', 'HeadArmor': '10005', 'BodyArmor': '11005', 'HandsArmor': '12005', 'LegsArmor': '13005', 'RingSlot1': '147', 'FaceID': '6280', 'Level': '95', 'Vitality': '28', 'Attunement': '8', 'Endurance': '26', 'Strength': '44', 'Dexterity': '31', 'Intelligence': '8', 'Faith': '9', 'Luck': '1', 'Humanity': '4', 'Resistance': '26', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1'} +- {'ID': '6283', 'Name': 'たまねぎ騎士\u3000影町', 'RightHandWeapon1': '350015', 'LeftHandWeapon1': '1475015', 'HeadArmor': '10005', 'BodyArmor': '11005', 'HandsArmor': '12005', 'LegsArmor': '13005', 'RingSlot1': '147', 'FaceID': '6280', 'Level': '95', 'Vitality': '28', 'Attunement': '8', 'Endurance': '26', 'Strength': '44', 'Dexterity': '31', 'Intelligence': '8', 'Faith': '9', 'Luck': '1', 'Humanity': '4', 'Resistance': '26', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1'} +- {'ID': '6284', 'Name': 'たまねぎ騎士\u3000廃都', 'RightHandWeapon1': '350015', 'LeftHandWeapon1': '1475015', 'HeadArmor': '10005', 'BodyArmor': '11005', 'HandsArmor': '12005', 'LegsArmor': '13005', 'RingSlot1': '147', 'FaceID': '6280', 'Level': '95', 'Vitality': '28', 'Attunement': '8', 'Endurance': '26', 'Strength': '44', 'Dexterity': '31', 'Intelligence': '8', 'Faith': '9', 'Luck': '1', 'Humanity': '4', 'Resistance': '26', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1'} +- {'ID': '6290', 'Name': 'たまねぎ騎士の娘\u3000結晶〜拠点', 'RightHandWeapon1': '300015', 'LeftHandWeapon1': '1475015', 'HeadArmor': '10005', 'BodyArmor': '11005', 'HandsArmor': '12005', 'LegsArmor': '13005', 'RingSlot1': '147', 'FaceID': '6290', 'Level': '105', 'Vitality': '25', 'Attunement': '10', 'Endurance': '28', 'Strength': '47', 'Dexterity': '34', 'Intelligence': '9', 'Faith': '11', 'Luck': '1', 'Humanity': '10', 'Resistance': '26', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2'} +- {'ID': '6291', 'Name': 'たまねぎ騎士の娘\u3000地底湖', 'RightHandWeapon1': '300015', 'LeftHandWeapon1': '1475015', 'HeadArmor': '10005', 'BodyArmor': '11005', 'HandsArmor': '12005', 'LegsArmor': '13005', 'RingSlot1': '147', 'FaceID': '6290', 'Level': '105', 'Vitality': '25', 'Attunement': '10', 'Endurance': '28', 'Strength': '47', 'Dexterity': '34', 'Intelligence': '9', 'Faith': '11', 'Luck': '1', 'Humanity': '10', 'Resistance': '26', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2'} +- {'ID': '6300', 'Name': '抱かれ騎士ロートレク\u3000城下1〜拠点', 'RightHandWeapon1': '402006', 'LeftHandWeapon1': '402006', 'LeftHandWeapon2': '101006', 'HeadArmor': '100004', 'BodyArmor': '101004', 'HandsArmor': '102004', 'LegsArmor': '103004', 'RingSlot1': '143', 'RingSlot2': '101', 'FaceID': '6300', 'Level': '45', 'Vitality': '17', 'Attunement': '9', 'Endurance': '16', 'Strength': '23', 'Dexterity': '27', 'Intelligence': '8', 'Faith': '12', 'Luck': '1', 'Humanity': '8', 'Resistance': '18', 'HeadScale': '-20', 'ChestScale': '20', 'AbdomenScale': '-10', 'ArmScale': '10', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1'} +- {'ID': '6301', 'Name': '抱かれ騎士ロートレク\u3000王城2', 'RightHandWeapon1': '402012', 'LeftHandWeapon1': '402012', 'LeftHandWeapon2': '101012', 'HeadArmor': '100005', 'BodyArmor': '101005', 'HandsArmor': '102005', 'LegsArmor': '103005', 'RingSlot1': '143', 'RingSlot2': '101', 'FaceID': '6300', 'Level': '75', 'Vitality': '21', 'Attunement': '11', 'Endurance': '24', 'Strength': '33', 'Dexterity': '29', 'Intelligence': '10', 'Faith': '12', 'Luck': '1', 'Humanity': '8', 'Resistance': '20', 'HeadScale': '-20', 'ChestScale': '20', 'AbdomenScale': '-10', 'ArmScale': '10', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1'} +- {'ID': '6310', 'Name': '野武士', 'RightHandWeapon1': '451012', 'LeftHandWeapon1': '1461012', 'HeadArmor': '280005', 'BodyArmor': '281005', 'HandsArmor': '282005', 'LegsArmor': '283005', 'FaceID': '6310', 'Level': '75', 'Vitality': '17', 'Attunement': '9', 'Endurance': '27', 'Strength': '37', 'Dexterity': '35', 'Intelligence': '8', 'Faith': '8', 'Luck': '1', 'Resistance': '19', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1', 'Covenant': '7'} +- {'ID': '6320', 'Name': '墓地の卑怯者パッチ\u3000墓地1', 'RightHandWeapon1': '1001014', 'LeftHandWeapon1': '1500014', 'BodyArmor': '301010', 'HandsArmor': '302010', 'LegsArmor': '303010', 'FaceID': '6320', 'Level': '85', 'Vitality': '21', 'Attunement': '9', 'Endurance': '29', 'Strength': '34', 'Dexterity': '33', 'Intelligence': '9', 'Faith': '9', 'Luck': '1', 'Humanity': '7', 'Resistance': '26', 'HeadScale': '10', 'ChestScale': '-20', 'AbdomenScale': '-60', 'ArmScale': '-40', 'LegScale': '-70', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1'} +- {'ID': '6321', 'Name': '墓地の卑怯者パッチ\u3000墓地2〜拠点', 'RightHandWeapon1': '1001014', 'LeftHandWeapon1': '1500014', 'BodyArmor': '301010', 'HandsArmor': '302010', 'LegsArmor': '303010', 'FaceID': '6320', 'Level': '85', 'Vitality': '21', 'Attunement': '9', 'Endurance': '29', 'Strength': '34', 'Dexterity': '33', 'Intelligence': '9', 'Faith': '9', 'Luck': '1', 'Humanity': '7', 'Resistance': '26', 'HeadScale': '10', 'ChestScale': '-20', 'AbdomenScale': '-60', 'ArmScale': '-40', 'LegScale': '-70', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1'} +- {'ID': '6370', 'Name': 'ドラゴンの神官', 'RightHandWeapon1': '603003', 'RightHandWeapon2': '1367000', 'LeftHandWeapon1': '101003', 'HeadArmor': '150002', 'BodyArmor': '151002', 'HandsArmor': '152002', 'LegsArmor': '153002', 'SpellSlot1': '15010', 'SpellSlot2': '15700', 'SpellSlot3': '15810', 'FaceID': '6370', 'Level': '35', 'Vitality': '13', 'Attunement': '15', 'Endurance': '12', 'Strength': '17', 'Dexterity': '18', 'Intelligence': '17', 'Faith': '15', 'Luck': '1', 'Resistance': '13', 'HeadScale': '-10', 'ChestScale': '20', 'AbdomenScale': '-10', 'ArmScale': '20', 'LegScale': '10', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1'} +- {'ID': '6390', 'Name': '黒騎士タルカス', 'RightHandWeapon1': '351010', 'LeftHandWeapon1': '9003010', 'HeadArmor': '70005', 'BodyArmor': '71005', 'HandsArmor': '72005', 'LegsArmor': '73005', 'RingSlot1': '100', 'FaceID': '6390', 'Level': '65', 'Vitality': '20', 'Attunement': '9', 'Endurance': '28', 'Strength': '34', 'Dexterity': '21', 'Intelligence': '8', 'Faith': '9', 'Luck': '1', 'Resistance': '21', 'HeadScale': '50', 'ChestScale': '100', 'ArmScale': '50', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1'} +- {'ID': '6420', 'Name': '忍者', 'RightHandWeapon1': '500012', 'RightHandWeapon2': '1331200', 'LeftHandWeapon1': '1404012', 'HeadArmor': '60005', 'BodyArmor': '61005', 'HandsArmor': '62005', 'LegsArmor': '63005', 'RingSlot1': '128', 'RingSlot2': '124', 'SpellSlot1': '14050', 'SpellSlot2': '14400', 'FaceID': '6420', 'Level': '75', 'Vitality': '18', 'Attunement': '14', 'Endurance': '34', 'Strength': '27', 'Dexterity': '29', 'Intelligence': '12', 'Faith': '8', 'Luck': '1', 'Resistance': '18', 'HeadScale': '-50', 'ChestScale': '-50', 'AbdomenScale': '-50', 'ArmScale': '-50', 'LegScale': '-50', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1'} +- {'ID': '6490', 'Name': 'ロートレクのお供1', 'RightHandWeapon1': '1050012', 'LeftHandWeapon1': '1401012', 'BodyArmor': '211010', 'HandsArmor': '212010', 'LegsArmor': '213010', 'FaceID': '6490', 'Level': '75', 'Vitality': '21', 'Attunement': '9', 'Endurance': '26', 'Strength': '31', 'Dexterity': '27', 'Intelligence': '9', 'Faith': '9', 'Luck': '1', 'Resistance': '28', 'HeadScale': '-10', 'AbdomenScale': '30', 'LegScale': '50', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'DrawType': '1', 'Gender': '1'} +- {'ID': '6500', 'Name': 'ロートレクのお供2', 'RightHandWeapon1': '1302000', 'LeftHandWeapon1': '1408012', 'BodyArmor': '141005', 'HandsArmor': '142005', 'LegsArmor': '143005', 'SpellSlot1': '13020', 'SpellSlot2': '13030', 'SpellSlot3': '13610', 'FaceID': '6500', 'Level': '75', 'Vitality': '17', 'Attunement': '21', 'Endurance': '22', 'Strength': '11', 'Dexterity': '10', 'Intelligence': '45', 'Faith': '16', 'Luck': '1', 'Resistance': '18', 'HeadScale': '-20', 'ChestScale': '-20', 'AbdomenScale': '-20', 'ArmScale': '-20', 'LegScale': '-20', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'DrawType': '1', 'Gender': '1'} +- {'ID': '6510', 'Name': '黒騎士タルカス\u3000王城1\u3000NPCマルチ協力', 'RightHandWeapon1': '351010', 'LeftHandWeapon1': '9003010', 'HeadArmor': '70005', 'BodyArmor': '71005', 'HandsArmor': '72005', 'LegsArmor': '73005', 'RingSlot1': '100', 'FaceID': '6390', 'Level': '65', 'Vitality': '20', 'Attunement': '10', 'Endurance': '24', 'Strength': '34', 'Dexterity': '24', 'Intelligence': '10', 'Faith': '8', 'Luck': '1', 'Resistance': '20', 'HeadScale': '50', 'ChestScale': '100', 'ArmScale': '50', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1'} +- {'ID': '6511', 'Name': '黒騎士タルカス\u3000廃都\u3000通常敵', 'RightHandWeapon1': '351015', 'LeftHandWeapon1': '9003015', 'HeadArmor': '70005', 'BodyArmor': '71005', 'HandsArmor': '72005', 'LegsArmor': '73005', 'RingSlot1': '100', 'FaceID': '6390', 'Level': '95', 'Vitality': '24', 'Attunement': '10', 'Endurance': '30', 'Strength': '41', 'Dexterity': '31', 'Intelligence': '11', 'Faith': '9', 'Luck': '1', 'Resistance': '24', 'HeadScale': '50', 'ChestScale': '100', 'ArmScale': '50', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '6520', 'Name': '魔女\u3000森庭\u3000NPCマルチ協力', 'RightHandWeapon1': '1301000', 'LeftHandWeapon1': '1406006', 'HeadArmor': '340002', 'BodyArmor': '341002', 'HandsArmor': '342002', 'LegsArmor': '343002', 'RingSlot1': '138', 'SpellSlot1': '13020', 'SpellSlot2': '13030', 'SpellSlot3': '13040', 'SpellSlot4': '13550', 'FaceID': '6410', 'Level': '45', 'Vitality': '13', 'Attunement': '20', 'Endurance': '18', 'Strength': '10', 'Dexterity': '12', 'Intelligence': '31', 'Faith': '12', 'Luck': '1', 'Resistance': '14', 'HeadScale': '-50', 'ChestScale': '-50', 'AbdomenScale': '-50', 'ArmScale': '-50', 'LegScale': '-50', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2'} +- {'ID': '6521', 'Name': '魔女\u3000深淵\u3000NPCマルチ協力', 'RightHandWeapon1': '1301000', 'LeftHandWeapon1': '1406014', 'HeadArmor': '340005', 'BodyArmor': '341005', 'HandsArmor': '342005', 'LegsArmor': '343005', 'RingSlot1': '138', 'SpellSlot1': '13020', 'SpellSlot2': '13030', 'SpellSlot3': '13040', 'SpellSlot4': '13550', 'FaceID': '6410', 'Level': '85', 'Vitality': '19', 'Attunement': '22', 'Endurance': '21', 'Strength': '13', 'Dexterity': '14', 'Intelligence': '42', 'Faith': '15', 'Luck': '1', 'Resistance': '24', 'HeadScale': '-50', 'ChestScale': '-50', 'AbdomenScale': '-50', 'ArmScale': '-50', 'LegScale': '-50', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2'} +- {'ID': '6530', 'Name': '沼女\u3000影町\u3000NPCマルチ協力', 'RightHandWeapon1': '703008', 'LeftHandWeapon1': '1409008', 'HeadArmor': '560006', 'RingSlot1': '125', 'FaceID': '6530', 'Level': '55', 'Vitality': '18', 'Attunement': '8', 'Endurance': '19', 'Strength': '26', 'Dexterity': '19', 'Intelligence': '8', 'Faith': '8', 'Luck': '1', 'Humanity': '8', 'Resistance': '34', 'AbdomenScale': '100', 'LegScale': '100', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Covenant': '4'} +- {'ID': '6531', 'Name': '沼女\u3000影町\u3000NPCマルチ侵入', 'RightHandWeapon1': '703008', 'LeftHandWeapon1': '1409008', 'HeadArmor': '560006', 'RingSlot1': '125', 'FaceID': '6530', 'Level': '55', 'Vitality': '18', 'Attunement': '8', 'Endurance': '19', 'Strength': '26', 'Dexterity': '19', 'Intelligence': '8', 'Faith': '8', 'Luck': '1', 'Humanity': '8', 'Resistance': '34', 'AbdomenScale': '100', 'LegScale': '100', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Covenant': '4'} +- {'ID': '6540', 'Name': '太陽の騎士\u3000城下1\u3000NPCマルチ協力', 'RightHandWeapon1': '206003', 'RightHandWeapon2': '1365000', 'LeftHandWeapon1': '1472003', 'HeadArmor': '160002', 'BodyArmor': '161002', 'HandsArmor': '162002', 'LegsArmor': '163002', 'RingSlot1': '139', 'SpellSlot1': '15500', 'SpellSlot2': '15010', 'FaceID': '6000', 'Level': '35', 'Vitality': '16', 'Attunement': '12', 'Endurance': '20', 'Strength': '20', 'Dexterity': '14', 'Intelligence': '9', 'Faith': '14', 'Luck': '1', 'Humanity': '5', 'Resistance': '15', 'ChestScale': '70', 'AbdomenScale': '10', 'ArmScale': '30', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1', 'Covenant': '3'} +- {'ID': '6541', 'Name': '太陽の騎士\u3000城下2\u3000NPCマルチ協力', 'RightHandWeapon1': '206006', 'RightHandWeapon2': '1365000', 'LeftHandWeapon1': '1472006', 'HeadArmor': '160004', 'BodyArmor': '161004', 'HandsArmor': '162004', 'LegsArmor': '163004', 'RingSlot1': '139', 'SpellSlot1': '15500', 'SpellSlot2': '15010', 'FaceID': '6000', 'Level': '45', 'Vitality': '19', 'Attunement': '12', 'Endurance': '20', 'Strength': '24', 'Dexterity': '14', 'Intelligence': '9', 'Faith': '14', 'Luck': '1', 'Humanity': '5', 'Resistance': '18', 'ChestScale': '70', 'AbdomenScale': '10', 'ArmScale': '30', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1', 'Covenant': '3'} +- {'ID': '6542', 'Name': '太陽の騎士\u3000王城2\u3000NPCマルチ協力', 'RightHandWeapon1': '206012', 'RightHandWeapon2': '1365000', 'LeftHandWeapon1': '1472012', 'HeadArmor': '160010', 'BodyArmor': '161010', 'HandsArmor': '162010', 'LegsArmor': '163010', 'RingSlot1': '139', 'SpellSlot1': '15500', 'SpellSlot2': '15010', 'FaceID': '6000', 'Level': '75', 'Vitality': '24', 'Attunement': '12', 'Endurance': '23', 'Strength': '30', 'Dexterity': '25', 'Intelligence': '10', 'Faith': '14', 'Luck': '1', 'Humanity': '5', 'Resistance': '22', 'ChestScale': '70', 'AbdomenScale': '10', 'ArmScale': '30', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1', 'Covenant': '3'} +- {'ID': '6543', 'Name': '太陽の騎士\u3000廃都\u3000NPCマルチ協力', 'RightHandWeapon1': '206015', 'RightHandWeapon2': '1365000', 'LeftHandWeapon1': '1472015', 'HeadArmor': '160010', 'BodyArmor': '161010', 'HandsArmor': '162010', 'LegsArmor': '163010', 'RingSlot1': '139', 'SpellSlot1': '15500', 'SpellSlot2': '15010', 'FaceID': '6000', 'Level': '95', 'Vitality': '25', 'Attunement': '12', 'Endurance': '25', 'Strength': '40', 'Dexterity': '30', 'Intelligence': '11', 'Faith': '14', 'Luck': '1', 'Humanity': '5', 'Resistance': '23', 'ChestScale': '70', 'AbdomenScale': '10', 'ArmScale': '30', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1', 'Covenant': '3'} +- {'ID': '6544', 'Name': '太陽の騎士\u3000大墓\u3000NPCマルチ協力', 'RightHandWeapon1': '206015', 'RightHandWeapon2': '1365000', 'LeftHandWeapon1': '1472015', 'HeadArmor': '160010', 'BodyArmor': '161010', 'HandsArmor': '162010', 'LegsArmor': '163010', 'RingSlot1': '139', 'SpellSlot1': '15500', 'SpellSlot2': '15010', 'FaceID': '6000', 'Level': '105', 'Vitality': '27', 'Attunement': '12', 'Endurance': '28', 'Strength': '43', 'Dexterity': '31', 'Intelligence': '12', 'Faith': '14', 'Luck': '1', 'Humanity': '5', 'Resistance': '23', 'ChestScale': '70', 'AbdomenScale': '10', 'ArmScale': '30', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1', 'Covenant': '3'} +- {'ID': '6550', 'Name': '神殿騎士\u3000墓地1\u3000NPCマルチ協力', 'RightHandWeapon1': '851005', 'RightHandWeapon2': '1361000', 'LeftHandWeapon1': '9001006', 'HeadArmor': '20001', 'BodyArmor': '21001', 'HandsArmor': '22001', 'LegsArmor': '23001', 'RingSlot1': '100', 'SpellSlot1': '15010', 'SpellSlot2': '15310', 'FaceID': '6550', 'Level': '45', 'Vitality': '11', 'Attunement': '13', 'Endurance': '13', 'Strength': '34', 'Dexterity': '8', 'Intelligence': '9', 'Faith': '30', 'Luck': '1', 'Humanity': '3', 'Resistance': '12', 'HeadScale': '20', 'ChestScale': '50', 'AbdomenScale': '20', 'ArmScale': '50', 'LegScale': '20', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1', 'Covenant': '1'} +- {'ID': '6551', 'Name': '神殿騎士\u3000墓地2\u3000NPCマルチ侵入', 'RightHandWeapon1': '851005', 'RightHandWeapon2': '1361000', 'LeftHandWeapon1': '9001014', 'HeadArmor': '20005', 'BodyArmor': '21005', 'HandsArmor': '22005', 'LegsArmor': '23005', 'RingSlot1': '100', 'SpellSlot1': '15010', 'SpellSlot2': '15310', 'FaceID': '6550', 'Level': '85', 'Vitality': '17', 'Attunement': '14', 'Endurance': '22', 'Strength': '50', 'Dexterity': '12', 'Intelligence': '9', 'Faith': '30', 'Luck': '1', 'Humanity': '3', 'Resistance': '16', 'HeadScale': '20', 'ChestScale': '50', 'AbdomenScale': '20', 'ArmScale': '50', 'LegScale': '20', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1', 'Covenant': '1'} +- {'ID': '6560', 'Name': 'トゲ騎士\u3000城下2\u3000NPCマルチ侵入', 'RightHandWeapon1': '207006', 'LeftHandWeapon1': '1470006', 'HeadArmor': '200000', 'BodyArmor': '201000', 'HandsArmor': '202000', 'LegsArmor': '203000', 'FaceID': '6560', 'Level': '45', 'Vitality': '15', 'Attunement': '9', 'Endurance': '25', 'Strength': '26', 'Dexterity': '24', 'Intelligence': '9', 'Faith': '9', 'Luck': '1', 'Resistance': '13', 'HeadScale': '-70', 'ChestScale': '-70', 'AbdomenScale': '-70', 'ArmScale': '-70', 'LegScale': '-70', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1', 'Covenant': '4'} +- {'ID': '6561', 'Name': 'トゲ騎士\u3000廃都前半\u3000NPCマルチ侵入', 'RightHandWeapon1': '207015', 'LeftHandWeapon1': '1470015', 'HeadArmor': '200005', 'BodyArmor': '201005', 'HandsArmor': '202005', 'LegsArmor': '203005', 'FaceID': '6560', 'Level': '95', 'Vitality': '17', 'Attunement': '9', 'Endurance': '35', 'Strength': '45', 'Dexterity': '41', 'Intelligence': '9', 'Faith': '9', 'Luck': '1', 'Resistance': '15', 'HeadScale': '-70', 'ChestScale': '-70', 'AbdomenScale': '-70', 'ArmScale': '-70', 'LegScale': '-70', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1', 'Covenant': '4'} +- {'ID': '6562', 'Name': 'トゲ騎士\u3000廃都後半\u3000NPCマルチ侵入', 'RightHandWeapon1': '207015', 'LeftHandWeapon1': '1470015', 'HeadArmor': '200005', 'BodyArmor': '201005', 'HandsArmor': '202005', 'LegsArmor': '203005', 'FaceID': '6560', 'Level': '95', 'Vitality': '17', 'Attunement': '9', 'Endurance': '35', 'Strength': '45', 'Dexterity': '41', 'Intelligence': '9', 'Faith': '9', 'Luck': '1', 'Resistance': '15', 'HeadScale': '-70', 'ChestScale': '-70', 'AbdomenScale': '-70', 'ArmScale': '-70', 'LegScale': '-70', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1', 'Covenant': '4'} +- {'ID': '6570', 'Name': '黄衣\u3000絵画世界\u3000NPCマルチ侵入', 'RightHandWeapon1': '1601015', 'LeftHandWeapon1': '1332500', 'HeadArmor': '290005', 'BodyArmor': '291005', 'HandsArmor': '292005', 'LegsArmor': '293005', 'SpellSlot1': '14500', 'SpellSlot2': '14510', 'SpellSlot3': '14520', 'FaceID': '6570', 'Level': '100', 'Vitality': '17', 'Attunement': '16', 'Endurance': '26', 'Strength': '19', 'Dexterity': '24', 'Intelligence': '59', 'Faith': '8', 'Luck': '1', 'Resistance': '16', 'HeadScale': '100', 'ChestScale': '-20', 'AbdomenScale': '-20', 'ArmScale': '-20', 'LegScale': '-20', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1'} +- {'ID': '6580', 'Name': '城下塔のNPC(ハベル)', 'RightHandWeapon1': '854005', 'LeftHandWeapon1': '1505005', 'HeadArmor': '440000', 'BodyArmor': '441000', 'HandsArmor': '442000', 'LegsArmor': '443000', 'RingSlot1': '100', 'FaceID': '6580', 'Level': '95', 'Vitality': '28', 'Attunement': '9', 'Endurance': '35', 'Strength': '50', 'Dexterity': '15', 'Intelligence': '8', 'Faith': '8', 'Luck': '1', 'Resistance': '27', 'ChestScale': '50', 'AbdomenScale': '20', 'ArmScale': '30', 'LegScale': '50', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '6590', 'Name': '抱かれ騎士ロートレク\u3000城下1\u3000NPCマルチ協力', 'RightHandWeapon1': '402006', 'LeftHandWeapon1': '402006', 'LeftHandWeapon2': '101006', 'HeadArmor': '100004', 'BodyArmor': '101004', 'HandsArmor': '102004', 'LegsArmor': '103004', 'RingSlot1': '143', 'RingSlot2': '101', 'FaceID': '6300', 'Level': '45', 'Vitality': '17', 'Attunement': '9', 'Endurance': '16', 'Strength': '23', 'Dexterity': '27', 'Intelligence': '8', 'Faith': '12', 'Luck': '1', 'Humanity': '8', 'Resistance': '18', 'HeadScale': '-20', 'ChestScale': '20', 'AbdomenScale': '-10', 'ArmScale': '10', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1'} +- {'ID': '6591', 'Name': '抱かれ騎士ロートレク\u3000城下2\u3000NPCマルチ協力', 'RightHandWeapon1': '402006', 'LeftHandWeapon1': '402006', 'LeftHandWeapon2': '101006', 'HeadArmor': '100004', 'BodyArmor': '101004', 'HandsArmor': '102004', 'LegsArmor': '103004', 'RingSlot1': '143', 'RingSlot2': '101', 'FaceID': '6300', 'Level': '45', 'Vitality': '17', 'Attunement': '9', 'Endurance': '16', 'Strength': '23', 'Dexterity': '27', 'Intelligence': '8', 'Faith': '12', 'Luck': '1', 'Humanity': '8', 'Resistance': '18', 'HeadScale': '-20', 'ChestScale': '20', 'AbdomenScale': '-10', 'ArmScale': '10', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2', 'Gender': '1'} +- {'ID': '6600', 'Name': '王城1塔のNPC(リカール)', 'RightHandWeapon1': '604010', 'RightHandWeapon2': '1201010', 'LeftHandWeapon1': '1405010', 'HeadArmor': '350008', 'BodyArmor': '351008', 'HandsArmor': '352008', 'LegsArmor': '353008', 'ArrowSlot1': '2000000', 'FaceID': '6600', 'ArrowSlot1Count': '999', 'Level': '65', 'Vitality': '17', 'Attunement': '9', 'Endurance': '27', 'Strength': '34', 'Dexterity': '30', 'Intelligence': '9', 'Faith': '9', 'Luck': '1', 'Resistance': '15', 'ChestScale': '60', 'AbdomenScale': '50', 'ArmScale': '60', 'LegScale': '-50', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '6610', 'Name': '結晶騎士', 'RightHandWeapon1': '304000', 'LeftHandWeapon1': '1471005', 'HeadArmor': '130000', 'BodyArmor': '131000', 'HandsArmor': '132000', 'LegsArmor': '133000', 'FaceID': '6610', 'Level': '85', 'Vitality': '18', 'Attunement': '8', 'Endurance': '25', 'Strength': '40', 'Dexterity': '44', 'Intelligence': '8', 'Faith': '8', 'Luck': '1', 'Resistance': '19', 'ChestScale': '-100', 'AbdomenScale': '-100', 'ArmScale': '-50', 'LegScale': '-50', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '6620', 'Name': 'クラーグの姉妹(敵)', 'RightHandWeapon1': '1332500', 'HeadArmor': '460000', 'BodyArmor': '461000', 'HandsArmor': '462000', 'LegsArmor': '463000', 'SpellSlot1': '14500', 'SpellSlot2': '14510', 'SpellSlot3': '14520', 'FaceID': '6620', 'Level': '95', 'Vitality': '16', 'Attunement': '26', 'Endurance': '26', 'Strength': '13', 'Dexterity': '14', 'Intelligence': '57', 'Faith': '8', 'Luck': '1', 'Resistance': '20', 'HeadScale': '-70', 'ChestScale': '-70', 'AbdomenScale': '-70', 'ArmScale': '-70', 'LegScale': '-70', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2'} +- {'ID': '6640', 'Name': '暗月剣(重騎士)', 'RightHandWeapon1': '351012', 'LeftHandWeapon1': '1501012', 'HeadArmor': '490010', 'BodyArmor': '491010', 'HandsArmor': '492010', 'LegsArmor': '493010', 'RingSlot1': '100', 'FaceID': '6640', 'Level': '75', 'Vitality': '21', 'Attunement': '9', 'Endurance': '28', 'Strength': '33', 'Dexterity': '21', 'Intelligence': '10', 'Faith': '12', 'Luck': '1', 'Humanity': '3', 'Resistance': '26', 'ChestScale': '100', 'ArmScale': '100', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1', 'Covenant': '8'} +- {'ID': '6650', 'Name': '暗月剣(軽騎士)', 'RightHandWeapon1': '204012', 'LeftHandWeapon1': '1455012', 'HeadArmor': '510010', 'BodyArmor': '511010', 'HandsArmor': '512010', 'LegsArmor': '513010', 'FaceID': '6650', 'Level': '75', 'Vitality': '19', 'Attunement': '10', 'Endurance': '32', 'Strength': '27', 'Dexterity': '28', 'Intelligence': '8', 'Faith': '9', 'Luck': '1', 'Humanity': '3', 'Resistance': '27', 'HeadScale': '-10', 'ChestScale': '-10', 'AbdomenScale': '-10', 'ArmScale': '-10', 'LegScale': '-10', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1', 'Covenant': '8'} +- {'ID': '6700', 'Name': '亡国の王女(過去森)', 'HeadArmor': '330000', 'BodyArmor': '331000', 'HandsArmor': '332000', 'LegsArmor': '333000', 'RingSlot1': '116', 'FaceID': '6050', 'Level': '5', 'Vitality': '9', 'Attunement': '15', 'Endurance': '10', 'Strength': '9', 'Dexterity': '11', 'Intelligence': '18', 'Faith': '10', 'Luck': '1', 'Resistance': '8', 'HeadScale': '-20', 'ChestScale': '-30', 'AbdomenScale': '-40', 'ArmScale': '-60', 'LegScale': '-40', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2'} +- {'ID': '6740', 'Name': 'キアラン(過去森)', 'RightHandWeapon2': '9011005', 'LeftHandWeapon2': '9010005', 'HeadArmor': '670005', 'BodyArmor': '671005', 'HandsArmor': '672005', 'LegsArmor': '673005', 'RingSlot1': '117', 'GoodSlot1': '290', 'GoodSlot2': '296', 'FaceID': '6740', 'Level': '100', 'Vitality': '25', 'Attunement': '14', 'Endurance': '48', 'Strength': '22', 'Dexterity': '46', 'Intelligence': '25', 'Faith': '18', 'Luck': '1', 'Resistance': '21', 'GoodSlot1Count': '99', 'GoodSlot2Count': '99', 'HeadScale': '-10', 'ChestScale': '-20', 'AbdomenScale': '-30', 'ArmScale': '-20', 'LegScale': '-30', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'CharacterType': '2'} +- {'ID': '6801', 'Name': '山賊A\u3000門番', 'RightHandWeapon1': '701013', 'LeftHandWeapon1': '1462013', 'HeadArmor': '50010', 'BodyArmor': '51010', 'HandsArmor': '52010', 'LegsArmor': '53010', 'FaceID': '6801', 'Level': '80', 'Vitality': '24', 'Attunement': '8', 'Endurance': '23', 'Strength': '38', 'Dexterity': '29', 'Intelligence': '9', 'Faith': '9', 'Luck': '1', 'Resistance': '25', 'HeadScale': '50', 'ChestScale': '100', 'AbdomenScale': '100', 'ArmScale': '50', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1', 'Covenant': '7'} +- {'ID': '6802', 'Name': '山賊B\u3000戦士', 'RightHandWeapon1': '301012', 'LeftHandWeapon1': '1451012', 'HeadArmor': '390010', 'BodyArmor': '391010', 'HandsArmor': '392010', 'LegsArmor': '393010', 'RingSlot1': '124', 'FaceID': '6802', 'Level': '75', 'Vitality': '22', 'Attunement': '10', 'Endurance': '26', 'Strength': '24', 'Dexterity': '35', 'Intelligence': '8', 'Faith': '12', 'Luck': '1', 'Resistance': '23', 'HeadScale': '-50', 'ChestScale': '-50', 'AbdomenScale': '-50', 'ArmScale': '-50', 'LegScale': '-50', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Covenant': '7'} +- {'ID': '6803', 'Name': '山賊C\u3000弓使い', 'RightHandWeapon1': '1202012', 'RightHandWeapon2': '401012', 'LeftHandWeapon1': '1402012', 'HeadArmor': '240010', 'BodyArmor': '241010', 'HandsArmor': '242010', 'LegsArmor': '243010', 'ArrowSlot1': '2000000', 'RingSlot1': '124', 'FaceID': '6803', 'ArrowSlot1Count': '999', 'Level': '75', 'Vitality': '19', 'Attunement': '11', 'Endurance': '25', 'Strength': '23', 'Dexterity': '41', 'Intelligence': '9', 'Faith': '11', 'Luck': '1', 'Resistance': '21', 'HeadScale': '-50', 'ChestScale': '-50', 'AbdomenScale': '-50', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Covenant': '7'} +- {'ID': '6804', 'Name': '山賊D\u3000魔法(攻撃)', 'RightHandWeapon1': '1300000', 'RightHandWeapon2': '200012', 'LeftHandWeapon1': '1403012', 'BodyArmor': '221010', 'HandsArmor': '222010', 'LegsArmor': '223010', 'SpellSlot1': '13000', 'SpellSlot2': '13020', 'FaceID': '6804', 'Level': '75', 'Vitality': '17', 'Attunement': '21', 'Endurance': '20', 'Strength': '13', 'Dexterity': '14', 'Intelligence': '42', 'Faith': '13', 'Luck': '1', 'Resistance': '20', 'HeadScale': '70', 'ChestScale': '70', 'ArmScale': '70', 'LegScale': '70', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1', 'Covenant': '7'} +- {'ID': '6805', 'Name': '山賊E\u3000魔法(回復)', 'RightHandWeapon1': '801012', 'RightHandWeapon2': '1361000', 'LeftHandWeapon1': '1400012', 'BodyArmor': '311010', 'HandsArmor': '312010', 'LegsArmor': '313010', 'SpellSlot1': '15030', 'FaceID': '6805', 'Level': '75', 'Vitality': '19', 'Attunement': '15', 'Endurance': '15', 'Strength': '13', 'Dexterity': '16', 'Intelligence': '27', 'Faith': '35', 'Luck': '1', 'Resistance': '20', 'HeadScale': '-100', 'ChestScale': '-100', 'AbdomenScale': '-100', 'ArmScale': '-100', 'LegScale': '-100', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Covenant': '7'} +- {'ID': '6806', 'Name': '山賊F\u3000隠密', 'RightHandWeapon1': '103012', 'LeftHandWeapon1': '1404012', 'HeadArmor': '500010', 'BodyArmor': '501010', 'LegsArmor': '503010', 'RingSlot1': '124', 'FaceID': '6806', 'Level': '75', 'Vitality': '19', 'Attunement': '10', 'Endurance': '35', 'Strength': '21', 'Dexterity': '35', 'Intelligence': '9', 'Faith': '10', 'Luck': '1', 'Resistance': '21', 'HeadScale': '-50', 'ChestScale': '-20', 'AbdomenScale': '-20', 'ArmScale': '-20', 'LegScale': '-20', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1', 'Covenant': '7'} +- {'ID': '7100', 'Name': '城下2_ベイグラントNPC_戦士', 'RightHandWeapon1': '201006', 'LeftHandWeapon1': '1450006', 'HeadArmor': '210000', 'BodyArmor': '211000', 'HandsArmor': '212000', 'LegsArmor': '213000', 'FaceID': '-1', 'Level': '45', 'Vitality': '16', 'Attunement': '9', 'Endurance': '22', 'Strength': '26', 'Dexterity': '23', 'Intelligence': '9', 'Faith': '9', 'Luck': '10', 'Resistance': '16', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '7110', 'Name': '城下1・前半_ベイグラントNPC_盗賊', 'RightHandWeapon1': '103000', 'LeftHandWeapon1': '1404000', 'HeadArmor': '300000', 'BodyArmor': '301000', 'HandsArmor': '302000', 'LegsArmor': '303000', 'FaceID': '-1', 'Level': '5', 'Vitality': '9', 'Attunement': '11', 'Endurance': '12', 'Strength': '10', 'Dexterity': '15', 'Intelligence': '11', 'Faith': '11', 'Luck': '10', 'Resistance': '11', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2'} +- {'ID': '7111', 'Name': '城下1・後半_ベイグラントNPC_盗賊', 'RightHandWeapon1': '103003', 'LeftHandWeapon1': '1404003', 'HeadArmor': '300000', 'BodyArmor': '301000', 'HandsArmor': '302000', 'LegsArmor': '303000', 'FaceID': '-1', 'Level': '35', 'Vitality': '14', 'Attunement': '11', 'Endurance': '19', 'Strength': '17', 'Dexterity': '23', 'Intelligence': '11', 'Faith': '11', 'Luck': '10', 'Resistance': '14', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2'} +- {'ID': '7120', 'Name': '絵画世界_ベイグラントNPC_放浪者', 'RightHandWeapon1': '303015', 'RightHandWeapon2': '1361000', 'LeftHandWeapon1': '1408015', 'HeadArmor': '360000', 'BodyArmor': '361000', 'HandsArmor': '362000', 'LegsArmor': '363000', 'SpellSlot1': '5700', 'SpellSlot2': '5810', 'FaceID': '-1', 'Level': '100', 'Vitality': '20', 'Attunement': '12', 'Endurance': '33', 'Strength': '30', 'Dexterity': '34', 'Intelligence': '31', 'Faith': '8', 'Luck': '10', 'Resistance': '17', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '7130', 'Name': '森庭・前半_ベイグラントNPC_狩人', 'RightHandWeapon1': '200006', 'RightHandWeapon2': '1200006', 'LeftHandWeapon1': '1402006', 'BodyArmor': '241000', 'HandsArmor': '242000', 'LegsArmor': '243000', 'ArrowSlot1': '2003000', 'FaceID': '6300', 'ArrowSlot1Count': '999', 'Level': '45', 'Vitality': '16', 'Attunement': '9', 'Endurance': '21', 'Strength': '24', 'Dexterity': '26', 'Intelligence': '9', 'Faith': '9', 'Luck': '10', 'Resistance': '16', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '7131', 'Name': '森庭・後半_ベイグラントNPC_狩人', 'RightHandWeapon1': '200012', 'RightHandWeapon2': '1200012', 'LeftHandWeapon1': '1402012', 'BodyArmor': '241000', 'HandsArmor': '242000', 'LegsArmor': '243000', 'ArrowSlot1': '2003000', 'FaceID': '6300', 'ArrowSlot1Count': '999', 'Level': '75', 'Vitality': '16', 'Attunement': '9', 'Endurance': '31', 'Strength': '34', 'Dexterity': '36', 'Intelligence': '9', 'Faith': '9', 'Luck': '10', 'Resistance': '16', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '7140', 'Name': '墓地1_ベイグラントNPC_聖職者', 'RightHandWeapon1': '801006', 'RightHandWeapon2': '1361000', 'LeftHandWeapon1': '1400006', 'BodyArmor': '311000', 'HandsArmor': '312000', 'LegsArmor': '313000', 'SpellSlot1': '5000', 'SpellSlot2': '5300', 'FaceID': '6560', 'Level': '45', 'Vitality': '22', 'Attunement': '11', 'Endurance': '16', 'Strength': '18', 'Dexterity': '8', 'Intelligence': '8', 'Faith': '26', 'Luck': '10', 'Resistance': '21', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1', 'Covenant': '1'} +- {'ID': '7150', 'Name': '墓地2_ベイグラントNPC_聖職者', 'RightHandWeapon1': '802014', 'RightHandWeapon2': '1361000', 'LeftHandWeapon1': '1400014', 'HeadArmor': '180000', 'BodyArmor': '181000', 'HandsArmor': '182000', 'LegsArmor': '183000', 'SpellSlot1': '5010', 'SpellSlot2': '5310', 'FaceID': '-1', 'Level': '85', 'Vitality': '32', 'Attunement': '11', 'Endurance': '21', 'Strength': '23', 'Dexterity': '8', 'Intelligence': '8', 'Faith': '36', 'Luck': '10', 'Resistance': '31', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1', 'Covenant': '1'} +- {'ID': '7160', 'Name': '地底湖_ベイグラントNPC_ドラゴンニュート', 'GoodSlot1': '377', 'GoodSlot2': '378', 'FaceID': '-1', 'Level': '85', 'Vitality': '11', 'Attunement': '11', 'Endurance': '34', 'Strength': '70', 'Dexterity': '11', 'Intelligence': '11', 'Faith': '11', 'Luck': '10', 'Resistance': '11', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1', 'Covenant': '5'} +- {'ID': '7170', 'Name': '影町_ベイグラントNPC_放浪者', 'RightHandWeapon1': '401008', 'RightHandWeapon2': '1330008', 'LeftHandWeapon1': '1408008', 'HeadArmor': '360000', 'BodyArmor': '361000', 'HandsArmor': '362000', 'LegsArmor': '363000', 'SpellSlot1': '4010', 'FaceID': '-1', 'Level': '55', 'Vitality': '16', 'Attunement': '11', 'Endurance': '25', 'Strength': '20', 'Dexterity': '29', 'Intelligence': '11', 'Faith': '8', 'Luck': '10', 'Resistance': '20', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '7180', 'Name': '廃都_ベイグラントNPC_呪術師', 'RightHandWeapon1': '700015', 'RightHandWeapon2': '1330015', 'LeftHandWeapon1': '1406015', 'HeadArmor': '230000', 'BodyArmor': '231000', 'HandsArmor': '232000', 'LegsArmor': '233000', 'SpellSlot1': '4220', 'SpellSlot2': '4210', 'FaceID': '-1', 'Level': '95', 'Vitality': '17', 'Attunement': '14', 'Endurance': '36', 'Strength': '42', 'Dexterity': '34', 'Intelligence': '10', 'Faith': '8', 'Luck': '10', 'Resistance': '19', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2'} +- {'ID': '7190', 'Name': '王城1_ベイグラントNPC_戦士', 'RightHandWeapon1': '1001010', 'LeftHandWeapon1': '1450010', 'LeftHandWeapon2': '1251010', 'HeadArmor': '210000', 'BodyArmor': '211000', 'HandsArmor': '212000', 'LegsArmor': '213000', 'BoltSlot1': '2101000', 'FaceID': '-1', 'BoltSlot1Count': '999', 'Level': '65', 'Vitality': '16', 'Attunement': '9', 'Endurance': '31', 'Strength': '37', 'Dexterity': '23', 'Intelligence': '9', 'Faith': '9', 'Luck': '10', 'Resistance': '16', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '7200', 'Name': '王城2_ベイグラントNPC_騎士', 'RightHandWeapon1': '301012', 'RightHandWeapon2': '1361000', 'LeftHandWeapon1': '1452012', 'HeadArmor': '390000', 'BodyArmor': '391000', 'HandsArmor': '392000', 'LegsArmor': '393000', 'SpellSlot1': '5040', 'FaceID': '-1', 'Level': '75', 'Vitality': '34', 'Attunement': '14', 'Endurance': '20', 'Strength': '26', 'Dexterity': '26', 'Intelligence': '9', 'Faith': '11', 'Luck': '10', 'Resistance': '20', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '7210', 'Name': '深淵_ベイグラントNPC_山賊', 'RightHandWeapon1': '750014', 'LeftHandWeapon1': '1462014', 'HeadArmor': '50000', 'BodyArmor': '51000', 'HandsArmor': '52000', 'LegsArmor': '53000', 'GoodSlot1': '293', 'FaceID': '-1', 'Level': '85', 'Vitality': '22', 'Attunement': '8', 'Endurance': '34', 'Strength': '47', 'Dexterity': '21', 'Intelligence': '8', 'Faith': '9', 'Luck': '10', 'Resistance': '21', 'GoodSlot1Count': '99', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2'} +- {'ID': '7220', 'Name': '結晶塔_ベイグラントNPC_魔術師', 'RightHandWeapon1': '201014', 'LeftHandWeapon1': '1403014', 'LeftHandWeapon2': '1300000', 'HeadArmor': '220000', 'BodyArmor': '221000', 'HandsArmor': '222000', 'LegsArmor': '223000', 'SpellSlot1': '3110', 'SpellSlot2': '3000', 'SpellSlot3': '3020', 'FaceID': '-1', 'Level': '85', 'Vitality': '18', 'Attunement': '22', 'Endurance': '24', 'Strength': '15', 'Dexterity': '17', 'Intelligence': '48', 'Faith': '8', 'Luck': '10', 'Resistance': '18', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '7230', 'Name': '大墓_ベイグラントNPC_持たざるもの', 'RightHandWeapon1': '850015', 'LeftHandWeapon1': '1409015', 'FaceID': '-1', 'Level': '150', 'Vitality': '40', 'Attunement': '11', 'Endurance': '50', 'Strength': '61', 'Dexterity': '11', 'Intelligence': '11', 'Faith': '11', 'Luck': '10', 'Resistance': '40', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '7240', 'Name': 'チュートリアル_ベイグラントNPC_持たざるもの', 'RightHandWeapon1': '901008', 'LeftHandWeapon1': '901008', 'FaceID': '-1', 'Level': '55', 'Vitality': '20', 'Attunement': '11', 'Endurance': '25', 'Strength': '31', 'Dexterity': '11', 'Intelligence': '11', 'Faith': '11', 'Luck': '10', 'Resistance': '20', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '8000', 'Name': 'PV用_戦士装備(主人公)', 'HeadArmor': '210000', 'BodyArmor': '211000', 'HandsArmor': '212000', 'LegsArmor': '213000', 'RingSlot1': '100', 'FaceID': '-1', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '8001', 'Name': 'PV用_呪術師', 'HeadArmor': '230000', 'BodyArmor': '231000', 'HandsArmor': '232000', 'LegsArmor': '233000', 'RingSlot1': '100', 'FaceID': '-1', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '8002', 'Name': 'PV用_紅衣頭装備なし', 'HeadArmor': '140000', 'BodyArmor': '141000', 'HandsArmor': '142000', 'LegsArmor': '143000', 'RingSlot1': '100', 'FaceID': '-1', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '8003', 'Name': 'PV用_チェインメイル女(ファントム)', 'HeadArmor': '170000', 'BodyArmor': '171000', 'HandsArmor': '172000', 'LegsArmor': '173000', 'RingSlot1': '100', 'FaceID': '-1', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2'} +- {'ID': '8004', 'Name': 'PV用_狩人頭装備なし(ファントム)', 'BodyArmor': '241000', 'HandsArmor': '242000', 'LegsArmor': '243000', 'RingSlot1': '100', 'FaceID': '-1', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '8005', 'Name': 'PV用_たまねぎ(ファントム)', 'HeadArmor': '10000', 'BodyArmor': '11000', 'HandsArmor': '12000', 'LegsArmor': '13000', 'RingSlot1': '100', 'FaceID': '-1', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '8006', 'Name': 'PV用_灰色の聖女', 'BodyArmor': '401000', 'HandsArmor': '402000', 'LegsArmor': '403000', 'RingSlot1': '100', 'FaceID': '300', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2'} +- {'ID': '8007', 'Name': 'PV用_騎士', 'RightHandWeapon1': '202000', 'LeftHandWeapon1': '1456000', 'HeadArmor': '350000', 'BodyArmor': '351000', 'HandsArmor': '352000', 'LegsArmor': '353000', 'FaceID': '-1', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1', 'Covenant': '1'} +- {'ID': '8008', 'Name': 'PV用_黒騎士', 'RightHandWeapon1': '350000', 'RightHandWeapon2': '1100000', 'LeftHandWeapon1': '1501000', 'LeftHandWeapon2': '1300000', 'HeadArmor': '70000', 'BodyArmor': '71000', 'HandsArmor': '72000', 'LegsArmor': '73000', 'FaceID': '-1', 'Vitality': '99', 'Attunement': '99', 'Endurance': '99', 'Strength': '99', 'Dexterity': '99', 'Intelligence': '99', 'Faith': '99', 'Luck': '99', 'Humanity': '99', 'Resistance': '99', 'HeadScale': '100', 'ChestScale': '100', 'AbdomenScale': '100', 'ArmScale': '100', 'LegScale': '100', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '8500', 'Name': 'テストプレイヤー(戦士/直剣、斧槍、盾)', 'RightHandWeapon1': '201000', 'RightHandWeapon2': '1107000', 'LeftHandWeapon1': '1450000', 'HeadArmor': '210000', 'BodyArmor': '211000', 'HandsArmor': '212000', 'LegsArmor': '213000', 'GoodSlot1': '200', 'GoodSlot2': '312', 'GoodSlot3': '292', 'GoodSlot4': '310', 'GoodSlot5': '273', 'GoodSlot6': '100', 'GoodSlot7': '101', 'GoodSlot8': '102', 'GoodSlot9': '103', 'FaceID': '-1', 'Vitality': '15', 'Attunement': '7', 'Endurance': '12', 'Strength': '14', 'Dexterity': '9', 'Intelligence': '6', 'Faith': '10', 'Luck': '8', 'Humanity': '3', 'Resistance': '10', 'GoodSlot1Count': '1', 'GoodSlot2Count': '20', 'GoodSlot3Count': '5', 'GoodSlot4Count': '4', 'GoodSlot5Count': '5', 'GoodSlot6Count': '1', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '8501', 'Name': 'テストプレイヤー(狩人/斧、弓、盾)', 'RightHandWeapon1': '701000', 'RightHandWeapon2': '1201000', 'LeftHandWeapon1': '1404000', 'HeadArmor': '240000', 'BodyArmor': '241000', 'HandsArmor': '242000', 'LegsArmor': '243000', 'ArrowSlot1': '2000000', 'GoodSlot1': '200', 'GoodSlot2': '312', 'GoodSlot3': '292', 'GoodSlot4': '294', 'GoodSlot5': '273', 'GoodSlot6': '100', 'GoodSlot7': '101', 'GoodSlot8': '102', 'GoodSlot9': '103', 'FaceID': '-1', 'ArrowSlot1Count': '20', 'Vitality': '11', 'Attunement': '8', 'Endurance': '11', 'Strength': '11', 'Dexterity': '12', 'Intelligence': '9', 'Faith': '8', 'Luck': '11', 'Humanity': '3', 'Resistance': '10', 'GoodSlot1Count': '1', 'GoodSlot2Count': '20', 'GoodSlot3Count': '5', 'GoodSlot4Count': '8', 'GoodSlot5Count': '5', 'GoodSlot6Count': '1', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '8502', 'Name': 'テストプレイヤー(魔術師/触媒、直剣、小盾、投射炎)', 'RightHandWeapon1': '202000', 'RightHandWeapon2': '1330000', 'LeftHandWeapon1': '1402000', 'HeadArmor': '230000', 'BodyArmor': '231000', 'HandsArmor': '232000', 'LegsArmor': '233000', 'SpellSlot1': '4000', 'SpellSlot2': '4300', 'GoodSlot1': '200', 'GoodSlot3': '312', 'GoodSlot4': '294', 'GoodSlot5': '273', 'GoodSlot6': '100', 'GoodSlot7': '101', 'GoodSlot8': '102', 'GoodSlot9': '103', 'FaceID': '-1', 'Vitality': '8', 'Attunement': '14', 'Endurance': '10', 'Strength': '9', 'Dexterity': '8', 'Intelligence': '15', 'Faith': '9', 'Luck': '8', 'Humanity': '3', 'Resistance': '10', 'GoodSlot1Count': '1', 'GoodSlot3Count': '20', 'GoodSlot4Count': '8', 'GoodSlot5Count': '5', 'GoodSlot6Count': '1', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '8600', 'Name': 'テストプレイヤー_戦士(チュートリアルクリア)', 'RightHandWeapon1': '201000', 'RightHandWeapon2': '1000000', 'LeftHandWeapon1': '1450000', 'LeftHandWeapon2': '1200000', 'HeadArmor': '210000', 'BodyArmor': '211000', 'HandsArmor': '212000', 'LegsArmor': '213000', 'ArrowSlot1': '2000000', 'GoodSlot8': '201', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6000', 'ArrowSlot1Count': '20', 'Level': '3', 'Vitality': '12', 'Attunement': '9', 'Endurance': '12', 'Strength': '13', 'Dexterity': '13', 'Intelligence': '9', 'Faith': '9', 'Luck': '10', 'Humanity': '3', 'Resistance': '11', 'GoodSlot8Count': '20', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '8601', 'Name': 'テストプレイヤー_騎士(チュートリアルクリア)', 'RightHandWeapon1': '202000', 'RightHandWeapon2': '300000', 'LeftHandWeapon1': '1452000', 'HeadArmor': '390000', 'BodyArmor': '391000', 'HandsArmor': '392000', 'LegsArmor': '393000', 'GoodSlot8': '201', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6020', 'Level': '3', 'Vitality': '15', 'Attunement': '10', 'Endurance': '10', 'Strength': '16', 'Dexterity': '11', 'Intelligence': '9', 'Faith': '7', 'Luck': '10', 'Humanity': '3', 'Resistance': '10', 'GoodSlot8Count': '20', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '13', 'Gender': '1', 'Covenant': '1'} +- {'ID': '8602', 'Name': 'テストプレイヤー_魔術師(チュートリアルクリア)', 'RightHandWeapon1': '1300000', 'RightHandWeapon2': '100000', 'LeftHandWeapon1': '1403000', 'HeadArmor': '220000', 'BodyArmor': '221000', 'HandsArmor': '222000', 'LegsArmor': '223000', 'SpellSlot1': '3000', 'GoodSlot1': '3000', 'GoodSlot8': '201', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6410', 'Level': '3', 'Vitality': '9', 'Attunement': '15', 'Endurance': '8', 'Strength': '9', 'Dexterity': '11', 'Intelligence': '16', 'Faith': '8', 'Luck': '10', 'Humanity': '3', 'Resistance': '8', 'GoodSlot1Count': '1', 'GoodSlot8Count': '20', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8'} +- {'ID': '8603', 'Name': 'テストプレイヤー_呪術師(チュートリアルクリア)', 'RightHandWeapon1': '1330000', 'RightHandWeapon2': '700000', 'LeftHandWeapon1': '1406000', 'HeadArmor': '230000', 'BodyArmor': '231000', 'HandsArmor': '232000', 'LegsArmor': '233000', 'SpellSlot1': '4000', 'GoodSlot1': '4000', 'GoodSlot8': '201', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6130', 'Level': '3', 'Vitality': '11', 'Attunement': '12', 'Endurance': '11', 'Strength': '12', 'Dexterity': '9', 'Intelligence': '11', 'Faith': '8', 'Luck': '10', 'Humanity': '3', 'Resistance': '12', 'GoodSlot1Count': '1', 'GoodSlot8Count': '20', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '8604', 'Name': 'テストプレイヤー_僧侶(チュートリアルクリア)', 'RightHandWeapon1': '1361000', 'RightHandWeapon2': '801000', 'LeftHandWeapon1': '1400000', 'HeadArmor': '900000', 'BodyArmor': '311000', 'HandsArmor': '312000', 'LegsArmor': '313000', 'SpellSlot1': '5000', 'GoodSlot1': '5000', 'GoodSlot8': '201', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6090', 'Level': '3', 'Vitality': '12', 'Attunement': '11', 'Endurance': '10', 'Strength': '12', 'Dexterity': '8', 'Intelligence': '8', 'Faith': '15', 'Luck': '10', 'Humanity': '3', 'Resistance': '10', 'GoodSlot1Count': '1', 'GoodSlot8Count': '20', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '13', 'Gender': '1', 'Covenant': '1'} +- {'ID': '8610', 'Name': 'テストプレイヤー_戦士(ガーゴイルクリア)', 'RightHandWeapon1': '201003', 'RightHandWeapon2': '1000003', 'LeftHandWeapon1': '1450003', 'LeftHandWeapon2': '1200003', 'HeadArmor': '210001', 'BodyArmor': '211001', 'HandsArmor': '212001', 'LegsArmor': '213001', 'ArrowSlot1': '2000000', 'GoodSlot8': '202', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6000', 'ArrowSlot1Count': '30', 'Level': '13', 'Vitality': '14', 'Attunement': '9', 'Endurance': '14', 'Strength': '15', 'Dexterity': '15', 'Intelligence': '9', 'Faith': '9', 'Luck': '10', 'Humanity': '3', 'Resistance': '13', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '8611', 'Name': 'テストプレイヤー_騎士(ガーゴイルクリア)', 'RightHandWeapon1': '202003', 'RightHandWeapon2': '300003', 'LeftHandWeapon1': '1452003', 'HeadArmor': '390001', 'BodyArmor': '391001', 'HandsArmor': '392001', 'LegsArmor': '393001', 'GoodSlot8': '202', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6020', 'Level': '13', 'Vitality': '19', 'Attunement': '10', 'Endurance': '13', 'Strength': '13', 'Dexterity': '11', 'Intelligence': '9', 'Faith': '11', 'Luck': '10', 'Humanity': '3', 'Resistance': '12', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '13', 'Gender': '1', 'Covenant': '1'} +- {'ID': '8612', 'Name': 'テストプレイヤー_魔術師(ガーゴイルクリア)', 'RightHandWeapon1': '1300000', 'RightHandWeapon2': '100003', 'LeftHandWeapon1': '1403003', 'HeadArmor': '220001', 'BodyArmor': '221001', 'HandsArmor': '222001', 'LegsArmor': '223001', 'SpellSlot1': '3010', 'SpellSlot2': '3000', 'GoodSlot1': '3010', 'GoodSlot2': '3000', 'GoodSlot8': '202', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6410', 'Level': '13', 'Vitality': '11', 'Attunement': '17', 'Endurance': '10', 'Strength': '9', 'Dexterity': '11', 'Intelligence': '20', 'Faith': '8', 'Luck': '10', 'Humanity': '3', 'Resistance': '8', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8'} +- {'ID': '8613', 'Name': 'テストプレイヤー_呪術師(ガーゴイルクリア)', 'RightHandWeapon1': '1330300', 'RightHandWeapon2': '700003', 'LeftHandWeapon1': '1406003', 'HeadArmor': '230001', 'BodyArmor': '231001', 'HandsArmor': '232001', 'LegsArmor': '233001', 'SpellSlot1': '4010', 'SpellSlot2': '4000', 'GoodSlot1': '4010', 'GoodSlot2': '4000', 'GoodSlot8': '202', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6130', 'Level': '13', 'Vitality': '13', 'Attunement': '14', 'Endurance': '12', 'Strength': '14', 'Dexterity': '9', 'Intelligence': '13', 'Faith': '8', 'Luck': '10', 'Humanity': '3', 'Resistance': '13', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '8614', 'Name': 'テストプレイヤー_僧侶(ガーゴイルクリア)', 'RightHandWeapon1': '1361000', 'RightHandWeapon2': '801003', 'LeftHandWeapon1': '1400003', 'HeadArmor': '900001', 'BodyArmor': '311001', 'HandsArmor': '312001', 'LegsArmor': '313001', 'SpellSlot1': '5020', 'SpellSlot2': '5000', 'GoodSlot1': '5020', 'GoodSlot2': '5000', 'GoodSlot8': '202', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6090', 'Level': '13', 'Vitality': '14', 'Attunement': '13', 'Endurance': '12', 'Strength': '12', 'Dexterity': '8', 'Intelligence': '8', 'Faith': '19', 'Luck': '10', 'Humanity': '3', 'Resistance': '10', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '13', 'Gender': '1', 'Covenant': '1'} +- {'ID': '8620', 'Name': 'テストプレイヤー_戦士(城下2探索だけ)', 'RightHandWeapon1': '201005', 'RightHandWeapon2': '1000005', 'LeftHandWeapon1': '1450005', 'LeftHandWeapon2': '1200005', 'HeadArmor': '210003', 'BodyArmor': '211003', 'HandsArmor': '212003', 'LegsArmor': '213003', 'ArrowSlot1': '2000000', 'GoodSlot8': '202', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6000', 'ArrowSlot1Count': '50', 'Level': '19', 'Vitality': '15', 'Attunement': '9', 'Endurance': '15', 'Strength': '17', 'Dexterity': '16', 'Intelligence': '9', 'Faith': '9', 'Luck': '10', 'Humanity': '3', 'Resistance': '14', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '8621', 'Name': 'テストプレイヤー_騎士(城下2探索だけ)', 'RightHandWeapon1': '202005', 'RightHandWeapon2': '300005', 'LeftHandWeapon1': '1452005', 'HeadArmor': '390003', 'BodyArmor': '391003', 'HandsArmor': '392003', 'LegsArmor': '393003', 'GoodSlot8': '202', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6020', 'Level': '19', 'Vitality': '18', 'Attunement': '10', 'Endurance': '14', 'Strength': '18', 'Dexterity': '11', 'Intelligence': '9', 'Faith': '11', 'Luck': '10', 'Humanity': '3', 'Resistance': '13', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '13', 'Gender': '1', 'Covenant': '1'} +- {'ID': '8622', 'Name': 'テストプレイヤー_魔術師(城下2探索だけ)', 'RightHandWeapon1': '1300000', 'RightHandWeapon2': '100005', 'LeftHandWeapon1': '1403005', 'HeadArmor': '220003', 'BodyArmor': '221003', 'HandsArmor': '222003', 'LegsArmor': '223003', 'SpellSlot1': '3010', 'SpellSlot2': '3000', 'GoodSlot1': '3010', 'GoodSlot2': '3000', 'GoodSlot8': '202', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6410', 'Level': '19', 'Vitality': '12', 'Attunement': '18', 'Endurance': '11', 'Strength': '9', 'Dexterity': '11', 'Intelligence': '22', 'Faith': '8', 'Luck': '10', 'Humanity': '3', 'Resistance': '9', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8'} +- {'ID': '8623', 'Name': 'テストプレイヤー_呪術師(城下2探索だけ)', 'RightHandWeapon1': '1330500', 'RightHandWeapon2': '700005', 'LeftHandWeapon1': '1406005', 'HeadArmor': '230003', 'BodyArmor': '231003', 'HandsArmor': '232003', 'LegsArmor': '233003', 'SpellSlot1': '4010', 'SpellSlot2': '4000', 'GoodSlot1': '4010', 'GoodSlot2': '4000', 'GoodSlot8': '202', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6130', 'Level': '19', 'Vitality': '14', 'Attunement': '15', 'Endurance': '13', 'Strength': '15', 'Dexterity': '9', 'Intelligence': '14', 'Faith': '8', 'Luck': '10', 'Humanity': '3', 'Resistance': '14', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '8624', 'Name': 'テストプレイヤー_僧侶(城下2探索だけ)', 'RightHandWeapon1': '1361000', 'RightHandWeapon2': '801005', 'LeftHandWeapon1': '1400005', 'HeadArmor': '900003', 'BodyArmor': '311003', 'HandsArmor': '312003', 'LegsArmor': '313003', 'SpellSlot1': '5020', 'SpellSlot2': '5000', 'GoodSlot1': '5020', 'GoodSlot2': '5000', 'GoodSlot8': '202', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6090', 'Level': '19', 'Vitality': '15', 'Attunement': '14', 'Endurance': '13', 'Strength': '12', 'Dexterity': '8', 'Intelligence': '8', 'Faith': '21', 'Luck': '10', 'Humanity': '3', 'Resistance': '11', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '13', 'Gender': '1', 'Covenant': '1'} +- {'ID': '8630', 'Name': 'テストプレイヤー_戦士(城下2クリア/貪食クリア)', 'RightHandWeapon1': '201007', 'RightHandWeapon2': '1000007', 'LeftHandWeapon1': '1450007', 'LeftHandWeapon2': '1200007', 'HeadArmor': '210004', 'BodyArmor': '211004', 'HandsArmor': '212004', 'LegsArmor': '213004', 'ArrowSlot1': '2000000', 'GoodSlot8': '202', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6000', 'ArrowSlot1Count': '70', 'Level': '34', 'Vitality': '18', 'Attunement': '9', 'Endurance': '18', 'Strength': '20', 'Dexterity': '19', 'Intelligence': '9', 'Faith': '9', 'Luck': '10', 'Humanity': '3', 'Resistance': '17', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '8631', 'Name': 'テストプレイヤー_騎士(城下2クリア/貪食クリア)', 'RightHandWeapon1': '202007', 'RightHandWeapon2': '300007', 'LeftHandWeapon1': '1452007', 'HeadArmor': '390004', 'BodyArmor': '391004', 'HandsArmor': '392004', 'LegsArmor': '393004', 'GoodSlot8': '202', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6020', 'Level': '34', 'Vitality': '25', 'Attunement': '10', 'Endurance': '17', 'Strength': '20', 'Dexterity': '11', 'Intelligence': '9', 'Faith': '11', 'Luck': '10', 'Humanity': '3', 'Resistance': '16', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '13', 'Gender': '1', 'Covenant': '1'} +- {'ID': '8632', 'Name': 'テストプレイヤー_魔術師(城下2クリア/貪食クリア)', 'RightHandWeapon1': '1300000', 'RightHandWeapon2': '100007', 'LeftHandWeapon1': '1403007', 'HeadArmor': '220004', 'BodyArmor': '221004', 'HandsArmor': '222004', 'LegsArmor': '223004', 'SpellSlot1': '3030', 'SpellSlot2': '3010', 'SpellSlot3': '3000', 'GoodSlot1': '3030', 'GoodSlot2': '3010', 'GoodSlot3': '3000', 'GoodSlot8': '202', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6410', 'Level': '34', 'Vitality': '15', 'Attunement': '21', 'Endurance': '13', 'Strength': '9', 'Dexterity': '11', 'Intelligence': '28', 'Faith': '8', 'Luck': '10', 'Humanity': '3', 'Resistance': '10', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8'} +- {'ID': '8633', 'Name': 'テストプレイヤー_呪術師(城下2クリア/貪食クリア)', 'RightHandWeapon1': '1330700', 'RightHandWeapon2': '700007', 'LeftHandWeapon1': '1406007', 'HeadArmor': '230004', 'BodyArmor': '231004', 'HandsArmor': '232004', 'LegsArmor': '233004', 'SpellSlot1': '4020', 'SpellSlot2': '4010', 'SpellSlot3': '4000', 'GoodSlot1': '4020', 'GoodSlot2': '4010', 'GoodSlot3': '4000', 'GoodSlot8': '202', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6130', 'Level': '34', 'Vitality': '17', 'Attunement': '18', 'Endurance': '15', 'Strength': '16', 'Dexterity': '9', 'Intelligence': '19', 'Faith': '8', 'Luck': '10', 'Humanity': '3', 'Resistance': '15', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '8634', 'Name': 'テストプレイヤー_僧侶(城下2クリア/貪食クリア)', 'RightHandWeapon1': '1361000', 'RightHandWeapon2': '801007', 'LeftHandWeapon1': '1400007', 'HeadArmor': '900004', 'BodyArmor': '311004', 'HandsArmor': '312004', 'LegsArmor': '313004', 'SpellSlot1': '5520', 'SpellSlot2': '5020', 'SpellSlot3': '5000', 'GoodSlot1': '5520', 'GoodSlot2': '5020', 'GoodSlot3': '5000', 'GoodSlot8': '202', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6090', 'Level': '34', 'Vitality': '18', 'Attunement': '17', 'Endurance': '15', 'Strength': '12', 'Dexterity': '8', 'Intelligence': '8', 'Faith': '27', 'Luck': '10', 'Humanity': '3', 'Resistance': '12', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '13', 'Gender': '1', 'Covenant': '3'} +- {'ID': '8640', 'Name': 'テストプレイヤー_戦士(影町クリア)', 'RightHandWeapon1': '201009', 'RightHandWeapon2': '1000009', 'LeftHandWeapon1': '1450009', 'LeftHandWeapon2': '1200009', 'HeadArmor': '210005', 'BodyArmor': '211005', 'HandsArmor': '212005', 'LegsArmor': '213005', 'ArrowSlot1': '2000000', 'GoodSlot8': '204', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6000', 'ArrowSlot1Count': '90', 'Level': '42', 'Vitality': '20', 'Attunement': '9', 'Endurance': '19', 'Strength': '21', 'Dexterity': '21', 'Intelligence': '9', 'Faith': '9', 'Luck': '10', 'Humanity': '3', 'Resistance': '19', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '8641', 'Name': 'テストプレイヤー_騎士(影町クリア)', 'RightHandWeapon1': '202009', 'RightHandWeapon2': '300009', 'LeftHandWeapon1': '1452009', 'HeadArmor': '390005', 'BodyArmor': '391005', 'HandsArmor': '392005', 'LegsArmor': '393005', 'GoodSlot8': '204', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6020', 'Level': '42', 'Vitality': '28', 'Attunement': '10', 'Endurance': '18', 'Strength': '22', 'Dexterity': '11', 'Intelligence': '9', 'Faith': '11', 'Luck': '10', 'Humanity': '3', 'Resistance': '18', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '13', 'Gender': '1', 'Covenant': '1'} +- {'ID': '8642', 'Name': 'テストプレイヤー_魔術師(影町クリア)', 'RightHandWeapon1': '1300000', 'RightHandWeapon2': '100008', 'LeftHandWeapon1': '1403008', 'HeadArmor': '220005', 'BodyArmor': '221005', 'HandsArmor': '222005', 'LegsArmor': '223005', 'SpellSlot1': '3030', 'SpellSlot2': '3010', 'SpellSlot3': '3000', 'GoodSlot1': '3030', 'GoodSlot2': '3010', 'GoodSlot3': '3000', 'GoodSlot8': '204', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6410', 'Level': '42', 'Vitality': '16', 'Attunement': '23', 'Endurance': '13', 'Strength': '9', 'Dexterity': '11', 'Intelligence': '32', 'Faith': '8', 'Luck': '10', 'Humanity': '3', 'Resistance': '11', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8'} +- {'ID': '8643', 'Name': 'テストプレイヤー_呪術師(影町クリア)', 'RightHandWeapon1': '1330800', 'RightHandWeapon2': '700008', 'LeftHandWeapon1': '1406008', 'HeadArmor': '230005', 'BodyArmor': '231005', 'HandsArmor': '232005', 'LegsArmor': '233005', 'SpellSlot1': '4020', 'SpellSlot2': '4010', 'SpellSlot3': '4000', 'GoodSlot1': '4020', 'GoodSlot2': '4010', 'GoodSlot3': '4000', 'GoodSlot8': '204', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6130', 'Level': '42', 'Vitality': '18', 'Attunement': '20', 'Endurance': '15', 'Strength': '18', 'Dexterity': '9', 'Intelligence': '21', 'Faith': '8', 'Luck': '10', 'Humanity': '3', 'Resistance': '16', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '8644', 'Name': 'テストプレイヤー_僧侶(影町クリア)', 'RightHandWeapon1': '1361000', 'RightHandWeapon2': '801008', 'LeftHandWeapon1': '1400008', 'HeadArmor': '900005', 'BodyArmor': '311005', 'HandsArmor': '312005', 'LegsArmor': '313005', 'SpellSlot1': '5010', 'SpellSlot2': '5520', 'SpellSlot3': '5020', 'SpellSlot4': '5000', 'GoodSlot1': '5010', 'GoodSlot2': '5520', 'GoodSlot3': '5020', 'GoodSlot4': '5000', 'GoodSlot8': '204', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6090', 'Level': '42', 'Vitality': '19', 'Attunement': '19', 'Endurance': '15', 'Strength': '12', 'Dexterity': '8', 'Intelligence': '8', 'Faith': '31', 'Luck': '10', 'Humanity': '3', 'Resistance': '13', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot4Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '13', 'Gender': '1', 'Covenant': '3'} +- {'ID': '8650', 'Name': 'テストプレイヤー_戦士(王城1クリア)', 'RightHandWeapon1': '201010', 'RightHandWeapon2': '1000010', 'LeftHandWeapon1': '1450010', 'LeftHandWeapon2': '1200010', 'HeadArmor': '210006', 'BodyArmor': '211006', 'HandsArmor': '212006', 'LegsArmor': '213006', 'ArrowSlot1': '2001000', 'ArrowSlot2': '2000000', 'GoodSlot8': '204', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6000', 'ArrowSlot1Count': '20', 'ArrowSlot2Count': '50', 'Level': '50', 'Vitality': '21', 'Attunement': '9', 'Endurance': '21', 'Strength': '23', 'Dexterity': '23', 'Intelligence': '9', 'Faith': '9', 'Luck': '10', 'Humanity': '3', 'Resistance': '20', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '8651', 'Name': 'テストプレイヤー_騎士(王城1クリア)', 'RightHandWeapon1': '202010', 'RightHandWeapon2': '300010', 'LeftHandWeapon1': '1452010', 'HeadArmor': '390006', 'BodyArmor': '391006', 'HandsArmor': '392006', 'LegsArmor': '393006', 'GoodSlot8': '204', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6020', 'Level': '50', 'Vitality': '29', 'Attunement': '10', 'Endurance': '20', 'Strength': '25', 'Dexterity': '11', 'Intelligence': '9', 'Faith': '11', 'Luck': '10', 'Humanity': '3', 'Resistance': '20', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '13', 'Gender': '1', 'Covenant': '1'} +- {'ID': '8652', 'Name': 'テストプレイヤー_魔術師(王城1クリア)', 'RightHandWeapon1': '1300000', 'RightHandWeapon2': '100010', 'LeftHandWeapon1': '1403010', 'HeadArmor': '220006', 'BodyArmor': '221006', 'HandsArmor': '222006', 'LegsArmor': '223006', 'SpellSlot1': '3060', 'SpellSlot2': '3030', 'SpellSlot3': '3010', 'SpellSlot4': '3000', 'GoodSlot1': '3060', 'GoodSlot2': '3030', 'GoodSlot3': '3010', 'GoodSlot4': '3000', 'GoodSlot8': '204', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6410', 'Level': '50', 'Vitality': '18', 'Attunement': '24', 'Endurance': '14', 'Strength': '9', 'Dexterity': '11', 'Intelligence': '35', 'Faith': '8', 'Luck': '10', 'Humanity': '3', 'Resistance': '12', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot4Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8'} +- {'ID': '8653', 'Name': 'テストプレイヤー_呪術師(王城1クリア)', 'RightHandWeapon1': '1331000', 'RightHandWeapon2': '700010', 'LeftHandWeapon1': '1406010', 'HeadArmor': '230006', 'BodyArmor': '231006', 'HandsArmor': '232006', 'LegsArmor': '233006', 'SpellSlot1': '4030', 'SpellSlot2': '4020', 'SpellSlot3': '4010', 'SpellSlot4': '4000', 'GoodSlot1': '4030', 'GoodSlot2': '4020', 'GoodSlot3': '4010', 'GoodSlot4': '4000', 'GoodSlot8': '204', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6130', 'Level': '50', 'Vitality': '20', 'Attunement': '21', 'Endurance': '16', 'Strength': '19', 'Dexterity': '9', 'Intelligence': '23', 'Faith': '8', 'Luck': '10', 'Humanity': '3', 'Resistance': '17', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot4Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '8654', 'Name': 'テストプレイヤー_僧侶(王城1クリア)', 'RightHandWeapon1': '1361000', 'RightHandWeapon2': '801010', 'LeftHandWeapon1': '1400010', 'HeadArmor': '900006', 'BodyArmor': '311006', 'HandsArmor': '312006', 'LegsArmor': '313006', 'SpellSlot1': '5010', 'SpellSlot2': '5520', 'SpellSlot3': '5020', 'SpellSlot4': '5000', 'GoodSlot1': '5010', 'GoodSlot2': '5520', 'GoodSlot3': '5020', 'GoodSlot4': '5000', 'GoodSlot8': '204', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6090', 'Level': '50', 'Vitality': '21', 'Attunement': '20', 'Endurance': '16', 'Strength': '12', 'Dexterity': '8', 'Intelligence': '8', 'Faith': '34', 'Luck': '10', 'Humanity': '3', 'Resistance': '14', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot4Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '13', 'Gender': '1', 'Covenant': '3'} +- {'ID': '8660', 'Name': 'テストプレイヤー_戦士(王城2クリア)', 'RightHandWeapon1': '201012', 'RightHandWeapon2': '1000012', 'LeftHandWeapon1': '1450012', 'LeftHandWeapon2': '1200012', 'HeadArmor': '210007', 'BodyArmor': '211007', 'HandsArmor': '212007', 'LegsArmor': '213007', 'ArrowSlot1': '2001000', 'ArrowSlot2': '2000000', 'GoodSlot8': '206', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6000', 'ArrowSlot1Count': '30', 'ArrowSlot2Count': '70', 'Level': '56', 'Vitality': '22', 'Attunement': '9', 'Endurance': '22', 'Strength': '24', 'Dexterity': '24', 'Intelligence': '9', 'Faith': '9', 'Luck': '10', 'Humanity': '3', 'Resistance': '22', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '8661', 'Name': 'テストプレイヤー_騎士(王城2クリア)', 'RightHandWeapon1': '202012', 'RightHandWeapon2': '300012', 'LeftHandWeapon1': '1452012', 'HeadArmor': '390007', 'BodyArmor': '391007', 'HandsArmor': '392007', 'LegsArmor': '393007', 'GoodSlot8': '206', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6020', 'Level': '56', 'Vitality': '32', 'Attunement': '10', 'Endurance': '21', 'Strength': '26', 'Dexterity': '11', 'Intelligence': '9', 'Faith': '11', 'Luck': '10', 'Humanity': '3', 'Resistance': '21', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '13', 'Gender': '1', 'Covenant': '1'} +- {'ID': '8662', 'Name': 'テストプレイヤー_魔術師(王城2クリア)', 'RightHandWeapon1': '1300000', 'RightHandWeapon2': '100012', 'LeftHandWeapon1': '1403012', 'HeadArmor': '220007', 'BodyArmor': '221007', 'HandsArmor': '222007', 'LegsArmor': '223007', 'SpellSlot1': '3060', 'SpellSlot2': '3030', 'SpellSlot3': '3010', 'SpellSlot4': '3000', 'GoodSlot1': '3060', 'GoodSlot2': '3030', 'GoodSlot3': '3010', 'GoodSlot4': '3000', 'GoodSlot8': '206', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6410', 'Level': '56', 'Vitality': '19', 'Attunement': '26', 'Endurance': '15', 'Strength': '9', 'Dexterity': '11', 'Intelligence': '37', 'Faith': '8', 'Luck': '10', 'Humanity': '3', 'Resistance': '12', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot4Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8'} +- {'ID': '8663', 'Name': 'テストプレイヤー_呪術師(王城2クリア)', 'RightHandWeapon1': '1331200', 'RightHandWeapon2': '700012', 'LeftHandWeapon1': '1406012', 'HeadArmor': '230007', 'BodyArmor': '231007', 'HandsArmor': '232007', 'LegsArmor': '233007', 'SpellSlot1': '4030', 'SpellSlot2': '4020', 'SpellSlot3': '4010', 'SpellSlot4': '4000', 'GoodSlot1': '4030', 'GoodSlot2': '4020', 'GoodSlot3': '4010', 'GoodSlot4': '4000', 'GoodSlot8': '206', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6130', 'Level': '56', 'Vitality': '21', 'Attunement': '23', 'Endurance': '17', 'Strength': '20', 'Dexterity': '9', 'Intelligence': '24', 'Faith': '8', 'Luck': '10', 'Humanity': '3', 'Resistance': '17', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot4Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '8664', 'Name': 'テストプレイヤー_僧侶(王城2クリア)', 'RightHandWeapon1': '1361000', 'RightHandWeapon2': '801012', 'LeftHandWeapon1': '1400012', 'HeadArmor': '900007', 'BodyArmor': '311007', 'HandsArmor': '312007', 'LegsArmor': '313007', 'SpellSlot1': '5010', 'SpellSlot2': '5520', 'SpellSlot3': '5020', 'SpellSlot4': '5000', 'GoodSlot1': '5010', 'GoodSlot2': '5520', 'GoodSlot3': '5020', 'GoodSlot4': '5000', 'GoodSlot8': '206', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6090', 'Level': '56', 'Vitality': '22', 'Attunement': '22', 'Endurance': '17', 'Strength': '12', 'Dexterity': '8', 'Intelligence': '8', 'Faith': '36', 'Luck': '10', 'Humanity': '3', 'Resistance': '14', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot4Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '13', 'Gender': '1', 'Covenant': '3'} +- {'ID': '8670', 'Name': 'テストプレイヤー_戦士(深淵クリア)', 'RightHandWeapon1': '201014', 'RightHandWeapon2': '1000014', 'LeftHandWeapon1': '1450014', 'LeftHandWeapon2': '1200014', 'HeadArmor': '210008', 'BodyArmor': '211008', 'HandsArmor': '212008', 'LegsArmor': '213008', 'ArrowSlot1': '2001000', 'ArrowSlot2': '2000000', 'GoodSlot8': '206', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6000', 'ArrowSlot1Count': '50', 'ArrowSlot2Count': '90', 'Level': '63', 'Vitality': '24', 'Attunement': '9', 'Endurance': '24', 'Strength': '25', 'Dexterity': '25', 'Intelligence': '9', 'Faith': '9', 'Luck': '10', 'Humanity': '3', 'Resistance': '23', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '8671', 'Name': 'テストプレイヤー_騎士(深淵クリア)', 'RightHandWeapon1': '202014', 'RightHandWeapon2': '300014', 'LeftHandWeapon1': '1452014', 'HeadArmor': '390008', 'BodyArmor': '391008', 'HandsArmor': '392008', 'LegsArmor': '393008', 'GoodSlot8': '206', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6020', 'Level': '63', 'Vitality': '34', 'Attunement': '10', 'Endurance': '23', 'Strength': '28', 'Dexterity': '11', 'Intelligence': '9', 'Faith': '11', 'Luck': '10', 'Humanity': '3', 'Resistance': '22', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '13', 'Gender': '1', 'Covenant': '1'} +- {'ID': '8672', 'Name': 'テストプレイヤー_魔術師(深淵クリア)', 'RightHandWeapon1': '1300000', 'RightHandWeapon2': '100013', 'LeftHandWeapon1': '1403013', 'HeadArmor': '220008', 'BodyArmor': '221008', 'HandsArmor': '222008', 'LegsArmor': '223008', 'SpellSlot1': '3060', 'SpellSlot2': '3030', 'SpellSlot3': '3010', 'SpellSlot4': '3000', 'GoodSlot1': '3060', 'GoodSlot2': '3030', 'GoodSlot3': '3010', 'GoodSlot4': '3000', 'GoodSlot8': '206', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6410', 'Level': '63', 'Vitality': '21', 'Attunement': '27', 'Endurance': '15', 'Strength': '9', 'Dexterity': '11', 'Intelligence': '40', 'Faith': '8', 'Luck': '10', 'Humanity': '3', 'Resistance': '13', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot4Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8'} +- {'ID': '8673', 'Name': 'テストプレイヤー_呪術師(深淵クリア)', 'RightHandWeapon1': '1331300', 'RightHandWeapon2': '700013', 'LeftHandWeapon1': '1406013', 'HeadArmor': '230008', 'BodyArmor': '231008', 'HandsArmor': '232008', 'LegsArmor': '233008', 'SpellSlot1': '4030', 'SpellSlot2': '4020', 'SpellSlot3': '4010', 'SpellSlot4': '4000', 'GoodSlot1': '4030', 'GoodSlot2': '4020', 'GoodSlot3': '4010', 'GoodSlot4': '4000', 'GoodSlot8': '206', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6130', 'Level': '63', 'Vitality': '23', 'Attunement': '24', 'Endurance': '17', 'Strength': '20', 'Dexterity': '9', 'Intelligence': '27', 'Faith': '8', 'Luck': '10', 'Humanity': '3', 'Resistance': '18', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot4Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '8674', 'Name': 'テストプレイヤー_僧侶(深淵クリア)', 'RightHandWeapon1': '1361000', 'RightHandWeapon2': '801013', 'LeftHandWeapon1': '1400013', 'HeadArmor': '900008', 'BodyArmor': '311008', 'HandsArmor': '312008', 'LegsArmor': '313008', 'SpellSlot1': '5010', 'SpellSlot2': '5520', 'SpellSlot3': '5020', 'SpellSlot4': '5000', 'GoodSlot1': '5010', 'GoodSlot2': '5520', 'GoodSlot3': '5020', 'GoodSlot4': '5000', 'GoodSlot8': '206', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6090', 'Level': '63', 'Vitality': '24', 'Attunement': '23', 'Endurance': '17', 'Strength': '12', 'Dexterity': '8', 'Intelligence': '8', 'Faith': '39', 'Luck': '10', 'Humanity': '3', 'Resistance': '15', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot4Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '13', 'Gender': '1', 'Covenant': '3'} +- {'ID': '8680', 'Name': 'テストプレイヤー_戦士(結晶塔クリア)', 'RightHandWeapon1': '201015', 'RightHandWeapon2': '1000015', 'LeftHandWeapon1': '1450015', 'LeftHandWeapon2': '1200015', 'HeadArmor': '210010', 'BodyArmor': '211010', 'HandsArmor': '212010', 'LegsArmor': '213010', 'ArrowSlot1': '2001000', 'ArrowSlot2': '2000000', 'GoodSlot8': '209', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6000', 'ArrowSlot1Count': '70', 'ArrowSlot2Count': '99', 'Level': '71', 'Vitality': '25', 'Attunement': '9', 'Endurance': '25', 'Strength': '27', 'Dexterity': '27', 'Intelligence': '9', 'Faith': '9', 'Luck': '10', 'Humanity': '3', 'Resistance': '25', 'GoodSlot8Count': '10', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '8681', 'Name': 'テストプレイヤー_騎士(結晶塔クリア)', 'RightHandWeapon1': '202015', 'RightHandWeapon2': '300015', 'LeftHandWeapon1': '1452015', 'HeadArmor': '390010', 'BodyArmor': '391010', 'HandsArmor': '392010', 'LegsArmor': '393010', 'GoodSlot8': '209', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6020', 'Level': '71', 'Vitality': '36', 'Attunement': '10', 'Endurance': '24', 'Strength': '31', 'Dexterity': '11', 'Intelligence': '9', 'Faith': '11', 'Luck': '10', 'Humanity': '3', 'Resistance': '24', 'GoodSlot8Count': '10', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '13', 'Gender': '1', 'Covenant': '1'} +- {'ID': '8682', 'Name': 'テストプレイヤー_魔術師(結晶塔クリア)', 'RightHandWeapon1': '1300000', 'RightHandWeapon2': '100015', 'LeftHandWeapon1': '1403015', 'HeadArmor': '220010', 'BodyArmor': '221010', 'HandsArmor': '222010', 'LegsArmor': '223010', 'SpellSlot1': '3070', 'SpellSlot2': '3060', 'SpellSlot3': '3030', 'SpellSlot4': '3010', 'SpellSlot5': '3000', 'GoodSlot1': '3070', 'GoodSlot2': '3060', 'GoodSlot3': '3030', 'GoodSlot4': '3010', 'GoodSlot5': '3000', 'GoodSlot8': '209', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6410', 'Level': '71', 'Vitality': '22', 'Attunement': '29', 'Endurance': '16', 'Strength': '9', 'Dexterity': '11', 'Intelligence': '43', 'Faith': '8', 'Luck': '10', 'Humanity': '3', 'Resistance': '14', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot4Count': '1', 'GoodSlot5Count': '1', 'GoodSlot8Count': '10', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8'} +- {'ID': '8683', 'Name': 'テストプレイヤー_呪術師(結晶塔クリア)', 'RightHandWeapon1': '1331500', 'RightHandWeapon2': '700015', 'LeftHandWeapon1': '1406015', 'HeadArmor': '230010', 'BodyArmor': '231010', 'HandsArmor': '232010', 'LegsArmor': '233010', 'SpellSlot1': '4030', 'SpellSlot2': '4020', 'SpellSlot3': '4010', 'SpellSlot4': '4000', 'GoodSlot1': '4030', 'GoodSlot2': '4020', 'GoodSlot3': '4010', 'GoodSlot4': '4000', 'GoodSlot8': '209', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6130', 'Level': '71', 'Vitality': '24', 'Attunement': '26', 'Endurance': '18', 'Strength': '21', 'Dexterity': '9', 'Intelligence': '29', 'Faith': '8', 'Luck': '10', 'Humanity': '3', 'Resistance': '19', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot4Count': '1', 'GoodSlot8Count': '10', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '8684', 'Name': 'テストプレイヤー_僧侶(結晶塔クリア)', 'RightHandWeapon1': '1361000', 'RightHandWeapon2': '801015', 'LeftHandWeapon1': '1400015', 'HeadArmor': '900010', 'BodyArmor': '311010', 'HandsArmor': '312010', 'LegsArmor': '313010', 'SpellSlot1': '5010', 'SpellSlot2': '5520', 'SpellSlot3': '5020', 'SpellSlot4': '5000', 'GoodSlot1': '5010', 'GoodSlot2': '5520', 'GoodSlot3': '5020', 'GoodSlot4': '5000', 'GoodSlot8': '209', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6090', 'Level': '71', 'Vitality': '25', 'Attunement': '25', 'Endurance': '18', 'Strength': '12', 'Dexterity': '8', 'Intelligence': '8', 'Faith': '42', 'Luck': '10', 'Humanity': '3', 'Resistance': '16', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot4Count': '1', 'GoodSlot8Count': '10', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '13', 'Gender': '1', 'Covenant': '3'} +- {'ID': '8690', 'Name': 'テストプレイヤー_戦士(廃都クリア)', 'RightHandWeapon1': '201015', 'RightHandWeapon2': '1000015', 'LeftHandWeapon1': '1450015', 'LeftHandWeapon2': '1200015', 'HeadArmor': '210010', 'BodyArmor': '211010', 'HandsArmor': '212010', 'LegsArmor': '213010', 'ArrowSlot1': '2001000', 'ArrowSlot2': '2000000', 'GoodSlot8': '211', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6000', 'ArrowSlot1Count': '90', 'ArrowSlot2Count': '99', 'Level': '79', 'Vitality': '27', 'Attunement': '9', 'Endurance': '27', 'Strength': '29', 'Dexterity': '28', 'Intelligence': '9', 'Faith': '9', 'Luck': '10', 'Humanity': '3', 'Resistance': '26', 'GoodSlot8Count': '10', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '8691', 'Name': 'テストプレイヤー_騎士(廃都クリア)', 'RightHandWeapon1': '202015', 'RightHandWeapon2': '300015', 'LeftHandWeapon1': '1452015', 'HeadArmor': '390010', 'BodyArmor': '391010', 'HandsArmor': '392010', 'LegsArmor': '393010', 'GoodSlot8': '211', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6020', 'Level': '79', 'Vitality': '38', 'Attunement': '10', 'Endurance': '26', 'Strength': '34', 'Dexterity': '11', 'Intelligence': '9', 'Faith': '11', 'Luck': '10', 'Humanity': '3', 'Resistance': '25', 'GoodSlot8Count': '10', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '13', 'Gender': '1', 'Covenant': '1'} +- {'ID': '8692', 'Name': 'テストプレイヤー_魔術師(廃都クリア)', 'RightHandWeapon1': '1300000', 'RightHandWeapon2': '100015', 'LeftHandWeapon1': '1403015', 'HeadArmor': '220010', 'BodyArmor': '221010', 'HandsArmor': '222010', 'LegsArmor': '223010', 'SpellSlot1': '3070', 'SpellSlot2': '3060', 'SpellSlot3': '3030', 'SpellSlot4': '3010', 'SpellSlot5': '3000', 'GoodSlot1': '3070', 'GoodSlot2': '3060', 'GoodSlot3': '3030', 'GoodSlot4': '3010', 'GoodSlot5': '3000', 'GoodSlot8': '211', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6410', 'Level': '79', 'Vitality': '24', 'Attunement': '30', 'Endurance': '17', 'Strength': '9', 'Dexterity': '11', 'Intelligence': '46', 'Faith': '8', 'Luck': '10', 'Humanity': '3', 'Resistance': '15', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot4Count': '1', 'GoodSlot5Count': '1', 'GoodSlot8Count': '10', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8'} +- {'ID': '8693', 'Name': 'テストプレイヤー_呪術師(廃都クリア)', 'RightHandWeapon1': '1331500', 'RightHandWeapon2': '700015', 'LeftHandWeapon1': '1406015', 'HeadArmor': '230010', 'BodyArmor': '231010', 'HandsArmor': '232010', 'LegsArmor': '233010', 'SpellSlot1': '4030', 'SpellSlot2': '4020', 'SpellSlot3': '4010', 'SpellSlot4': '4000', 'GoodSlot1': '4030', 'GoodSlot2': '4020', 'GoodSlot3': '4010', 'GoodSlot4': '4000', 'GoodSlot8': '211', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6130', 'Level': '79', 'Vitality': '26', 'Attunement': '27', 'Endurance': '19', 'Strength': '22', 'Dexterity': '9', 'Intelligence': '31', 'Faith': '8', 'Luck': '10', 'Humanity': '3', 'Resistance': '20', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot4Count': '1', 'GoodSlot8Count': '10', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '8694', 'Name': 'テストプレイヤー_僧侶(廃都クリア)', 'RightHandWeapon1': '1361000', 'RightHandWeapon2': '801015', 'LeftHandWeapon1': '1400015', 'HeadArmor': '900010', 'BodyArmor': '311010', 'HandsArmor': '312010', 'LegsArmor': '313010', 'SpellSlot1': '5010', 'SpellSlot2': '5520', 'SpellSlot3': '5020', 'SpellSlot4': '5000', 'GoodSlot1': '5010', 'GoodSlot2': '5520', 'GoodSlot3': '5020', 'GoodSlot4': '5000', 'GoodSlot8': '211', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6090', 'Level': '79', 'Vitality': '27', 'Attunement': '26', 'Endurance': '19', 'Strength': '12', 'Dexterity': '8', 'Intelligence': '8', 'Faith': '45', 'Luck': '10', 'Humanity': '3', 'Resistance': '17', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot4Count': '1', 'GoodSlot8Count': '10', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '13', 'Gender': '1', 'Covenant': '3'} +- {'ID': '9000', 'Name': 'デバッグプレイヤー(メモリ検証)', 'SoulCount': '50000', 'RightHandWeapon1': '306000', 'RightHandWeapon2': '354000', 'LeftHandWeapon1': '1455000', 'LeftHandWeapon2': '852000', 'HeadArmor': '100000', 'BodyArmor': '111000', 'HandsArmor': '292000', 'LegsArmor': '103000', 'ArrowSlot1': '2000000', 'BoltSlot1': '2100000', 'RingSlot1': '100', 'RingSlot2': '138', 'SpellSlot1': '3550', 'SpellSlot2': '5500', 'SpellSlot3': '4300', 'SpellSlot4': '3100', 'SpellSlot5': '5400', 'SpellSlot6': '5300', 'GoodSlot1': '240', 'GoodSlot2': '200', 'GoodSlot3': '1000', 'GoodSlot6': '106', 'GoodSlot7': '100', 'GoodSlot8': '101', 'GoodSlot9': '102', 'FaceID': '-1', 'ArrowSlot1Count': '50', 'BoltSlot1Count': '50', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '50', 'GoodSlot2Count': '1', 'GoodSlot3Count': '99', 'GoodSlot6Count': '1', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '7', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '9001', 'Name': 'デバッグプレイヤー(汎用男)', 'SoulCount': '50000', 'RightHandWeapon1': '201015', 'RightHandWeapon2': '1201015', 'LeftHandWeapon1': '1450015', 'LeftHandWeapon2': '1300000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '213010', 'ArrowSlot1': '2000000', 'ArrowSlot2': '2003000', 'RingSlot1': '100', 'SpellSlot1': '3550', 'SpellSlot2': '5500', 'SpellSlot3': '4300', 'SpellSlot4': '3500', 'SpellSlot5': '5400', 'SpellSlot6': '5300', 'GoodSlot1': '240', 'GoodSlot2': '200', 'GoodSlot3': '1000', 'GoodSlot4': '280', 'GoodSlot7': '100', 'GoodSlot8': '101', 'GoodSlot9': '102', 'FaceID': '-1', 'ArrowSlot1Count': '99', 'ArrowSlot2Count': '99', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '99', 'GoodSlot2Count': '1', 'GoodSlot3Count': '99', 'GoodSlot4Count': '99', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '7', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '9002', 'Name': 'デバッグプレイヤー(汎用女)', 'SoulCount': '50000', 'RightHandWeapon1': '201000', 'RightHandWeapon2': '200000', 'LeftHandWeapon1': '1450000', 'LeftHandWeapon2': '1300000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '213000', 'RingSlot1': '100', 'SpellSlot1': '3550', 'SpellSlot2': '5500', 'SpellSlot3': '4300', 'SpellSlot4': '3500', 'SpellSlot5': '5400', 'SpellSlot6': '5300', 'GoodSlot1': '240', 'GoodSlot2': '200', 'GoodSlot3': '1000', 'GoodSlot7': '100', 'GoodSlot8': '101', 'GoodSlot9': '102', 'FaceID': '8', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '50', 'GoodSlot2Count': '1', 'GoodSlot3Count': '99', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2'} +- {'ID': '9005', 'Name': 'デバッグプレイヤー(ランタン持ち)', 'SoulCount': '50000', 'RightHandWeapon1': '1330000', 'LeftHandWeapon1': '1330000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '213000', 'GoodSlot1': '240', 'GoodSlot2': '200', 'GoodSlot3': '310', 'GoodSlot4': '350', 'GoodSlot7': '100', 'GoodSlot8': '101', 'GoodSlot9': '102', 'FaceID': '4', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '1', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '50', 'GoodSlot2Count': '1', 'GoodSlot3Count': '50', 'GoodSlot4Count': '50', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '9006', 'Name': 'デバッグプレイヤー(ネットワークチェック用)', 'SoulCount': '50000', 'RightHandWeapon1': '201000', 'RightHandWeapon2': '1201000', 'LeftHandWeapon1': '1450000', 'LeftHandWeapon2': '1250000', 'HeadArmor': '170000', 'BodyArmor': '171000', 'HandsArmor': '172000', 'LegsArmor': '173000', 'ArrowSlot1': '2000000', 'BoltSlot1': '2100000', 'ArrowSlot2': '2003000', 'BoltSlot2': '2101000', 'RingSlot1': '114', 'GoodSlot1': '240', 'GoodSlot2': '200', 'GoodSlot3': '310', 'GoodSlot4': '350', 'GoodSlot7': '100', 'GoodSlot8': '101', 'GoodSlot9': '102', 'FaceID': '3104', 'ArrowSlot1Count': '30', 'BoltSlot1Count': '30', 'ArrowSlot2Count': '10', 'BoltSlot2Count': '10', 'Vitality': '50', 'Attunement': '50', 'Endurance': '50', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '50', 'GoodSlot2Count': '1', 'GoodSlot3Count': '50', 'GoodSlot4Count': '50', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '9007', 'Name': 'デバッグプレイヤー(AITestPG)', 'SoulCount': '50000', 'RightHandWeapon1': '201000', 'RightHandWeapon2': '1150000', 'LeftHandWeapon1': '1450000', 'LeftHandWeapon2': '1300000', 'HeadArmor': '170000', 'BodyArmor': '171000', 'HandsArmor': '172000', 'LegsArmor': '173000', 'RingSlot1': '114', 'GoodSlot1': '240', 'GoodSlot2': '200', 'GoodSlot3': '310', 'GoodSlot4': '350', 'GoodSlot7': '100', 'GoodSlot8': '101', 'GoodSlot9': '102', 'FaceID': '-1', 'Vitality': '50', 'Attunement': '50', 'Endurance': '50', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '50', 'GoodSlot2Count': '1', 'GoodSlot3Count': '50', 'GoodSlot4Count': '50', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '9008', 'Name': 'デバッグプレイヤー(弓装備)', 'SoulCount': '50000', 'RightHandWeapon1': '1200000', 'RightHandWeapon2': '201000', 'LeftHandWeapon1': '1404000', 'LeftHandWeapon2': '1300000', 'HeadArmor': '220000', 'BodyArmor': '221000', 'HandsArmor': '222000', 'LegsArmor': '223000', 'ArrowSlot1': '2000000', 'BoltSlot1': '2100000', 'RingSlot1': '100', 'SpellSlot1': '3550', 'SpellSlot2': '5500', 'SpellSlot3': '4300', 'SpellSlot4': '3100', 'SpellSlot5': '5400', 'SpellSlot6': '5300', 'GoodSlot1': '240', 'GoodSlot2': '200', 'GoodSlot3': '310', 'GoodSlot4': '350', 'GoodSlot7': '100', 'GoodSlot8': '101', 'GoodSlot9': '102', 'FaceID': '-1', 'ArrowSlot1Count': '99', 'BoltSlot1Count': '99', 'Vitality': '50', 'Attunement': '50', 'Endurance': '50', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '50', 'GoodSlot2Count': '1', 'GoodSlot3Count': '50', 'GoodSlot4Count': '50', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '9010', 'Name': '規準キャラ(平井)', 'RightHandWeapon1': '201000', 'RightHandWeapon2': '1200000', 'LeftHandWeapon1': '1450000', 'LeftHandWeapon2': '1300000', 'HeadArmor': '210000', 'BodyArmor': '211000', 'HandsArmor': '212000', 'LegsArmor': '213000', 'ArrowSlot1': '2000000', 'SpellSlot1': '3000', 'GoodSlot1': '240', 'GoodSlot2': '200', 'GoodSlot3': '310', 'GoodSlot4': '100', 'GoodSlot9': '101', 'FaceID': '-1', 'ArrowSlot1Count': '99', 'Vitality': '10', 'Attunement': '10', 'Endurance': '10', 'Strength': '10', 'Dexterity': '10', 'Intelligence': '10', 'Faith': '10', 'Luck': '10', 'Humanity': '3', 'Resistance': '10', 'GoodSlot1Count': '50', 'GoodSlot2Count': '1', 'GoodSlot3Count': '50', 'GoodSlot4Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '9011', 'Name': 'TEST ハシゴテスト用', 'SoulCount': '50000', 'RightHandWeapon1': '802000', 'LeftHandWeapon1': '1501000', 'LeftHandWeapon2': '1300000', 'HeadArmor': '240000', 'BodyArmor': '241000', 'HandsArmor': '242000', 'LegsArmor': '243000', 'FaceID': '-1', 'DefaultAI': '502', 'Vitality': '14', 'Attunement': '8', 'Endurance': '13', 'Strength': '14', 'Dexterity': '11', 'Intelligence': '8', 'Faith': '8', 'Luck': '10', 'Humanity': '5', 'Resistance': '10', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '9012', 'Name': 'ダメージテスト用', 'SoulCount': '50000', 'RightHandWeapon1': '300000', 'RightHandWeapon2': '100000', 'LeftHandWeapon1': '850000', 'LeftHandWeapon2': '1200000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '213000', 'ArrowSlot1': '2000000', 'GoodSlot1': '240', 'GoodSlot3': '310', 'GoodSlot4': '311', 'GoodSlot5': '312', 'GoodSlot7': '100', 'GoodSlot8': '101', 'GoodSlot9': '102', 'FaceID': '-1', 'ArrowSlot1Count': '99', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '50', 'GoodSlot3Count': '50', 'GoodSlot4Count': '50', 'GoodSlot5Count': '50', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '9013', 'Name': '敵化参考(アサシン)', 'SoulCount': '50000', 'RightHandWeapon1': '405000', 'LeftHandWeapon1': '405000', 'LeftHandWeapon2': '1404000', 'HeadArmor': '250000', 'BodyArmor': '251000', 'HandsArmor': '252000', 'LegsArmor': '253000', 'GoodSlot1': '240', 'GoodSlot3': '310', 'GoodSlot4': '350', 'GoodSlot5': '200', 'GoodSlot7': '100', 'GoodSlot8': '101', 'GoodSlot9': '102', 'FaceID': '-1', 'Vitality': '50', 'Attunement': '50', 'Endurance': '50', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '50', 'GoodSlot3Count': '50', 'GoodSlot4Count': '50', 'GoodSlot5Count': '1', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '9014', 'Name': 'デバッグプレイヤー(対霊検証用)', 'SoulCount': '50000', 'RightHandWeapon1': '201000', 'RightHandWeapon2': '201400', 'LeftHandWeapon1': '1450000', 'LeftHandWeapon2': '1450400', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '213000', 'RingSlot1': '100', 'SpellSlot1': '3550', 'SpellSlot2': '5500', 'SpellSlot3': '4300', 'SpellSlot4': '3500', 'SpellSlot5': '5400', 'SpellSlot6': '5300', 'GoodSlot1': '240', 'GoodSlot3': '1000', 'GoodSlot5': '200', 'GoodSlot7': '100', 'GoodSlot8': '101', 'GoodSlot9': '312', 'FaceID': '-1', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '50', 'GoodSlot3Count': '99', 'GoodSlot5Count': '1', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '99', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '9015', 'Name': 'デバッグプレイヤー(石崎カスタム)', 'RightHandWeapon1': '201000', 'RightHandWeapon2': '1200000', 'LeftHandWeapon1': '1456000', 'LeftHandWeapon2': '1330000', 'HeadArmor': '350000', 'BodyArmor': '351000', 'HandsArmor': '352000', 'LegsArmor': '353000', 'ArrowSlot1': '2000000', 'ArrowSlot2': '2003000', 'RingSlot1': '100', 'SpellSlot1': '4000', 'SpellSlot2': '4100', 'GoodSlot1': '100', 'GoodSlot2': '101', 'GoodSlot3': '102', 'GoodSlot4': '103', 'FaceID': '-1', 'ArrowSlot1Count': '99', 'ArrowSlot2Count': '99', 'Vitality': '14', 'Attunement': '28', 'Endurance': '99', 'Strength': '12', 'Dexterity': '11', 'Intelligence': '21', 'Faith': '25', 'Luck': '11', 'Humanity': '3', 'Resistance': '15', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot4Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '9016', 'Name': 'デバッグプレイヤー(毒状態+炎武器持ち)', 'SoulCount': '50000', 'RightHandWeapon1': '201000', 'RightHandWeapon2': '201700', 'LeftHandWeapon1': '1450000', 'LeftHandWeapon2': '1300000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '213000', 'RingSlot1': '100', 'SpellSlot1': '3550', 'SpellSlot2': '5500', 'SpellSlot3': '4300', 'SpellSlot4': '3500', 'SpellSlot5': '5400', 'SpellSlot6': '5300', 'GoodSlot1': '240', 'GoodSlot2': '314', 'GoodSlot3': '1000', 'GoodSlot7': '100', 'GoodSlot8': '101', 'GoodSlot9': '102', 'FaceID': '-1', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '50', 'GoodSlot2Count': '50', 'GoodSlot3Count': '99', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '7', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '9017', 'Name': 'デバッグプレイヤー(軽装)', 'SoulCount': '500000', 'RightHandWeapon1': '200015', 'RightHandWeapon2': '1300000', 'LeftHandWeapon1': '1404000', 'LeftHandWeapon2': '1200000', 'HeadArmor': '220000', 'BodyArmor': '221000', 'HandsArmor': '222000', 'LegsArmor': '223000', 'ArrowSlot1': '2001000', 'ArrowSlot2': '2000000', 'RingSlot1': '100', 'RingSlot2': '114', 'SpellSlot1': '3030', 'SpellSlot2': '3010', 'SpellSlot3': '3050', 'SpellSlot4': '3070', 'SpellSlot5': '3110', 'SpellSlot6': '3310', 'SpellSlot7': '3610', 'GoodSlot1': '100', 'GoodSlot2': '101', 'GoodSlot3': '102', 'GoodSlot4': '103', 'GoodSlot5': '106', 'GoodSlot6': '109', 'GoodSlot7': '215', 'GoodSlot8': '240', 'GoodSlot9': '350', 'FaceID': '2000', 'ArrowSlot1Count': '999', 'ArrowSlot2Count': '999', 'Level': '1', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot3Count': '1', 'GoodSlot4Count': '1', 'GoodSlot5Count': '1', 'GoodSlot6Count': '1', 'GoodSlot7Count': '10', 'GoodSlot8Count': '99', 'GoodSlot9Count': '99', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2'} +- {'ID': '9018', 'Name': 'デバッグプレイヤー(竜変身)', 'SoulCount': '50000', 'RightHandWeapon1': '201000', 'LeftHandWeapon1': '1450000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '213000', 'RingSlot1': '100', 'SpellSlot1': '3550', 'SpellSlot2': '5500', 'SpellSlot3': '4300', 'SpellSlot4': '3500', 'SpellSlot5': '5400', 'SpellSlot6': '5300', 'GoodSlot1': '377', 'GoodSlot2': '378', 'GoodSlot3': '330', 'GoodSlot4': '280', 'GoodSlot7': '100', 'GoodSlot8': '101', 'GoodSlot9': '102', 'FaceID': '-1', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '1', 'GoodSlot2Count': '1', 'GoodSlot3Count': '99', 'GoodSlot4Count': '99', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '7', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '9019', 'Name': 'Debug_With_Spells', 'SoulCount': '50000', 'RightHandWeapon1': '1300000', 'RightHandWeapon2': '354000', 'LeftHandWeapon1': '1360000', 'LeftHandWeapon2': '1330000', 'HeadArmor': '100000', 'BodyArmor': '111000', 'HandsArmor': '292000', 'LegsArmor': '103000', 'ArrowSlot1': '2000000', 'BoltSlot1': '2100000', 'RingSlot1': '100', 'RingSlot2': '138', 'SpellSlot1': '5500', 'SpellSlot2': '4100', 'SpellSlot3': '4060', 'SpellSlot4': '3000', 'SpellSlot5': '5000', 'SpellSlot6': '5300', 'GoodSlot1': '240', 'GoodSlot2': '200', 'GoodSlot3': '1000', 'GoodSlot6': '106', 'GoodSlot7': '100', 'GoodSlot8': '101', 'GoodSlot9': '102', 'FaceID': '-1', 'ArrowSlot1Count': '50', 'BoltSlot1Count': '50', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '50', 'GoodSlot2Count': '1', 'GoodSlot3Count': '99', 'GoodSlot6Count': '1', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '7', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '9100', 'Name': 'デバッグプレイヤー(魔術:EN弾A〜C2)', 'SoulCount': '50000', 'RightHandWeapon1': '1300000', 'RightHandWeapon2': '201000', 'LeftHandWeapon1': '1300000', 'LeftHandWeapon2': '1450000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '213000', 'RingSlot1': '114', 'RingSlot2': '2', 'SpellSlot1': '3000', 'SpellSlot2': '3010', 'SpellSlot3': '3020', 'SpellSlot4': '3030', 'SpellSlot5': '3040', 'SpellSlot6': '3050', 'GoodSlot1': '240', 'GoodSlot3': '1000', 'GoodSlot4': '106', 'GoodSlot5': '103', 'GoodSlot7': '100', 'GoodSlot8': '101', 'GoodSlot9': '102', 'FaceID': '2', 'Vitality': '50', 'Attunement': '99', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '50', 'GoodSlot3Count': '99', 'GoodSlot4Count': '1', 'GoodSlot5Count': '1', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '9101', 'Name': 'デバッグプレイヤー(魔術:EN弾D〜D2/武器強化1〜3/盾強化1〜2)', 'SoulCount': '50000', 'RightHandWeapon1': '1300000', 'RightHandWeapon2': '201000', 'LeftHandWeapon1': '1300000', 'LeftHandWeapon2': '1450000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '213000', 'RingSlot1': '114', 'RingSlot2': '2', 'SpellSlot1': '3060', 'SpellSlot2': '3070', 'SpellSlot3': '3100', 'SpellSlot4': '3110', 'SpellSlot5': '3120', 'SpellSlot6': '3300', 'SpellSlot7': '3310', 'GoodSlot1': '240', 'GoodSlot3': '1000', 'GoodSlot4': '106', 'GoodSlot5': '103', 'GoodSlot7': '100', 'GoodSlot8': '101', 'GoodSlot9': '102', 'FaceID': '2', 'Vitality': '50', 'Attunement': '99', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '50', 'GoodSlot3Count': '99', 'GoodSlot4Count': '1', 'GoodSlot5Count': '1', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '9102', 'Name': 'デバッグプレイヤー(魔術:インビジブルW/B/ライト/サイレンス/サウンド/修復)', 'SoulCount': '50000', 'RightHandWeapon1': '1300000', 'RightHandWeapon2': '201000', 'LeftHandWeapon1': '1300000', 'LeftHandWeapon2': '1450000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '213000', 'RingSlot1': '114', 'RingSlot2': '2', 'SpellSlot1': '3400', 'SpellSlot2': '3410', 'SpellSlot3': '3500', 'SpellSlot4': '3510', 'SpellSlot5': '3520', 'SpellSlot6': '3530', 'GoodSlot1': '240', 'GoodSlot3': '1000', 'GoodSlot4': '106', 'GoodSlot5': '103', 'GoodSlot7': '100', 'GoodSlot8': '101', 'GoodSlot9': '102', 'FaceID': '2', 'Vitality': '50', 'Attunement': '99', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '50', 'GoodSlot3Count': '99', 'GoodSlot4Count': '1', 'GoodSlot5Count': '1', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '9103', 'Name': 'デバッグプレイヤー(魔術:Fコントロール/擬態/解呪/治療/結晶ビーム)', 'SoulCount': '50000', 'RightHandWeapon1': '1300000', 'RightHandWeapon2': '201000', 'LeftHandWeapon1': '1300000', 'LeftHandWeapon2': '1450000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '213000', 'RingSlot1': '114', 'RingSlot2': '2', 'SpellSlot1': '3540', 'SpellSlot2': '3550', 'SpellSlot3': '3600', 'SpellSlot4': '3610', 'SpellSlot5': '3700', 'GoodSlot1': '240', 'GoodSlot3': '1000', 'GoodSlot4': '106', 'GoodSlot5': '103', 'GoodSlot7': '100', 'GoodSlot8': '101', 'GoodSlot9': '102', 'FaceID': '2', 'Vitality': '50', 'Attunement': '99', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '50', 'GoodSlot3Count': '99', 'GoodSlot4Count': '1', 'GoodSlot5Count': '1', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '9104', 'Name': 'デバッグプレイヤー(呪術:Fボール1〜3/Fストーム1〜2/火炎放射/炎のムチ)', 'SoulCount': '50000', 'RightHandWeapon1': '1330000', 'RightHandWeapon2': '201000', 'LeftHandWeapon1': '1330000', 'LeftHandWeapon2': '1450000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '213000', 'RingSlot1': '114', 'RingSlot2': '2', 'SpellSlot1': '4000', 'SpellSlot2': '4010', 'SpellSlot3': '4020', 'SpellSlot4': '4030', 'SpellSlot5': '4040', 'SpellSlot6': '4050', 'SpellSlot7': '4060', 'GoodSlot1': '240', 'GoodSlot3': '1000', 'GoodSlot4': '106', 'GoodSlot5': '103', 'GoodSlot7': '100', 'GoodSlot8': '101', 'GoodSlot9': '102', 'FaceID': '2', 'Vitality': '50', 'Attunement': '99', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '50', 'GoodSlot3Count': '99', 'GoodSlot4Count': '1', 'GoodSlot5Count': '1', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '9105', 'Name': 'デバッグプレイヤー(呪術:近接炎1〜2/毒の霧/猛毒の霧/酸の霧)', 'SoulCount': '50000', 'RightHandWeapon1': '1330000', 'RightHandWeapon2': '201000', 'LeftHandWeapon1': '1330000', 'LeftHandWeapon2': '1450000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '213000', 'RingSlot1': '114', 'RingSlot2': '2', 'SpellSlot1': '4100', 'SpellSlot2': '4110', 'SpellSlot3': '4200', 'SpellSlot4': '4210', 'SpellSlot5': '4220', 'GoodSlot1': '240', 'GoodSlot3': '1000', 'GoodSlot4': '106', 'GoodSlot5': '103', 'GoodSlot7': '100', 'GoodSlot8': '101', 'GoodSlot9': '102', 'FaceID': '2', 'Vitality': '50', 'Attunement': '99', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '50', 'GoodSlot3Count': '99', 'GoodSlot4Count': '1', 'GoodSlot5Count': '1', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '9106', 'Name': 'デバッグプレイヤー(呪術:鉄の体/水のヴェール/銅の体/魅了/狂気の力)', 'SoulCount': '50000', 'RightHandWeapon1': '1330000', 'RightHandWeapon2': '201000', 'LeftHandWeapon1': '1330000', 'LeftHandWeapon2': '1450000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '213000', 'RingSlot1': '114', 'RingSlot2': '2', 'SpellSlot1': '4300', 'SpellSlot2': '4310', 'SpellSlot3': '4320', 'SpellSlot4': '4360', 'SpellSlot5': '4400', 'GoodSlot1': '240', 'GoodSlot3': '1000', 'GoodSlot4': '106', 'GoodSlot5': '103', 'GoodSlot7': '100', 'GoodSlot8': '101', 'GoodSlot9': '102', 'FaceID': '2', 'Vitality': '50', 'Attunement': '99', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '50', 'GoodSlot3Count': '99', 'GoodSlot4Count': '1', 'GoodSlot5Count': '1', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '9107', 'Name': 'デバッグプレイヤー(呪術:C_ファイアボール/C_ファイアストーム/C_炎のムチ)', 'SoulCount': '50000', 'RightHandWeapon1': '1330000', 'RightHandWeapon2': '201000', 'LeftHandWeapon1': '1330000', 'LeftHandWeapon2': '1450000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '213000', 'RingSlot1': '114', 'RingSlot2': '2', 'SpellSlot1': '4500', 'SpellSlot2': '4510', 'SpellSlot3': '4520', 'GoodSlot1': '240', 'GoodSlot3': '1000', 'GoodSlot4': '106', 'GoodSlot5': '103', 'GoodSlot7': '100', 'GoodSlot8': '101', 'GoodSlot9': '102', 'FaceID': '2', 'Vitality': '50', 'Attunement': '99', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '50', 'GoodSlot3Count': '99', 'GoodSlot4Count': '1', 'GoodSlot5Count': '1', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '9108', 'Name': 'デバッグプレイヤー(奇跡:回復1〜4/リジェネ/グレートリジェネ)', 'SoulCount': '50000', 'RightHandWeapon1': '1360000', 'RightHandWeapon2': '201000', 'LeftHandWeapon1': '1360000', 'LeftHandWeapon2': '1450000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '213000', 'RingSlot1': '114', 'RingSlot2': '2', 'SpellSlot1': '5000', 'SpellSlot2': '5010', 'SpellSlot3': '5020', 'SpellSlot4': '5030', 'SpellSlot5': '5040', 'SpellSlot6': '5050', 'GoodSlot1': '240', 'GoodSlot3': '1000', 'GoodSlot4': '106', 'GoodSlot5': '103', 'GoodSlot7': '100', 'GoodSlot8': '101', 'GoodSlot9': '102', 'FaceID': '2', 'Vitality': '50', 'Attunement': '99', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '50', 'GoodSlot3Count': '99', 'GoodSlot4Count': '1', 'GoodSlot5Count': '1', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '9109', 'Name': 'デバッグプレイヤー(奇跡:召喚1〜2/一度きりの復活/帰還/フォース1〜3)', 'SoulCount': '50000', 'RightHandWeapon1': '1360000', 'RightHandWeapon2': '201000', 'LeftHandWeapon1': '1360000', 'LeftHandWeapon2': '1450000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '213000', 'RingSlot1': '114', 'RingSlot2': '2', 'SpellSlot1': '5100', 'SpellSlot2': '5110', 'SpellSlot3': '5200', 'SpellSlot4': '5210', 'SpellSlot5': '5300', 'SpellSlot6': '5310', 'SpellSlot7': '5320', 'GoodSlot1': '240', 'GoodSlot3': '1000', 'GoodSlot4': '106', 'GoodSlot5': '103', 'GoodSlot7': '100', 'GoodSlot8': '101', 'GoodSlot9': '102', 'FaceID': '2', 'Vitality': '50', 'Attunement': '99', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '50', 'GoodSlot3Count': '99', 'GoodSlot4Count': '1', 'GoodSlot5Count': '1', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '9110', 'Name': 'デバッグプレイヤー(奇跡:ヒント/雷1〜3/魔法防護1〜2)', 'SoulCount': '50000', 'RightHandWeapon1': '1360000', 'RightHandWeapon2': '201000', 'LeftHandWeapon1': '1360000', 'LeftHandWeapon2': '1450000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '213000', 'RingSlot1': '114', 'RingSlot2': '2', 'SpellSlot1': '5400', 'SpellSlot2': '5500', 'SpellSlot3': '5510', 'SpellSlot4': '5520', 'SpellSlot5': '5600', 'SpellSlot6': '5610', 'GoodSlot1': '240', 'GoodSlot3': '1000', 'GoodSlot4': '106', 'GoodSlot5': '103', 'GoodSlot7': '100', 'GoodSlot8': '101', 'GoodSlot9': '102', 'FaceID': '2', 'Vitality': '50', 'Attunement': '99', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '50', 'GoodSlot3Count': '99', 'GoodSlot4Count': '1', 'GoodSlot5Count': '1', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '9111', 'Name': 'デバッグプレイヤー(奇跡:因果応報/因果応報_弾/グラビティ/反魔法/太陽の剣/月光の剣)', 'SoulCount': '50000', 'RightHandWeapon1': '1360000', 'RightHandWeapon2': '201000', 'LeftHandWeapon1': '1360000', 'LeftHandWeapon2': '1450000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '213000', 'RingSlot1': '114', 'RingSlot2': '2', 'SpellSlot1': '5700', 'SpellSlot2': '5800', 'SpellSlot3': '5810', 'SpellSlot4': '5900', 'SpellSlot5': '5910', 'GoodSlot1': '240', 'GoodSlot3': '1000', 'GoodSlot4': '106', 'GoodSlot5': '103', 'GoodSlot7': '100', 'GoodSlot8': '101', 'GoodSlot9': '102', 'FaceID': '2', 'Vitality': '50', 'Attunement': '99', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '50', 'GoodSlot3Count': '99', 'GoodSlot4Count': '1', 'GoodSlot5Count': '1', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '9112', 'Name': 'デバッグプレイヤー(【DLC】闇の玉/闇の飛沫/闇の霧/追う者たち/黒炎)', 'SoulCount': '50000', 'RightHandWeapon1': '1300000', 'RightHandWeapon2': '1330000', 'LeftHandWeapon1': '1300000', 'LeftHandWeapon2': '1330000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '213000', 'RingSlot1': '114', 'RingSlot2': '2', 'SpellSlot1': '3710', 'SpellSlot2': '3720', 'SpellSlot3': '3730', 'SpellSlot4': '3740', 'SpellSlot5': '4530', 'GoodSlot1': '240', 'GoodSlot3': '1000', 'GoodSlot4': '106', 'GoodSlot5': '103', 'GoodSlot7': '100', 'GoodSlot8': '101', 'GoodSlot9': '102', 'FaceID': '2', 'Vitality': '50', 'Attunement': '99', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '50', 'GoodSlot3Count': '99', 'GoodSlot4Count': '1', 'GoodSlot5Count': '1', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '9119', 'Name': 'Twenty_Dex', 'SoulCount': '50000', 'RightHandWeapon1': '1300000', 'RightHandWeapon2': '354000', 'LeftHandWeapon1': '1360000', 'LeftHandWeapon2': '1330000', 'HeadArmor': '100000', 'BodyArmor': '111000', 'HandsArmor': '292000', 'LegsArmor': '103000', 'ArrowSlot1': '2000000', 'BoltSlot1': '2100000', 'RingSlot1': '100', 'RingSlot2': '138', 'SpellSlot1': '5500', 'SpellSlot2': '4100', 'SpellSlot3': '4060', 'SpellSlot4': '3000', 'SpellSlot5': '5000', 'SpellSlot6': '5300', 'GoodSlot1': '240', 'GoodSlot2': '200', 'GoodSlot3': '1000', 'GoodSlot6': '106', 'GoodSlot7': '100', 'GoodSlot8': '101', 'GoodSlot9': '102', 'FaceID': '-1', 'ArrowSlot1Count': '50', 'BoltSlot1Count': '50', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '20', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '50', 'GoodSlot2Count': '1', 'GoodSlot3Count': '99', 'GoodSlot6Count': '1', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '7', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '9120', 'Name': 'デバッグプレイヤー(魔法武器:古竜の直剣/石の大剣)', 'SoulCount': '50000', 'RightHandWeapon1': '211000', 'RightHandWeapon2': '306000', 'LeftHandWeapon1': '1450000', 'LeftHandWeapon2': '1300000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '213000', 'RingSlot1': '114', 'RingSlot2': '2', 'GoodSlot1': '240', 'GoodSlot2': '280', 'GoodSlot3': '1000', 'GoodSlot4': '106', 'GoodSlot5': '103', 'GoodSlot7': '100', 'GoodSlot8': '101', 'GoodSlot9': '102', 'FaceID': '2', 'Vitality': '50', 'Attunement': '99', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '50', 'GoodSlot2Count': '99', 'GoodSlot3Count': '99', 'GoodSlot4Count': '1', 'GoodSlot5Count': '1', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '9121', 'Name': 'デバッグプレイヤー(魔法武器:ムーンライト/古竜の大剣)', 'SoulCount': '50000', 'RightHandWeapon1': '309000', 'RightHandWeapon2': '354000', 'LeftHandWeapon1': '1450000', 'LeftHandWeapon2': '1300000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '213000', 'RingSlot1': '114', 'RingSlot2': '2', 'GoodSlot1': '240', 'GoodSlot2': '280', 'GoodSlot3': '1000', 'GoodSlot4': '106', 'GoodSlot5': '103', 'GoodSlot7': '100', 'GoodSlot8': '101', 'GoodSlot9': '102', 'FaceID': '2', 'Vitality': '50', 'Attunement': '99', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '50', 'GoodSlot2Count': '99', 'GoodSlot3Count': '99', 'GoodSlot4Count': '1', 'GoodSlot5Count': '1', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '9122', 'Name': 'デバッグプレイヤー(魔法武器:アイアンアクス/竜王の大斧)', 'SoulCount': '50000', 'RightHandWeapon1': '704000', 'RightHandWeapon2': '752000', 'LeftHandWeapon1': '1450000', 'LeftHandWeapon2': '1300000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '213000', 'RingSlot1': '114', 'RingSlot2': '2', 'GoodSlot1': '240', 'GoodSlot2': '280', 'GoodSlot3': '1000', 'GoodSlot4': '106', 'GoodSlot5': '103', 'GoodSlot7': '100', 'GoodSlot8': '101', 'GoodSlot9': '102', 'FaceID': '2', 'Vitality': '50', 'Attunement': '99', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '50', 'GoodSlot2Count': '99', 'GoodSlot3Count': '99', 'GoodSlot4Count': '1', 'GoodSlot5Count': '1', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '9123', 'Name': 'デバッグプレイヤー(魔法武器:法の裁きの大槌/ダークハンド)', 'SoulCount': '50000', 'RightHandWeapon1': '851000', 'RightHandWeapon2': '904000', 'LeftHandWeapon1': '1450000', 'LeftHandWeapon2': '904000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '213000', 'RingSlot1': '114', 'RingSlot2': '2', 'GoodSlot1': '240', 'GoodSlot2': '280', 'GoodSlot3': '1000', 'GoodSlot4': '106', 'GoodSlot5': '103', 'GoodSlot7': '100', 'GoodSlot8': '101', 'GoodSlot9': '102', 'FaceID': '2', 'Vitality': '50', 'Attunement': '99', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '50', 'GoodSlot2Count': '99', 'GoodSlot3Count': '99', 'GoodSlot4Count': '1', 'GoodSlot5Count': '1', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '9124', 'Name': 'デバッグプレイヤー(魔法武器:六目の魔法槍/竜狩りの槍)', 'SoulCount': '50000', 'RightHandWeapon1': '1004000', 'RightHandWeapon2': '1051000', 'LeftHandWeapon1': '1450000', 'LeftHandWeapon2': '1450000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '213000', 'RingSlot1': '114', 'RingSlot2': '2', 'GoodSlot1': '240', 'GoodSlot2': '280', 'GoodSlot3': '1000', 'GoodSlot4': '106', 'GoodSlot5': '103', 'GoodSlot7': '100', 'GoodSlot8': '101', 'GoodSlot9': '102', 'FaceID': '2', 'Vitality': '50', 'Attunement': '99', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '50', 'GoodSlot2Count': '99', 'GoodSlot3Count': '99', 'GoodSlot4Count': '1', 'GoodSlot5Count': '1', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '9125', 'Name': 'デバッグプレイヤー(魔法武器:水晶輪の盾/岩の大盾)', 'SoulCount': '50000', 'RightHandWeapon1': '1411000', 'RightHandWeapon2': '1505000', 'LeftHandWeapon1': '1411000', 'LeftHandWeapon2': '1505000', 'HeadArmor': '900000', 'BodyArmor': '901000', 'HandsArmor': '902000', 'LegsArmor': '213000', 'RingSlot1': '114', 'RingSlot2': '2', 'GoodSlot1': '240', 'GoodSlot2': '280', 'GoodSlot3': '1000', 'GoodSlot4': '106', 'GoodSlot5': '103', 'GoodSlot7': '100', 'GoodSlot8': '101', 'GoodSlot9': '102', 'FaceID': '2', 'Vitality': '50', 'Attunement': '99', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '50', 'GoodSlot2Count': '99', 'GoodSlot3Count': '99', 'GoodSlot4Count': '1', 'GoodSlot5Count': '1', 'GoodSlot7Count': '1', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'Gesture1': '5', 'Gesture3': '4', 'Gesture4': '6', 'Gesture5': '3', 'Gesture6': '1', 'Gesture7': '2', 'Gender': '1'} +- {'ID': '9130', 'Name': '殴り値/殴られ値チェック_戦士(LV5\u3000城下1ハンマーまで)', 'RightHandWeapon1': '201000', 'RightHandWeapon2': '401000', 'LeftHandWeapon1': '602000', 'LeftHandWeapon2': '801000', 'HeadArmor': '210000', 'BodyArmor': '211000', 'HandsArmor': '212000', 'LegsArmor': '213000', 'GoodSlot8': '200', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6000', 'Level': '5', 'Vitality': '13', 'Attunement': '9', 'Endurance': '13', 'Strength': '13', 'Dexterity': '13', 'Intelligence': '9', 'Faith': '9', 'Luck': '10', 'Humanity': '3', 'Resistance': '11', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '9131', 'Name': '殴り値/殴られ値チェック_戦士(LV15\u3000城下2探索まで)', 'RightHandWeapon1': '201003', 'RightHandWeapon2': '401003', 'LeftHandWeapon1': '602003', 'LeftHandWeapon2': '801003', 'HeadArmor': '210002', 'BodyArmor': '211002', 'HandsArmor': '212002', 'LegsArmor': '213002', 'GoodSlot8': '200', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6000', 'Level': '15', 'Vitality': '14', 'Attunement': '9', 'Endurance': '14', 'Strength': '17', 'Dexterity': '16', 'Intelligence': '9', 'Faith': '9', 'Luck': '10', 'Humanity': '3', 'Resistance': '12', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '9132', 'Name': '殴り値/殴られ値チェック_戦士(LV25\u3000城下2貪食まで)', 'RightHandWeapon1': '201006', 'RightHandWeapon2': '401006', 'LeftHandWeapon1': '602006', 'LeftHandWeapon2': '801006', 'HeadArmor': '210004', 'BodyArmor': '211004', 'HandsArmor': '212004', 'LegsArmor': '213004', 'GoodSlot8': '200', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6000', 'Level': '25', 'Vitality': '15', 'Attunement': '9', 'Endurance': '15', 'Strength': '21', 'Dexterity': '19', 'Intelligence': '9', 'Faith': '9', 'Luck': '10', 'Humanity': '3', 'Resistance': '13', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '9133', 'Name': '殴り値/殴られ値チェック_戦士(LV35\u3000影町まで)', 'RightHandWeapon1': '201008', 'RightHandWeapon2': '401008', 'LeftHandWeapon1': '602008', 'LeftHandWeapon2': '801008', 'HeadArmor': '210006', 'BodyArmor': '211006', 'HandsArmor': '212006', 'LegsArmor': '213006', 'GoodSlot8': '200', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6000', 'Level': '35', 'Vitality': '16', 'Attunement': '9', 'Endurance': '16', 'Strength': '25', 'Dexterity': '22', 'Intelligence': '9', 'Faith': '9', 'Luck': '10', 'Humanity': '3', 'Resistance': '14', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '9134', 'Name': '殴り値/殴られ値チェック_戦士(LV45\u3000王城1まで)', 'RightHandWeapon1': '201010', 'RightHandWeapon2': '401010', 'LeftHandWeapon1': '602010', 'LeftHandWeapon2': '801010', 'HeadArmor': '210008', 'BodyArmor': '211008', 'HandsArmor': '212008', 'LegsArmor': '213008', 'GoodSlot8': '200', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6000', 'Level': '45', 'Vitality': '17', 'Attunement': '9', 'Endurance': '17', 'Strength': '29', 'Dexterity': '25', 'Intelligence': '9', 'Faith': '9', 'Luck': '10', 'Humanity': '3', 'Resistance': '15', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '9135', 'Name': '殴り値/殴られ値チェック_戦士(LV55\u3000森庭まで)', 'RightHandWeapon1': '201012', 'RightHandWeapon2': '401012', 'LeftHandWeapon1': '602012', 'LeftHandWeapon2': '801012', 'HeadArmor': '210010', 'BodyArmor': '211010', 'HandsArmor': '212010', 'LegsArmor': '213010', 'GoodSlot8': '200', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6000', 'Level': '55', 'Vitality': '18', 'Attunement': '9', 'Endurance': '17', 'Strength': '33', 'Dexterity': '29', 'Intelligence': '9', 'Faith': '9', 'Luck': '10', 'Humanity': '3', 'Resistance': '16', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '9136', 'Name': '殴り値/殴られ値チェック_戦士(LV65\u3000墓地2まで)', 'RightHandWeapon1': '201014', 'RightHandWeapon2': '401014', 'LeftHandWeapon1': '602014', 'LeftHandWeapon2': '801014', 'HeadArmor': '210010', 'BodyArmor': '211010', 'HandsArmor': '212010', 'LegsArmor': '213010', 'GoodSlot8': '200', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6000', 'Level': '65', 'Vitality': '18', 'Attunement': '9', 'Endurance': '18', 'Strength': '37', 'Dexterity': '33', 'Intelligence': '9', 'Faith': '9', 'Luck': '10', 'Humanity': '3', 'Resistance': '17', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '9137', 'Name': '殴り値/殴られ値チェック_戦士(LV75\u3000ラストまで)', 'RightHandWeapon1': '201015', 'RightHandWeapon2': '401015', 'LeftHandWeapon1': '602015', 'LeftHandWeapon2': '801015', 'HeadArmor': '210010', 'BodyArmor': '211010', 'HandsArmor': '212010', 'LegsArmor': '213010', 'GoodSlot8': '200', 'GoodSlot9': '103', 'GoodSlot10': '117', 'FaceID': '6000', 'Level': '75', 'Vitality': '19', 'Attunement': '9', 'Endurance': '19', 'Strength': '41', 'Dexterity': '37', 'Intelligence': '9', 'Faith': '9', 'Luck': '10', 'Humanity': '3', 'Resistance': '17', 'GoodSlot8Count': '1', 'GoodSlot9Count': '1', 'GoodSlot10Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1'} +- {'ID': '9140', 'Name': 'デバッグプレイヤー(ダメージアニメ確認)', 'SoulCount': '50000', 'RightHandWeapon1': '310000', 'RightHandWeapon2': '201000', 'LeftHandWeapon1': '100000', 'LeftHandWeapon2': '1201000', 'BodyArmor': '2171008', 'HandsArmor': '2172008', 'LegsArmor': '2173008', 'ArrowSlot1': '2000000', 'ArrowSlot2': '2003000', 'GoodSlot1': '377', 'GoodSlot2': '310', 'GoodSlot3': '201', 'GoodSlot4': '100', 'GoodSlot5': '101', 'GoodSlot6': '103', 'GoodSlot7': '117', 'FaceID': '6270', 'ArrowSlot1Count': '999', 'ArrowSlot2Count': '999', 'Vitality': '50', 'Attunement': '50', 'Endurance': '99', 'Strength': '50', 'Dexterity': '50', 'Intelligence': '50', 'Faith': '50', 'Luck': '50', 'Humanity': '50', 'Resistance': '50', 'GoodSlot1Count': '1', 'GoodSlot2Count': '99', 'GoodSlot3Count': '15', 'GoodSlot4Count': '1', 'GoodSlot5Count': '1', 'GoodSlot6Count': '1', 'GoodSlot7Count': '1', 'Gesture2': '1', 'Gesture3': '2', 'Gesture4': '3', 'Gesture5': '4', 'Gesture6': '5', 'Gesture7': '8', 'Gender': '1', 'Covenant': '5'} + +### Growth Curves (weapon scaling breakpoints) +- {'Name': '0:なし', 'StageMaxIntercept0': '1.0', 'StageMaxIntercept1': '10.0', 'StageMaxIntercept2': '20.0', 'StageMaxIntercept3': '40.0', 'StageMaxIntercept4': '99.0', 'StageMaxSlope1': '5.0', 'StageMaxSlope2': '40.0', 'StageMaxSlope3': '85.0', 'StageMaxSlope4': '100.0', 'AdjustmentMaxSlope0': '1.0', 'AdjustmentMaxSlope1': '1.0', 'AdjustmentMaxSlope2': '1.0', 'AdjustmentMaxSlope3': '1.0', 'AdjustmentMaxSlope4': '1.0'} +- {'ID': '1', 'Name': '1:硬石', 'StageMaxIntercept0': '1.0', 'StageMaxIntercept1': '10.0', 'StageMaxIntercept2': '30.0', 'StageMaxIntercept3': '50.0', 'StageMaxIntercept4': '99.0', 'StageMaxSlope1': '5.0', 'StageMaxSlope2': '50.0', 'StageMaxSlope3': '80.0', 'StageMaxSlope4': '100.0', 'AdjustmentMaxSlope0': '1.0', 'AdjustmentMaxSlope1': '1.0', 'AdjustmentMaxSlope2': '1.0', 'AdjustmentMaxSlope3': '1.0', 'AdjustmentMaxSlope4': '1.0'} +- {'ID': '2', 'Name': '2:鋭石', 'StageMaxIntercept0': '1.0', 'StageMaxIntercept1': '30.0', 'StageMaxIntercept2': '40.0', 'StageMaxIntercept3': '50.0', 'StageMaxIntercept4': '99.0', 'StageMaxSlope1': '50.0', 'StageMaxSlope2': '65.0', 'StageMaxSlope3': '80.0', 'StageMaxSlope4': '100.0', 'AdjustmentMaxSlope0': '1.0', 'AdjustmentMaxSlope1': '1.0', 'AdjustmentMaxSlope2': '1.0', 'AdjustmentMaxSlope3': '1.0', 'AdjustmentMaxSlope4': '1.0'} +- {'ID': '3', 'Name': '3:みなぎ石', 'StageMaxIntercept0': '1.0', 'StageMaxIntercept1': '20.0', 'StageMaxIntercept2': '30.0', 'StageMaxIntercept3': '50.0', 'StageMaxIntercept4': '99.0', 'StageMaxSlope1': '30.0', 'StageMaxSlope2': '52.0', 'StageMaxSlope3': '82.0', 'StageMaxSlope4': '100.0', 'AdjustmentMaxSlope0': '1.0', 'AdjustmentMaxSlope1': '1.0', 'AdjustmentMaxSlope2': '1.0', 'AdjustmentMaxSlope3': '1.0', 'AdjustmentMaxSlope4': '1.0'} +- {'ID': '4', 'Name': '4:にび石', 'StageMaxIntercept0': '1.0', 'StageMaxIntercept1': '20.0', 'StageMaxIntercept2': '30.0', 'StageMaxIntercept3': '50.0', 'StageMaxIntercept4': '99.0', 'StageMaxSlope1': '35.0', 'StageMaxSlope2': '64.0', 'StageMaxSlope3': '82.0', 'StageMaxSlope4': '100.0', 'AdjustmentMaxSlope0': '1.0', 'AdjustmentMaxSlope1': '1.0', 'AdjustmentMaxSlope2': '1.0', 'AdjustmentMaxSlope3': '1.0', 'AdjustmentMaxSlope4': '1.0'} +- {'ID': '5', 'Name': '5:刃石', 'StageMaxIntercept0': '1.0', 'StageMaxIntercept1': '20.0', 'StageMaxIntercept2': '30.0', 'StageMaxIntercept3': '50.0', 'StageMaxIntercept4': '99.0', 'StageMaxSlope1': '35.0', 'StageMaxSlope2': '64.0', 'StageMaxSlope3': '82.0', 'StageMaxSlope4': '100.0', 'AdjustmentMaxSlope0': '1.0', 'AdjustmentMaxSlope1': '1.0', 'AdjustmentMaxSlope2': '1.0', 'AdjustmentMaxSlope3': '1.0', 'AdjustmentMaxSlope4': '1.0'} +- {'ID': '6', 'Name': '6:蜘蛛糸鋼線', 'StageMaxIntercept0': '1.0', 'StageMaxIntercept1': '20.0', 'StageMaxIntercept2': '30.0', 'StageMaxIntercept3': '50.0', 'StageMaxIntercept4': '99.0', 'StageMaxSlope1': '35.0', 'StageMaxSlope2': '64.0', 'StageMaxSlope3': '82.0', 'StageMaxSlope4': '100.0', 'AdjustmentMaxSlope0': '1.0', 'AdjustmentMaxSlope1': '1.0', 'AdjustmentMaxSlope2': '1.0', 'AdjustmentMaxSlope3': '1.0', 'AdjustmentMaxSlope4': '1.0'} +- {'ID': '7', 'Name': '7:水銀石', 'StageMaxIntercept0': '1.0', 'StageMaxIntercept1': '20.0', 'StageMaxIntercept2': '30.0', 'StageMaxIntercept3': '50.0', 'StageMaxIntercept4': '99.0', 'StageMaxSlope1': '34.0', 'StageMaxSlope2': '54.0', 'StageMaxSlope3': '76.0', 'StageMaxSlope4': '100.0', 'AdjustmentMaxSlope0': '1.0', 'AdjustmentMaxSlope1': '1.0', 'AdjustmentMaxSlope2': '1.0', 'AdjustmentMaxSlope3': '1.0', 'AdjustmentMaxSlope4': '1.0'} +- {'ID': '8', 'Name': '8:竜石', 'StageMaxIntercept0': '1.0', 'StageMaxIntercept1': '20.0', 'StageMaxIntercept2': '30.0', 'StageMaxIntercept3': '50.0', 'StageMaxIntercept4': '99.0', 'StageMaxSlope1': '20.0', 'StageMaxSlope2': '30.0', 'StageMaxSlope3': '50.0', 'StageMaxSlope4': '100.0', 'AdjustmentMaxSlope0': '1.0', 'AdjustmentMaxSlope1': '1.0', 'AdjustmentMaxSlope2': '1.0', 'AdjustmentMaxSlope3': '1.0', 'AdjustmentMaxSlope4': '1.0'} +- {'ID': '9', 'Name': '9:吸いつき石', 'StageMaxIntercept0': '1.0', 'StageMaxIntercept1': '20.0', 'StageMaxIntercept2': '30.0', 'StageMaxIntercept3': '50.0', 'StageMaxIntercept4': '99.0', 'StageMaxSlope1': '37.0', 'StageMaxSlope2': '67.0', 'StageMaxSlope3': '85.0', 'StageMaxSlope4': '100.0', 'AdjustmentMaxSlope0': '1.0', 'AdjustmentMaxSlope1': '1.0', 'AdjustmentMaxSlope2': '1.0', 'AdjustmentMaxSlope3': '1.0', 'AdjustmentMaxSlope4': '1.0'} +- {'ID': '10', 'Name': '10:髄石', 'StageMaxIntercept0': '1.0', 'StageMaxIntercept1': '20.0', 'StageMaxIntercept2': '30.0', 'StageMaxIntercept3': '50.0', 'StageMaxIntercept4': '99.0', 'StageMaxSlope1': '34.0', 'StageMaxSlope2': '57.0', 'StageMaxSlope3': '79.0', 'StageMaxSlope4': '100.0', 'AdjustmentMaxSlope0': '1.0', 'AdjustmentMaxSlope1': '1.0', 'AdjustmentMaxSlope2': '1.0', 'AdjustmentMaxSlope3': '1.0', 'AdjustmentMaxSlope4': '1.0'} +- {'ID': '11', 'Name': '11:月光石', 'StageMaxIntercept0': '1.0', 'StageMaxIntercept1': '25.0', 'StageMaxIntercept2': '30.0', 'StageMaxIntercept3': '45.0', 'StageMaxIntercept4': '99.0', 'StageMaxSlope2': '40.0', 'StageMaxSlope3': '90.0', 'StageMaxSlope4': '100.0', 'AdjustmentMaxSlope0': '1.0', 'AdjustmentMaxSlope1': '1.0', 'AdjustmentMaxSlope2': '1.0', 'AdjustmentMaxSlope3': '1.0', 'AdjustmentMaxSlope4': '1.0'} +- {'ID': '12', 'Name': '12:月影石', 'StageMaxIntercept0': '1.0', 'StageMaxIntercept1': '15.0', 'StageMaxIntercept2': '20.0', 'StageMaxIntercept3': '50.0', 'StageMaxIntercept4': '99.0', 'StageMaxSlope1': '20.0', 'StageMaxSlope2': '45.0', 'StageMaxSlope3': '90.0', 'StageMaxSlope4': '100.0', 'AdjustmentMaxSlope0': '1.0', 'AdjustmentMaxSlope1': '1.0', 'AdjustmentMaxSlope2': '1.0', 'AdjustmentMaxSlope3': '1.0', 'AdjustmentMaxSlope4': '1.0'} +- {'ID': '13', 'Name': '13:微光石', 'StageMaxIntercept0': '1.0', 'StageMaxIntercept1': '25.0', 'StageMaxIntercept2': '30.0', 'StageMaxIntercept3': '50.0', 'StageMaxIntercept4': '99.0', 'StageMaxSlope2': '40.0', 'StageMaxSlope3': '90.0', 'StageMaxSlope4': '100.0', 'AdjustmentMaxSlope0': '1.0', 'AdjustmentMaxSlope1': '1.0', 'AdjustmentMaxSlope2': '1.0', 'AdjustmentMaxSlope3': '1.0', 'AdjustmentMaxSlope4': '1.0'} +- {'ID': '14', 'Name': '14:魔法盾石', 'StageMaxIntercept0': '1.0', 'StageMaxIntercept1': '15.0', 'StageMaxIntercept2': '30.0', 'StageMaxIntercept3': '50.0', 'StageMaxIntercept4': '99.0', 'StageMaxSlope1': '10.0', 'StageMaxSlope2': '70.0', 'StageMaxSlope3': '90.0', 'StageMaxSlope4': '100.0', 'AdjustmentMaxSlope0': '1.0', 'AdjustmentMaxSlope1': '1.0', 'AdjustmentMaxSlope2': '1.0', 'AdjustmentMaxSlope3': '1.0', 'AdjustmentMaxSlope4': '1.0'} +- {'ID': '15', 'Name': '15:鉱石の精霊DS', 'StageMaxIntercept0': '1.0', 'StageMaxIntercept1': '20.0', 'StageMaxIntercept2': '30.0', 'StageMaxIntercept3': '50.0', 'StageMaxIntercept4': '99.0', 'StageMaxSlope0': '100.0', 'StageMaxSlope1': '100.0', 'StageMaxSlope2': '100.0', 'StageMaxSlope3': '100.0', 'StageMaxSlope4': '100.0', 'AdjustmentMaxSlope0': '1.0', 'AdjustmentMaxSlope1': '1.0', 'AdjustmentMaxSlope2': '1.0', 'AdjustmentMaxSlope3': '1.0', 'AdjustmentMaxSlope4': '1.0'} +- {'ID': '16', 'Name': '16:DS', 'StageMaxIntercept0': '1.0', 'StageMaxIntercept1': '15.0', 'StageMaxIntercept2': '20.0', 'StageMaxIntercept3': '50.0', 'StageMaxIntercept4': '99.0', 'StageMaxSlope2': '10.0', 'StageMaxSlope3': '90.0', 'StageMaxSlope4': '100.0', 'AdjustmentMaxSlope0': '1.0', 'AdjustmentMaxSlope1': '1.0', 'AdjustmentMaxSlope2': '1.0', 'AdjustmentMaxSlope3': '1.0', 'AdjustmentMaxSlope4': '1.0'} +- {'ID': '100', 'Name': '最大HP', 'StageMaxIntercept0': '1.0', 'StageMaxIntercept1': '15.0', 'StageMaxIntercept2': '30.0', 'StageMaxIntercept3': '50.0', 'StageMaxIntercept4': '99.0', 'StageMaxSlope0': '400.0', 'StageMaxSlope1': '682.0', 'StageMaxSlope2': '1100.0', 'StageMaxSlope3': '1500.0', 'StageMaxSlope4': '1900.0', 'AdjustmentMaxSlope0': '1.100000023841858', 'AdjustmentMaxSlope1': '1.2000000476837158', 'AdjustmentMaxSlope2': '-1.2000000476837158', 'AdjustmentMaxSlope3': '-1.100000023841858', 'AdjustmentMaxSlope4': '1.0'} +- {'ID': '101', 'Name': '最大MP', 'StageMaxIntercept0': '1.0', 'StageMaxIntercept1': '15.0', 'StageMaxIntercept2': '40.0', 'StageMaxIntercept3': '60.0', 'StageMaxIntercept4': '99.0', 'StageMaxSlope1': '106.0', 'StageMaxSlope2': '280.0', 'StageMaxSlope3': '360.0', 'StageMaxSlope4': '450.0', 'AdjustmentMaxSlope0': '1.100000023841858', 'AdjustmentMaxSlope1': '1.2000000476837158', 'AdjustmentMaxSlope2': '-1.2000000476837158', 'AdjustmentMaxSlope3': '-1.100000023841858', 'AdjustmentMaxSlope4': '1.0'} +- {'ID': '102', 'Name': '防御力', 'StageMaxIntercept0': '1.0', 'StageMaxIntercept1': '80.0', 'StageMaxIntercept2': '160.0', 'StageMaxIntercept3': '260.0', 'StageMaxIntercept4': '800.0', 'StageMaxSlope0': '10.0', 'StageMaxSlope1': '10.0', 'StageMaxSlope2': '120.0', 'StageMaxSlope3': '170.0', 'StageMaxSlope4': '200.0', 'AdjustmentMaxSlope0': '1.0', 'AdjustmentMaxSlope1': '-1.100000023841858', 'AdjustmentMaxSlope2': '-1.2000000476837158', 'AdjustmentMaxSlope3': '1.0', 'AdjustmentMaxSlope4': '1.0'} +- {'ID': '110', 'Name': '毒', 'StageMaxIntercept0': '1.0', 'StageMaxIntercept1': '10.0', 'StageMaxIntercept2': '15.0', 'StageMaxIntercept3': '30.0', 'StageMaxIntercept4': '99.0', 'StageMaxSlope0': '10.0', 'StageMaxSlope1': '30.0', 'StageMaxSlope2': '60.0', 'StageMaxSlope3': '100.0', 'StageMaxSlope4': '150.0', 'AdjustmentMaxSlope0': '1.0', 'AdjustmentMaxSlope1': '1.0', 'AdjustmentMaxSlope2': '1.0', 'AdjustmentMaxSlope3': '1.0', 'AdjustmentMaxSlope4': '1.0'} +- {'ID': '111', 'Name': '疫病', 'StageMaxIntercept0': '1.0', 'StageMaxIntercept1': '10.0', 'StageMaxIntercept2': '15.0', 'StageMaxIntercept3': '30.0', 'StageMaxIntercept4': '99.0', 'StageMaxSlope0': '10.0', 'StageMaxSlope1': '30.0', 'StageMaxSlope2': '60.0', 'StageMaxSlope3': '100.0', 'StageMaxSlope4': '150.0', 'AdjustmentMaxSlope0': '1.0', 'AdjustmentMaxSlope1': '1.0', 'AdjustmentMaxSlope2': '1.0', 'AdjustmentMaxSlope3': '1.0', 'AdjustmentMaxSlope4': '1.0'} +- {'ID': '112', 'Name': '出血', 'StageMaxIntercept0': '1.0', 'StageMaxIntercept1': '10.0', 'StageMaxIntercept2': '15.0', 'StageMaxIntercept3': '30.0', 'StageMaxIntercept4': '99.0', 'StageMaxSlope0': '10.0', 'StageMaxSlope1': '40.0', 'StageMaxSlope2': '60.0', 'StageMaxSlope3': '100.0', 'StageMaxSlope4': '150.0', 'AdjustmentMaxSlope0': '1.0', 'AdjustmentMaxSlope1': '1.0', 'AdjustmentMaxSlope2': '1.0', 'AdjustmentMaxSlope3': '1.0', 'AdjustmentMaxSlope4': '1.0'} +- {'ID': '113', 'Name': '呪', 'StageMaxIntercept1': '1.0', 'StageMaxIntercept2': '5.0', 'StageMaxIntercept3': '10.0', 'StageMaxIntercept4': '30.0', 'StageMaxSlope0': '30.0', 'StageMaxSlope1': '40.0', 'StageMaxSlope2': '80.0', 'StageMaxSlope3': '120.0', 'StageMaxSlope4': '150.0', 'AdjustmentMaxSlope0': '1.0', 'AdjustmentMaxSlope1': '1.0', 'AdjustmentMaxSlope2': '1.0', 'AdjustmentMaxSlope3': '1.0', 'AdjustmentMaxSlope4': '1.0'} +- {'ID': '150', 'Name': '回復スポットの最大補充数', 'StageMaxIntercept1': '10.0', 'StageMaxIntercept2': '20.0', 'StageMaxIntercept3': '30.0', 'StageMaxIntercept4': '40.0', 'StageMaxSlope1': '5.0', 'StageMaxSlope2': '10.0', 'StageMaxSlope3': '15.0', 'StageMaxSlope4': '20.0'} +- {'ID': '200', 'Name': '成長消費ソウル', 'InitialLevellingCostSlope': '0.10000000149011612', 'LevellingCostEarlyAdjustment': '1.0', 'LateLevellingCostSlope': '0.019999999552965164', 'LateLevellingCostThreshold': '92.0'} +- {'ID': '300', 'Name': 'レベルシンク:HP', 'StageMaxIntercept0': '1.0', 'StageMaxIntercept1': '106.0', 'StageMaxIntercept2': '314.0', 'StageMaxIntercept3': '470.0', 'StageMaxIntercept4': '999.0', 'StageMaxSlope0': '1.0', 'StageMaxSlope1': '1.0', 'StageMaxSlope2': '2.0', 'StageMaxSlope3': '2.5', 'StageMaxSlope4': '3.0', 'AdjustmentMaxSlope0': '1.0', 'AdjustmentMaxSlope1': '1.0', 'AdjustmentMaxSlope2': '1.0', 'AdjustmentMaxSlope3': '1.0', 'AdjustmentMaxSlope4': '1.0'} +- {'ID': '302', 'Name': 'レベルシンク:スタミナ', 'StageMaxIntercept0': '1.0', 'StageMaxIntercept1': '106.0', 'StageMaxIntercept2': '314.0', 'StageMaxIntercept3': '470.0', 'StageMaxIntercept4': '999.0', 'StageMaxSlope0': '1.0', 'StageMaxSlope1': '1.0', 'StageMaxSlope2': '1.100000023841858', 'StageMaxSlope3': '1.25', 'StageMaxSlope4': '1.399999976158142', 'AdjustmentMaxSlope0': '1.0', 'AdjustmentMaxSlope1': '1.0', 'AdjustmentMaxSlope2': '1.0', 'AdjustmentMaxSlope3': '1.0', 'AdjustmentMaxSlope4': '1.0'} +- {'ID': '303', 'Name': 'レベルシンク:防御力', 'StageMaxIntercept0': '1.0', 'StageMaxIntercept1': '106.0', 'StageMaxIntercept2': '314.0', 'StageMaxIntercept3': '470.0', 'StageMaxIntercept4': '999.0', 'StageMaxSlope0': '93.0', 'StageMaxSlope1': '140.0', 'StageMaxSlope2': '190.0', 'StageMaxSlope3': '205.0', 'StageMaxSlope4': '315.0', 'AdjustmentMaxSlope0': '1.0', 'AdjustmentMaxSlope1': '1.0', 'AdjustmentMaxSlope2': '1.0', 'AdjustmentMaxSlope3': '1.0', 'AdjustmentMaxSlope4': '1.0'} +- {'ID': '304', 'Name': 'レベルシンク:耐性値', 'StageMaxIntercept0': '1.0', 'StageMaxIntercept1': '106.0', 'StageMaxIntercept2': '314.0', 'StageMaxIntercept3': '470.0', 'StageMaxIntercept4': '999.0', 'StageMaxSlope0': '100.0', 'StageMaxSlope1': '120.0', 'StageMaxSlope2': '190.0', 'StageMaxSlope3': '250.0', 'StageMaxSlope4': '330.0', 'AdjustmentMaxSlope0': '1.0', 'AdjustmentMaxSlope1': '1.0', 'AdjustmentMaxSlope2': '1.0', 'AdjustmentMaxSlope3': '1.0', 'AdjustmentMaxSlope4': '1.0'} +- {'ID': '310', 'Name': 'レベルシンク:武器:直剣', 'StageMaxIntercept0': '1.0', 'StageMaxIntercept1': '30.0', 'StageMaxIntercept2': '230.0', 'StageMaxIntercept3': '360.0', 'StageMaxIntercept4': '999.0', 'StageMaxSlope0': '1.0', 'StageMaxSlope1': '1.0', 'StageMaxSlope2': '6.75', 'StageMaxSlope3': '7.5', 'StageMaxSlope4': '7.5', 'AdjustmentMaxSlope0': '1.0', 'AdjustmentMaxSlope1': '1.0', 'AdjustmentMaxSlope2': '1.0', 'AdjustmentMaxSlope3': '1.0', 'AdjustmentMaxSlope4': '1.0'} +- {'ID': '320', 'Name': 'レベルシンク:武器:短剣', 'StageMaxIntercept0': '1.0', 'StageMaxIntercept1': '30.0', 'StageMaxIntercept2': '230.0', 'StageMaxIntercept3': '360.0', 'StageMaxIntercept4': '999.0', 'StageMaxSlope0': '1.0', 'StageMaxSlope1': '1.0', 'StageMaxSlope2': '8.25', 'StageMaxSlope3': '9.0', 'StageMaxSlope4': '9.0', 'AdjustmentMaxSlope0': '1.0', 'AdjustmentMaxSlope1': '1.0', 'AdjustmentMaxSlope2': '1.0', 'AdjustmentMaxSlope3': '1.0', 'AdjustmentMaxSlope4': '1.0'} +- {'ID': '330', 'Name': 'レベルシンク:武器:特大剣', 'StageMaxIntercept0': '1.0', 'StageMaxIntercept1': '30.0', 'StageMaxIntercept2': '230.0', 'StageMaxIntercept3': '360.0', 'StageMaxIntercept4': '999.0', 'StageMaxSlope0': '1.0', 'StageMaxSlope1': '1.0', 'StageMaxSlope2': '4.5', 'StageMaxSlope3': '5.0', 'StageMaxSlope4': '5.0', 'AdjustmentMaxSlope0': '1.0', 'AdjustmentMaxSlope1': '1.0', 'AdjustmentMaxSlope2': '1.0', 'AdjustmentMaxSlope3': '1.0', 'AdjustmentMaxSlope4': '1.0'} +- {'ID': '340', 'Name': 'レベルシンク:武器:弓', 'StageMaxIntercept0': '1.0', 'StageMaxIntercept1': '30.0', 'StageMaxIntercept2': '230.0', 'StageMaxIntercept3': '360.0', 'StageMaxIntercept4': '999.0', 'StageMaxSlope0': '1.0', 'StageMaxSlope1': '1.0', 'StageMaxSlope2': '6.75', 'StageMaxSlope3': '7.5', 'StageMaxSlope4': '7.5', 'AdjustmentMaxSlope0': '1.0', 'AdjustmentMaxSlope1': '1.0', 'AdjustmentMaxSlope2': '1.0', 'AdjustmentMaxSlope3': '1.0', 'AdjustmentMaxSlope4': '1.0'} +- {'ID': '341', 'Name': 'レベルシンク:武器:大弓', 'StageMaxIntercept0': '1.0', 'StageMaxIntercept1': '30.0', 'StageMaxIntercept2': '230.0', 'StageMaxIntercept3': '360.0', 'StageMaxIntercept4': '999.0', 'StageMaxSlope0': '1.0', 'StageMaxSlope1': '1.0', 'StageMaxSlope2': '7.5', 'StageMaxSlope3': '15.0', 'StageMaxSlope4': '15.0', 'AdjustmentMaxSlope0': '1.0', 'AdjustmentMaxSlope1': '1.0', 'AdjustmentMaxSlope2': '1.0', 'AdjustmentMaxSlope3': '1.0', 'AdjustmentMaxSlope4': '1.0'} +- {'ID': '342', 'Name': 'レベルシンク:武器:クロスボウ', 'StageMaxIntercept0': '1.0', 'StageMaxIntercept1': '30.0', 'StageMaxIntercept2': '100.0', 'StageMaxIntercept3': '250.0', 'StageMaxIntercept4': '999.0', 'StageMaxSlope0': '1.0', 'StageMaxSlope1': '1.0', 'StageMaxSlope2': '2.700000047683716', 'StageMaxSlope3': '3.9000000953674316', 'StageMaxSlope4': '3.9000000953674316', 'AdjustmentMaxSlope0': '1.0', 'AdjustmentMaxSlope1': '1.0', 'AdjustmentMaxSlope2': '1.0', 'AdjustmentMaxSlope3': '1.0', 'AdjustmentMaxSlope4': '1.0'} +- {'ID': '350', 'Name': 'レベルシンク:武器:杖', 'StageMaxIntercept0': '1.0', 'StageMaxIntercept1': '30.0', 'StageMaxIntercept2': '215.0', 'StageMaxIntercept3': '310.0', 'StageMaxIntercept4': '999.0', 'StageMaxSlope0': '1.0', 'StageMaxSlope1': '1.0', 'StageMaxSlope2': '4.5', 'StageMaxSlope3': '4.5', 'StageMaxSlope4': '4.5', 'AdjustmentMaxSlope0': '1.0', 'AdjustmentMaxSlope1': '1.0', 'AdjustmentMaxSlope2': '1.0', 'AdjustmentMaxSlope3': '1.0', 'AdjustmentMaxSlope4': '1.0'} +- {'ID': '351', 'Name': 'レベルシンク:武器:タリスマンと鈴', 'StageMaxIntercept0': '1.0', 'StageMaxIntercept1': '30.0', 'StageMaxIntercept2': '215.0', 'StageMaxIntercept3': '310.0', 'StageMaxIntercept4': '999.0', 'StageMaxSlope0': '1.0', 'StageMaxSlope1': '1.0', 'StageMaxSlope2': '4.5', 'StageMaxSlope3': '4.5', 'StageMaxSlope4': '4.5', 'AdjustmentMaxSlope0': '1.0', 'AdjustmentMaxSlope1': '1.0', 'AdjustmentMaxSlope2': '1.0', 'AdjustmentMaxSlope3': '1.0', 'AdjustmentMaxSlope4': '1.0'} +- {'ID': '352', 'Name': 'レベルシンク:武器:呪術の火', 'StageMaxIntercept0': '1.0', 'StageMaxIntercept1': '30.0', 'StageMaxIntercept2': '250.0', 'StageMaxIntercept3': '350.0', 'StageMaxIntercept4': '999.0', 'StageMaxSlope0': '1.0', 'StageMaxSlope1': '1.0', 'StageMaxSlope2': '4.5', 'StageMaxSlope3': '4.5', 'StageMaxSlope4': '4.5', 'AdjustmentMaxSlope0': '1.0', 'AdjustmentMaxSlope1': '1.0', 'AdjustmentMaxSlope2': '1.0', 'AdjustmentMaxSlope3': '1.0', 'AdjustmentMaxSlope4': '1.0'} + +## SPECIAL EFFECTS — Ring/Buff Effects + +| ID | Name | key effects | +|---|---|---| +| 2240 | HPドレイン | {'StatusIcon': '5010', 'EffectDuration': '-1.0', 'SpecialEffectOnAttack': '2241', 'SpecialState': '199', 'AffectsMagic': | +| 2241 | HPドレイン | {'EffectDuration': '0.5', 'HPPointsLost': '-30'} | +| 2994 | HPリジェネ | {'StatusIcon': '5001', 'EffectDuration': '-1.0', 'HPPointsLost': '-4', 'SpecialState': '52', 'UseVisualEffect': '1'} | +| 1400 | HP回復1 | {'HPPointsLost': '-300', 'UseIntelligenceScaling': '1', 'UseFaithScaling': '1'} | +| 1401 | HP回復1_共鳴LV1 | {'HPPointsLost': '-325', 'UseIntelligenceScaling': '1', 'UseFaithScaling': '1'} | +| 1986 | HP回復1_共鳴LV1 | {'HPPointsLost': '-400', 'UseIntelligenceScaling': '1', 'UseFaithScaling': '1'} | +| 1402 | HP回復1_共鳴LV2 | {'HPPointsLost': '-350', 'UseIntelligenceScaling': '1', 'UseFaithScaling': '1'} | +| 1403 | HP回復1_共鳴LV3 | {'HPPointsLost': '-375', 'UseIntelligenceScaling': '1', 'UseFaithScaling': '1'} | +| 1404 | HP回復1_共鳴LV4 | {'HPPointsLost': '-400', 'UseIntelligenceScaling': '1', 'UseFaithScaling': '1'} | +| 1410 | HP回復2 | {'HPPointsLost': '-800', 'UseIntelligenceScaling': '1', 'UseFaithScaling': '1'} | +| 1411 | HP回復2_共鳴LV1 | {'HPPointsLost': '-825', 'UseIntelligenceScaling': '1', 'UseFaithScaling': '1'} | +| 1412 | HP回復2_共鳴LV2 | {'HPPointsLost': '-850', 'UseIntelligenceScaling': '1', 'UseFaithScaling': '1'} | +| 1987 | HP回復2_共鳴LV2 | {'HPPointsLost': '-500', 'UseIntelligenceScaling': '1', 'UseFaithScaling': '1'} | +| 1413 | HP回復2_共鳴LV3 | {'HPPointsLost': '-875', 'UseIntelligenceScaling': '1', 'UseFaithScaling': '1'} | +| 1414 | HP回復2_共鳴LV4 | {'HPPointsLost': '-900', 'UseIntelligenceScaling': '1', 'UseFaithScaling': '1'} | +| 1420 | HP回復3 | {'HPPointsLost': '-800', 'UseIntelligenceScaling': '1', 'UseFaithScaling': '1'} | +| 1421 | HP回復3_共鳴LV1 | {'HPPointsLost': '-825', 'UseIntelligenceScaling': '1', 'UseFaithScaling': '1'} | +| 1422 | HP回復3_共鳴LV2 | {'HPPointsLost': '-850', 'UseIntelligenceScaling': '1', 'UseFaithScaling': '1'} | +| 1423 | HP回復3_共鳴LV3 | {'HPPointsLost': '-875', 'UseIntelligenceScaling': '1', 'UseFaithScaling': '1'} | +| 1988 | HP回復3_共鳴LV3 | {'HPPointsLost': '-600', 'UseIntelligenceScaling': '1', 'UseFaithScaling': '1'} | +| 1424 | HP回復3_共鳴LV4 | {'HPPointsLost': '-900', 'UseIntelligenceScaling': '1', 'UseFaithScaling': '1'} | +| 1430 | HP回復4 | {'HPPointsLost': '-600', 'UseIntelligenceScaling': '1', 'UseFaithScaling': '1'} | +| 1431 | HP回復4_共鳴LV1 | {'HPPointsLost': '-625', 'UseIntelligenceScaling': '1', 'UseFaithScaling': '1'} | +| 1432 | HP回復4_共鳴LV2 | {'HPPointsLost': '-650', 'UseIntelligenceScaling': '1', 'UseFaithScaling': '1'} | +| 1433 | HP回復4_共鳴LV3 | {'HPPointsLost': '-675', 'UseIntelligenceScaling': '1', 'UseFaithScaling': '1'} | +| 1434 | HP回復4_共鳴LV4 | {'HPPointsLost': '-700', 'UseIntelligenceScaling': '1', 'UseFaithScaling': '1'} | +| 1989 | HP回復4_共鳴LV4 | {'HPPointsLost': '-700', 'UseIntelligenceScaling': '1', 'UseFaithScaling': '1'} | +| 3000 | HP回復草 | {'HPReductionPercentage': '-100.0'} | +| 2340 | HP微増 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '1.0499999523162842', 'CurrentHPIgnoresMaxHPChange': '1'} | +| 9600 | LevelSync | {'StatusIcon': '5018', 'EffectDuration': '-1.0'} | +| 3953 | MPポーションB | {'MPPointsLost': '-100'} | +| 2995 | MPリジェネ | {'StatusIcon': '5001', 'EffectDuration': '-1.0', 'UpdateInterval': '4.0', 'MPPointsLost': '-1', 'SpecialState': '68', 'U | +| 2060 | MP偏重 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '0.5', 'SpecialState': '194', 'CurrentHPIgnoresMaxHPChange': '1'} | +| 5074 | NPCスタミナ攻撃力倍率 レベル1 | {'EffectDuration': '-1.0'} | +| 5075 | NPCスタミナ攻撃力倍率 レベル2 | {'EffectDuration': '-1.0', 'OutgoingStaminaDamageMultiplier': '1.0499999523162842'} | +| 5076 | NPCスタミナ攻撃力倍率 レベル3 | {'EffectDuration': '-1.0', 'OutgoingStaminaDamageMultiplier': '1.1200000047683716'} | +| 5077 | NPCスタミナ攻撃力倍率 レベル4 | {'EffectDuration': '-1.0', 'OutgoingStaminaDamageMultiplier': '1.190000057220459'} | +| 5078 | NPCスタミナ攻撃力倍率 レベル5 | {'EffectDuration': '-1.0', 'OutgoingStaminaDamageMultiplier': '1.2999999523162842'} | +| 5079 | NPCスタミナ攻撃力倍率 レベル6 | {'EffectDuration': '-1.0', 'OutgoingStaminaDamageMultiplier': '1.440000057220459'} | +| 5080 | NPCスタミナ攻撃力倍率 レベル7 | {'EffectDuration': '-1.0', 'OutgoingStaminaDamageMultiplier': '1.6299999952316284'} | +| 5081 | NPCスタミナ攻撃力倍率 レベル8 | {'EffectDuration': '-1.0', 'OutgoingStaminaDamageMultiplier': '1.809999942779541'} | +| 5082 | NPCスタミナ攻撃力倍率 レベル9 | {'EffectDuration': '-1.0', 'OutgoingStaminaDamageMultiplier': '2.0199999809265137'} | +| 5049 | NPCドーピング用(MP超回復) | {'EffectDuration': '-1.0', 'MPPointsLost': '-100'} | +| 5041 | NPCドーピング用(ダメージ0.5倍) | {'EffectDuration': '-1.0', 'OutgoingPhysicalDamageMultiplier': '0.30000001192092896', 'OutgoingMagicDamageMultiplier': ' | +| 5040 | NPCドーピング用(ダメージ2倍) | {'EffectDuration': '-1.0', 'OutgoingPhysicalDamageMultiplier': '2.0', 'OutgoingMagicDamageMultiplier': '2.0', 'OutgoingF | +| 5036 | NPCドーピング用(ダメージ3.0倍) | {'EffectDuration': '-1.0', 'OutgoingPhysicalDamageMultiplier': '3.0', 'OutgoingMagicDamageMultiplier': '3.0', 'OutgoingF | +| 7600 | NPCドーピング用(実ダメージ0.5倍) | {'EffectDuration': '-1.0', 'OutgoingPhysicalDamageMultiplier': '0.5', 'OutgoingMagicDamageMultiplier': '0.5', 'OutgoingF | +| 7601 | NPCドーピング用(実ダメージ1.5倍) | {'EffectDuration': '-1.0', 'OutgoingPhysicalDamageMultiplier': '1.5', 'OutgoingMagicDamageMultiplier': '1.5', 'OutgoingF | +| 7602 | NPCドーピング用(実ダメージ2倍) | {'EffectDuration': '-1.0', 'OutgoingPhysicalDamageMultiplier': '2.0', 'OutgoingMagicDamageMultiplier': '2.0', 'OutgoingF | +| 7650 | NPCドーピング用(沼のおばさん) | {'EffectDuration': '-1.0', 'IncomingFireDamageMultiplier': '0.20000000298023224', 'PoisonResistanceMultiplier': '5.0', ' | +| 5039 | NPCドーピング用(炎に強い) | {'EffectDuration': '-1.0', 'IncomingFireDamageMultiplier': '0.10000000149011612', 'FireDefenseMultiplier': '5.0'} | +| 5037 | NPCドーピング用(防御1.5倍) | {'EffectDuration': '-1.0', 'PhysicalDefenseMultiplier': '1.5', 'MagicDefenseMultiplier': '1.5', 'FireDefenseMultiplier': | +| 7610 | NPCドーピング用(防御1.5倍) | {'EffectDuration': '-1.0', 'PhysicalDefenseMultiplier': '1.5', 'MagicDefenseMultiplier': '1.5', 'FireDefenseMultiplier': | +| 5038 | NPCドーピング用(防御2.0倍) | {'EffectDuration': '-1.0', 'PhysicalDefenseMultiplier': '2.0', 'MagicDefenseMultiplier': '2.0', 'FireDefenseMultiplier': | +| 7611 | NPCドーピング用(防御2.0倍) | {'EffectDuration': '-1.0', 'PhysicalDefenseMultiplier': '2.0', 'MagicDefenseMultiplier': '2.0', 'FireDefenseMultiplier': | +| 7651 | NPCドーピング用() | {'EffectDuration': '-1.0', 'AffectsMagic': '1', 'AffectsMiracles': '1'} | +| 7700 | NPC協力マルチドーピング | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '1.850000023841858', 'PhysicalAttackPowerMultiplier': '1.149999976158142', | +| 5494 | NPC毒耐性50倍 | {'EffectDuration': '-1.0', 'PoisonResistanceMultiplier': '50.0'} | +| 5495 | NPC炎にかなり強い | {'EffectDuration': '-1.0', 'IncomingFireDamageMultiplier': '0.10000000149011612', 'FireDefenseMultiplier': '3.0'} | +| 5445 | NPC用MP無限 | {'EffectDuration': '-1.0', 'UpdateInterval': '0.10000000149011612', 'MPReductionPercentage': '-5.0'} | +| 5446 | NPC用スタミナ回復早い | {'EffectDuration': '-1.0', 'UpdateInterval': '0.10000000149011612', 'StaminaRecoverySpeedChange': '20'} | +| 5033 | NPC重量過多ドーピング用 | {'EffectDuration': '-1.0', 'MaxEquipLoadMultiplier': '2.0', 'AffectsMagic': '1', 'AffectsMiracles': '1'} | +| 5496 | NPC魔法と炎にかなり強い | {'EffectDuration': '-1.0', 'IncomingMagicDamageMultiplier': '0.30000001192092896', 'IncomingFireDamageMultiplier': '0.30 | +| 4005 | PCブラックゴースト【黄衣の翁】ドーピング | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '2.0'} | +| 4006 | PCブラックゴースト【黄衣の翁】頭部SFX | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1', 'SpecialState': '57', 'UseVisualEffect': '1', 'AffectsMagic': ' | +| 57 | PGテスト:グラビティ無効 | {'EffectDuration': '-1.0', 'IgnoreGravity': '1'} | +| 54 | PGテスト:協力 | {'StatusIcon': '5023', 'EffectDuration': '30.0', 'SpecialState': '100', 'UseVisualEffect': '1', 'EnableLifeTime': '1'} | +| 53 | PGテスト:協力待ち | {'StatusIcon': '5022', 'EffectDuration': '60.0', 'SpecialEffectCategory': '10001', 'SpecialState': '99', 'EnableLifeTime | +| 55 | PGテスト:協力送信 | {'HPPointsLost': '100', 'SpecialState': '101', 'UseVisualEffect': '1'} | +| 52 | PGテスト:探知 | {'EffectDuration': '-1.0', 'SpecialState': '98'} | +| 2090 | SAアップ | {'StatusIcon': '5007', 'EffectDuration': '-1.0', 'PoiseAddition': '40', 'SpecialState': '155', 'UseVisualEffect': '1'} | +| 5163 | SA時、中ダメージしか出ない0.1秒版 | {'EffectDuration': '0.10000000149011612', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '1', 'ReplaceNoImpac | +| 22 | test_change_wep0 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '100'} | +| 23 | test_change_wep1 | {'EffectDuration': '-1.0', 'AnimationIDOffset': '10000', 'SpecialEffectCategory': '100'} | +| 3 | test_cure | {'HPPointsLost': '-100'} | +| 5 | test_cureitem | {'HPPointsLost': '-25'} | +| 2 | test_enchantweapon | {'EffectDuration': '30.0', 'IncomingMagicDamageMultiplier': '2.0'} | +| 6850 | 【106】竜王の大斧/物理防御力アップ | {'StatusIcon': '5002', 'EffectDuration': '-1.0', 'MagicDefenseAddition': '20', 'FireDefenseAddition': '20', 'SpecialEffe | +| 6710 | 【117】竜拳【バイキルト】 | {'StatusIcon': '5000', 'EffectDuration': '5.0', 'PhysicalAttackPowerMultiplier': '1.2000000476837158', 'MagicAttackPower | +| 6711 | 【117】竜拳【バイキルト】_LV1 | {'StatusIcon': '5000', 'EffectDuration': '5.0', 'PhysicalAttackPowerMultiplier': '1.2200000286102295', 'MagicAttackPower | +| 6712 | 【117】竜拳【バイキルト】_LV2 | {'StatusIcon': '5000', 'EffectDuration': '5.0', 'PhysicalAttackPowerMultiplier': '1.25', 'MagicAttackPowerMultiplier': ' | +| 6713 | 【117】竜拳【バイキルト】_LV3 | {'StatusIcon': '5000', 'EffectDuration': '5.0', 'PhysicalAttackPowerMultiplier': '1.2999999523162842', 'MagicAttackPower | +| 6702 | 【117】竜拳【ブレス時スタミナ減少】 | {'EffectDuration': '0.10000000149011612', 'StaminaRecoverySpeedChange': '-50'} | +| 6700 | 【117】竜拳【攻撃時補正効果】 | {'EffectDuration': '0.10000000149011612', 'PhysicalAttackPowerMultiplier': '20.0'} | +| 6840 | 【125】ガーゴイルの尾斧/出血&毒耐性アップ | {'StatusIcon': '5003', 'EffectDuration': '-1.0', 'PoisonResistanceMultiplier': '2.0', 'ToxicResistanceMultiplier': '2.0' | +| 6800 | 【127】結晶の錫杖/魔法使用回数半減 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '20', 'SpecialState': '203', 'AffectedWeaponType': '3'} | +| 6810 | 【58】古竜の剣/物理防御力アップ | {'StatusIcon': '5002', 'EffectDuration': '-1.0', 'MagicDefenseAddition': '15', 'FireDefenseAddition': '15', 'SpecialEffe | +| 6000 | 【65】六目【バイキルト】 | {'StatusIcon': '5000', 'EffectDuration': '30.0', 'PhysicalAttackPowerMultiplier': '1.2000000476837158', 'MagicAttackPowe | +| 6730 | 【70】スモウ/HPドレイン_攻撃ヒット時 | {'EffectDuration': '0.5', 'HPPointsLost': '-10', 'SpecialState': '199', 'AffectedWeaponType': '3'} | +| 6820 | 【79】ムーンライト/魔法防御力アップ | {'StatusIcon': '5002', 'EffectDuration': '-1.0', 'MagicDefenseAddition': '40', 'SpecialEffectCategory': '10', 'AffectedW | +| 6870 | 【87】大竜骨/物理防御力アップ | {'StatusIcon': '5002', 'EffectDuration': '-1.0', 'MagicDefenseAddition': '15', 'FireDefenseAddition': '15', 'SpecialEffe | +| 6010 | 【94】岩の大盾【はじきダメージ減少効果】 | {'StatusIcon': '5007', 'EffectDuration': '30.0', 'SpecialEffectCategory': '10001', 'RiposteDefenseAddition': '65', 'Spec | +| 6011 | 【94】岩の大盾【ダメージアニメ変化効果】 | {'EffectDuration': '30.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '2', 'ReplaceSmallImpactLevel': '1' | +| 6830 | 【98】古竜の大剣/物理防御力アップ | {'StatusIcon': '5002', 'EffectDuration': '-1.0', 'MagicDefenseAddition': '20', 'FireDefenseAddition': '20', 'SpecialEffe | +| 7800 | 【DLC】NPC_HPドーピング | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '3.0', 'MaxStaminaMultiplier': '2.0'} | +| 7801 | 【DLC】NPC_スタミナ回復ドーピング | {'EffectDuration': '-1.0', 'StaminaRecoverySpeedChange': '100', 'SpecialEffectCategory': '10'} | +| 7510 | 【DLC】SAマルチドーピング_ホワイト一人_c4100専用 | {'EffectDuration': '-1.0', 'PoiseAddition': '80', 'SpecialState': '155'} | +| 7512 | 【DLC】SAマルチドーピング_ホワイト三人__c4100専用 | {'EffectDuration': '-1.0', 'PoiseAddition': '240', 'SpecialState': '155'} | +| 7511 | 【DLC】SAマルチドーピング_ホワイト二人__c4100専用 | {'EffectDuration': '-1.0', 'PoiseAddition': '160', 'SpecialState': '155'} | +| 5522 | 【DLC】c3471 金キメラ 怯み中 | {'EffectDuration': '1.600000023841858', 'SpecialEffectCategory': '20'} | +| 5520 | 【DLC】c3471 金キメラ 毒ダメージ | {'EffectDuration': '180.0', 'HPPointsLost': '10', 'PoisonDamage': '196', 'SpecialEffectCategory': '10004', 'AttackAttrib | +| 5521 | 【DLC】c3471 金キメラ 羽ばたきを食らった | {'EffectDuration': '1.600000023841858', 'SpecialEffectCategory': '20'} | +| 5530 | 【DLC】c4090_スナイパーA_出血 | {'EffectDuration': '2.0', 'UpdateInterval': '3.0', 'HPReductionPercentage': '32.0', 'BleedDamage': '100', 'SpecialEffect | +| 5510 | 【DLC】c4100_アルトリウス_自己強化 | {'EffectDuration': '60.0', 'PhysicalAttackPowerMultiplier': '1.5', 'MagicAttackPowerMultiplier': '1.5', 'FireAttackPower | +| 5511 | 【DLC】c4100_アルトリウス_自己強化中のSA調整 | {'EffectDuration': '4.800000190734863', 'IncomingSlashDamageMultiplier': '0.5', 'IncomingStrikeDamageMultiplier': '0.5', | +| 5570 | 【DLC】c4110鷹の目のゴー 毒寿命短い | {'EffectDuration': '-1.0', 'UpdateInterval': '-1.0', 'EffectDurationMultiplier': '0.25', 'SpecialEffectCategory': '20', | +| 5571 | 【DLC】c4110鷹の目のゴー 疫病寿命短い | {'EffectDuration': '-1.0', 'UpdateInterval': '-1.0', 'EffectDurationMultiplier': '0.25', 'SpecialEffectCategory': '20', | +| 5581 | 【DLC】c4150深淵人 目光ドーピング | {'EffectDuration': '-1.0', 'PhysicalAttackPowerMultiplier': '1.25', 'OutgoingStaminaDamageMultiplier': '1.25', 'AffectsM | +| 5580 | 【DLC】c4150深淵人 目光アニメオフセット | {'EffectDuration': '-1.0', 'AnimationIDOffset': '90000', 'SpecialEffectCategory': '100'} | +| 5561 | 【DLC】c4160_深淵人魔術師_杖 | {'EffectDuration': '180.0', 'HPPointsLost': '3', 'PoisonDamage': '120', 'SpecialEffectCategory': '10004', 'AttackAttribu | +| 5560 | 【DLC】c4160_深淵人魔術師_毒雲 | {'EffectDuration': '180.0', 'UpdateInterval': '0.5', 'HPPointsLost': '5', 'PoisonDamage': '5', 'SpecialEffectCategory': | +| 5582 | 【DLC】c4160深淵人魔術師 目光ドーピング | {'EffectDuration': '-1.0', 'PhysicalAttackPowerMultiplier': '1.25', 'MagicAttackPowerMultiplier': '1.25', 'OutgoingStami | +| 5542 | 【DLC】c4170_人間性(小)_外縁ダメージ | {'UpdateInterval': '0.10000000149011612', 'HPReductionPercentage': '0.10000000149011612', 'SpecialEffectCategory': '10'} | +| 5541 | 【DLC】c4171_人間性(中)_外縁ダメージ | {'UpdateInterval': '0.10000000149011612', 'HPReductionPercentage': '0.20000000298023224', 'SpecialEffectCategory': '10'} | +| 5540 | 【DLC】c4172_人間性(大)_外縁ダメージ | {'UpdateInterval': '0.10000000149011612', 'HPReductionPercentage': '0.30000001192092896', 'SpecialEffectCategory': '10'} | +| 5590 | 【DLC】c4510_黒竜_邪眼投げ効果 | {'EffectDuration': '30.0', 'IncomingSlashDamageMultiplier': '2.0', 'IncomingStrikeDamageMultiplier': '2.0', 'IncomingThr | +| 5550 | 【DLC】c4520_シフ_狙われにくくなる | {'EffectDuration': '-1.0', 'TargetPriorityChange': '-0.699999988079071'} | +| 3320 | 【DLC】アルトリウスのソウル | {'SoulAmountChange': '16000'} | +| 3041 | 【DLC】エリンギの欠片 | {'StatusIcon': '5001', 'EffectDuration': '30.0', 'UpdateInterval': '0.029999999329447746', 'HPPointsLost': '-3', 'Specia | +| 6621 | 【DLC】キアランのSAアップ | {'EffectDuration': '-1.0', 'PoiseAddition': '40', 'SpecialState': '155'} | +| 6610 | 【DLC】キアランの曲剣【出血】 | {'EffectDuration': '2.0', 'UpdateInterval': '3.0', 'HPReductionPercentage': '30.0', 'BleedDamage': '40', 'SpecialEffectC | +| 6620 | 【DLC】キアランの短剣【猛毒】 | {'EffectDuration': '600.0', 'UpdateInterval': '1.0199999809265137', 'HPPointsLost': '6', 'StaminaRecoverySpeedChange': ' | +| 6630 | 【DLC】キメラのムチ【毒】 | {'EffectDuration': '180.0', 'UpdateInterval': '1.0199999809265137', 'HPPointsLost': '3', 'PoisonDamage': '40', 'SpecialE | +| 5335 | 【DLC】常駐ダメージアニメ変化【中・大・吹っ飛びのみ】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '200', 'ReplaceNoImpactLevel': '1', | +| 5337 | 【DLC】常駐ダメージアニメ変化【吹っ飛び・叩きつけを大扱い】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '200', 'ReplaceNoImpactLevel': '1', | +| 5336 | 【DLC】常駐ダメージアニメ変化【小・中・大・小吹っ飛びのみ】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '200', 'ReplaceNoImpactLevel': '1', | +| 39 | 【DLC】投げ無効状態_ハメ防止用 | {'EffectDuration': '0.699999988079071', 'ThrowCondition': '1'} | +| 3321 | 【DLC】深淵の主のソウル | {'SoulAmountChange': '18000'} | +| 3319 | 【DLC】金キメラのソウル | {'SoulAmountChange': '12000'} | +| 6880 | 【ガーゴイルのハルバード】/出血&毒耐性アップ(小) | {'StatusIcon': '5003', 'EffectDuration': '-1.0', 'PoisonResistanceMultiplier': '1.25', 'ToxicResistanceMultiplier': '1.2 | +| 6740 | 【サンクトゥス】HPリジェネレイト | {'StatusIcon': '5001', 'EffectDuration': '-1.0', 'UpdateInterval': '2.0', 'HPPointsLost': '-2', 'SpecialEffectCategory': | +| 11 | 【システム】Black_ForceJoinSoulsign | {'RequestInvasion': '1'} | +| 10 | 【システム】Black_Soulsign | {'RequestBlackPhantomSummon': '1'} | +| 15 | 【システム】NPCへの侵入 | {'RequestNPCInvasion': '1'} | +| 4 | 【システム】SOSsign | {'RequestWhitePhantomSummon': '1'} | +| 12 | 【システム】bloodSign | {'SpecialState': '55'} | +| 6 | 【システム】kickout | {'RequestKick': '1'} | +| 7 | 【システム】leaveSession | {'RequestReturnToOwnWorld': '1'} | +| 17 | 【システム】l闘技場 退出 | {'RequestColiseumExit': '1'} | +| 8 | 【システム】ゴースト時のパラメータ変化 | {'EffectDuration': '-1.0', 'SpecialState': '31'} | +| 13 | 【システム】ソウルスティール【マルチ】 | {'SpecialState': '14'} | +| 16 | 【システム】ニト侵入サインばらまき | {'EffectDuration': '-1.0', 'SpecialState': '185', 'UseVisualEffect': '1'} | +| 9 | 【システム】ブラック時のパラメータ変化 | {'EffectDuration': '-1.0'} | +| 28 | 【システム】マルチ侵入制限時間をレベル0にする | {'StatusIcon': '2129', 'EffectDuration': '-1.0'} | +| 25 | 【システム】復活演出用効果 | {'SpecialState': '175', 'UseVisualEffect': '1'} | +| 24 | 【システム】救援要請 | {'EffectDuration': '0.10000000149011612', 'SpecialState': '148'} | +| 21 | 【システム】点光源装備 | {'EffectDuration': '-1.0', 'SpecialState': '58'} | +| 27 | 【システム】竜のうろこをばらまく | {'SpecialState': '195'} | +| 20 | 【システム】評価効果 | {'EffectDuration': '5.0', 'UpdateInterval': '5.0', 'HPReductionPercentage': '-100.0', 'SpecialState': '59', 'UseVisualEf | +| 26 | 【システム】賞金首に侵入 | {'SpecialState': '196'} | +| 14 | 【システム】青サイン可視化 | {'EffectDuration': '-1.0', 'SaveCategory': '7', 'SpecialState': '183', 'UseVisualEffect': '1'} | +| 6720 | 【大曲剣】HPドレイン_攻撃ヒット時 | {'EffectDuration': '0.5', 'HPPointsLost': '-7', 'SpecialState': '199', 'AffectedWeaponType': '3'} | +| 6860 | 【大竜牙】/物理防御力アップ | {'StatusIcon': '5002', 'EffectDuration': '-1.0', 'MagicDefenseAddition': '20', 'FireDefenseAddition': '20', 'SpecialEffe | +| 6950 | 【太陽虫】ライト | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '20', 'SpecialState': '147', 'AffectedWeaponType': '3', 'UseVisualEf | +| 6920 | 【子の仮面】スタミナ回復少しアップ | {'StatusIcon': '5001', 'EffectDuration': '-1.0', 'StaminaRecoverySpeedChange': '10', 'SpecialState': '75', 'AffectedWeap | +| 6930 | 【宵闇の頭冠】魔法鋭性 | {'StatusIcon': '5004', 'EffectDuration': '-1.0', 'PhysicalAttackPowerMultiplier': '1.2000000476837158', 'MagicAttackPowe | +| 6980 | 【死神の鎌】自分超出血 | {'EffectDuration': '2.0', 'UpdateInterval': '3.0', 'HPReductionPercentage': '50.0', 'BleedDamage': '40', 'SpecialEffectC | +| 6910 | 【母の仮面】HPわずかに増える | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '1.100000023841858', 'AffectedWeaponType': '3', 'CurrentHPIgnoresMaxHPChan | +| 6760 | 【毒矢】毒効果 | {'EffectDuration': '180.0', 'HPPointsLost': '3', 'PoisonDamage': '60', 'SpecialEffectCategory': '10004', 'AttackAttribut | +| 6970 | 【混沌の刃】自傷ダメージ | {'HPPointsLost': '20', 'AffectedWeaponType': '3'} | +| 6900 | 【父の仮面】装備重量少しアップ | {'EffectDuration': '-1.0', 'MaxEquipLoadMultiplier': '1.0499999523162842', 'AffectedWeaponType': '3'} | +| 6990 | 【肉切包丁】HPドレイン_攻撃ヒット時 | {'EffectDuration': '0.5', 'HPPointsLost': '-5', 'SpecialState': '199', 'AffectedWeaponType': '3'} | +| 6890 | 【草紋の盾】スタミナ回復アップ | {'StatusIcon': '5001', 'EffectDuration': '-1.0', 'StaminaRecoverySpeedChange': '10', 'SpecialEffectCategory': '10', 'Spe | +| 6750 | 【血の盾】出血&毒、猛毒、呪い耐性アップ | {'StatusIcon': '5003', 'EffectDuration': '-1.0', 'PoisonResistanceMultiplier': '1.5', 'ToxicResistanceMultiplier': '1.5' | +| 6960 | 【貪欲者の烙印】ソウル吸収量とアイテム発見率アップ | {'StatusIcon': '5008', 'EffectDuration': '-1.0', 'SoulsFromKillsMultiplier': '1.2000000476837158', 'SpecialEffectPerUpda | +| 6961 | 【貪欲者の烙印】逆リジェネ | {'EffectDuration': '0.5', 'HPPointsLost': '5', 'AffectedWeaponType': '3'} | +| 6940 | 【陰の太陽の王冠】すべての魔法を強化する | {'StatusIcon': '5004', 'EffectDuration': '-1.0', 'PhysicalAttackPowerMultiplier': '1.100000023841858', 'MagicAttackPower | +| 236 | 【QWC】エリア_グレイ_−1 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '0.949999988079071', 'AffectsMagic': '1', 'AffectsMiracles': '1'} | +| 237 | 【QWC】エリア_グレイ_−2 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '0.8999999761581421', 'AffectsMagic': '1', 'AffectsMiracles': '1'} | +| 231 | 【QWC】エリア_グレイ_+1 | {'EffectDuration': '-1.0', 'OutgoingPhysicalDamageMultiplier': '1.100000023841858', 'OutgoingMagicDamageMultiplier': '1. | +| 232 | 【QWC】エリア_グレイ_+2 | {'EffectDuration': '-1.0', 'OutgoingPhysicalDamageMultiplier': '1.2000000476837158', 'OutgoingMagicDamageMultiplier': '1 | +| 211 | 【QWC】エリア_ブラック_+1 | {'EffectDuration': '-1.0', 'OutgoingPhysicalDamageMultiplier': '1.100000023841858', 'OutgoingMagicDamageMultiplier': '1. | +| 212 | 【QWC】エリア_ブラック_+2 | {'EffectDuration': '-1.0', 'OutgoingPhysicalDamageMultiplier': '1.2000000476837158', 'OutgoingMagicDamageMultiplier': '1 | +| 221 | 【QWC】エリア_ホワイト_+1 | {'EffectDuration': '-1.0', 'OutgoingPhysicalDamageMultiplier': '1.100000023841858', 'OutgoingMagicDamageMultiplier': '1. | +| 222 | 【QWC】エリア_ホワイト_+2 | {'EffectDuration': '-1.0', 'OutgoingPhysicalDamageMultiplier': '1.2000000476837158', 'OutgoingMagicDamageMultiplier': '1 | +| 206 | 【QWC】エリア_NPC_−1 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '0.949999988079071', 'AffectsMagic': '1', 'AffectsMiracles': '1'} | +| 207 | 【QWC】エリア_NPC_−2 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '0.8999999761581421', 'AffectsMagic': '1', 'AffectsMiracles': '1'} | +| 208 | 【QWC】エリア_NPC_−3 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '0.800000011920929', 'AffectsMagic': '1', 'AffectsMiracles': '1'} | +| 201 | 【QWC】エリア_NPC_+1 | {'EffectDuration': '-1.0', 'OutgoingPhysicalDamageMultiplier': '1.2999999523162842', 'OutgoingMagicDamageMultiplier': '1 | +| 202 | 【QWC】エリア_NPC_+2 | {'EffectDuration': '-1.0', 'OutgoingPhysicalDamageMultiplier': '1.399999976158142', 'OutgoingMagicDamageMultiplier': '1. | +| 203 | 【QWC】エリア_NPC_+3 | {'EffectDuration': '-1.0', 'OutgoingPhysicalDamageMultiplier': '1.5', 'OutgoingMagicDamageMultiplier': '1.5', 'OutgoingF | +| 336 | 【QWC】プレイヤー_グレイ_−1 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '0.949999988079071', 'AffectsMagic': '1', 'AffectsMiracles': '1'} | +| 337 | 【QWC】プレイヤー_グレイ_−2 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '0.8999999761581421', 'AffectsMagic': '1', 'AffectsMiracles': '1'} | +| 331 | 【QWC】プレイヤー_グレイ_+1 | {'EffectDuration': '-1.0', 'OutgoingPhysicalDamageMultiplier': '1.100000023841858', 'OutgoingMagicDamageMultiplier': '1. | +| 332 | 【QWC】プレイヤー_グレイ_+2 | {'EffectDuration': '-1.0', 'OutgoingPhysicalDamageMultiplier': '1.2000000476837158', 'OutgoingMagicDamageMultiplier': '1 | +| 311 | 【QWC】プレイヤー_ブラック_+1 | {'EffectDuration': '-1.0', 'OutgoingPhysicalDamageMultiplier': '1.100000023841858', 'OutgoingMagicDamageMultiplier': '1. | +| 312 | 【QWC】プレイヤー_ブラック_+2 | {'EffectDuration': '-1.0', 'OutgoingPhysicalDamageMultiplier': '1.2000000476837158', 'OutgoingMagicDamageMultiplier': '1 | +| 321 | 【QWC】プレイヤー_ホワイト_+1 | {'EffectDuration': '-1.0', 'OutgoingPhysicalDamageMultiplier': '1.100000023841858', 'OutgoingMagicDamageMultiplier': '1. | +| 322 | 【QWC】プレイヤー_ホワイト_+2 | {'EffectDuration': '-1.0', 'OutgoingPhysicalDamageMultiplier': '1.2000000476837158', 'OutgoingMagicDamageMultiplier': '1 | +| 100 | かがり火回復効果1 | {'HPReductionPercentage': '-100.0', 'SpecialState': '50'} | +| 101 | かがり火回復効果2  | {'SpecialState': '13'} | +| 102 | かがり火回復効果3 | {'BleedDamage': '-99999', 'SpecialState': '6'} | +| 103 | かがり火回復効果4 | {'PoisonDamage': '-99999', 'SpecialState': '2'} | +| 104 | かがり火回復効果5 | {'ToxicDamage': '-99999', 'SpecialState': '5'} | +| 71111 | すべて有効 | {'EffectDuration': '-1.0'} | +| 81111 | すべて有効 | {'EffectDuration': '-1.0', 'EnableCharming': '1'} | +| 91111 | すべて有効 | {'EffectDuration': '-1.0'} | +| 71100 | すべて無効 | {'EffectDuration': '-1.0', 'IgnoreFakeTargets': '1', 'IgnoreUndeadFakeTargets': '1'} | +| 80000 | すべて無効 | {'EffectDuration': '-1.0'} | +| 90000 | すべて無効 | {'EffectDuration': '-1.0', 'PoisonImmunity': '1', 'ToxicImmunity': '1', 'BleedImmunity': '1', 'CurseImmunity': '1'} | +| 3130 | またたびA | {'EffectDuration': '5.0', 'TargetPriorityChange': '0.10000000149011612', 'SpecialState': '176'} | +| 3140 | またたびB | {'EffectDuration': '5.0', 'TargetPriorityChange': '0.10000000149011612', 'SpecialState': '177'} | +| 3955 | よく燃える松脂 | {'StatusIcon': '5004', 'EffectDuration': '30.0', 'FireAttackPowerAddition': '150', 'SpecialEffectCategory': '10000', 'El | +| 2100 | アイテムドロップアップ | {'StatusIcon': '5008', 'EffectDuration': '-1.0', 'SpecialState': '66'} | +| 1720 | アイテム探知魔法 | {'EffectDuration': '-1.0', 'SpecialState': '98'} | +| 600 | アンチマジック | {'StatusIcon': '5003', 'EffectDuration': '0.6000000238418579', 'SpecialEffectCategory': '20', 'SpecialState': '24', 'Use | +| 611 | アンチマジック(使用者用)【エフェクト】 | {'EffectDuration': '30.0', 'SpecialState': '201', 'UseVisualEffect': '1'} | +| 610 | アンチマジック(使用者用)【効果】 | {'StatusIcon': '5003', 'EffectDuration': '30.0', 'SpecialEffectCategory': '10001', 'SpecialState': '24', 'UseVisualEffec | +| 1060 | インビジブルウェポン | {'EffectDuration': '60.0', 'SpecialEffectCategory': '10000', 'SpecialState': '184', 'AffectedWeaponType': '1', 'UseVisua | +| 3020 | エスト【HP】LV1 | {'HPPointsLost': '-300'} | +| 3030 | エスト【HP】LV1_味方クライアント用 | {'HPPointsLost': '-150'} | +| 3021 | エスト【HP】LV2 | {'HPPointsLost': '-400'} | +| 3031 | エスト【HP】LV2_味方クライアント用 | {'HPPointsLost': '-200'} | +| 3022 | エスト【HP】LV3 | {'HPPointsLost': '-500'} | +| 3032 | エスト【HP】LV3_味方クライアント用 | {'HPPointsLost': '-250'} | +| 3023 | エスト【HP】LV4 | {'HPPointsLost': '-600'} | +| 3033 | エスト【HP】LV4_味方クライアント用 | {'HPPointsLost': '-300'} | +| 3024 | エスト【HP】LV5 | {'HPPointsLost': '-650'} | +| 3034 | エスト【HP】LV5_味方クライアント用 | {'HPPointsLost': '-325'} | +| 3025 | エスト【HP】LV6 | {'HPPointsLost': '-700'} | +| 3035 | エスト【HP】LV6_味方クライアント用 | {'HPPointsLost': '-350'} | +| 3026 | エスト【HP】LV7 | {'HPPointsLost': '-750'} | +| 3036 | エスト【HP】LV7_味方クライアント用 | {'HPPointsLost': '-375'} | +| 3027 | エスト【HP】LV8 | {'HPPointsLost': '-800'} | +| 3037 | エスト【HP】LV8_味方クライアント用 | {'HPPointsLost': '-400'} | +| 3151 | エスト使用不可【エスト使用不可】 | {'StatusIcon': '5018', 'EffectDuration': '25.0', 'SpecialEffectCategory': '20', 'SpecialState': '154', 'UseVisualEffect' | +| 3150 | エスト使用不可【ミミック睡眠】 | {'EffectDuration': '25.0', 'SpecialEffectCategory': '20', 'SpecialState': '127'} | +| 31 | カウンターダメージ【刺突】 | {'EffectDuration': '0.10000000149011612', 'IncomingThrustDamageMultiplier': '1.2000000476837158', 'SpecialState': '110'} | +| 2260 | カウンター強化 | {'StatusIcon': '5000', 'EffectDuration': '-1.0', 'OutgoingPhysicalDamageMultiplier': '1.399999976158142', 'SpecialState' | +| 5105 | カエルエイ モーションチェンジ | {'EffectDuration': '-1.0', 'AnimationIDOffset': '10000', 'SpecialState': '122'} | +| 5444 | カゲロウ龍 HP回復 | {'UpdateInterval': '0.20000000298023224', 'HPReductionPercentage': '-0.10000000149011612'} | +| 5500 | カゲロウ龍 ホストを優先する | {'EffectDuration': '-1.0', 'TargetPriorityChange': '10.0', 'ThrowCondition': '3'} | +| 3964 | カミサマDS | {'SoulAmountChange': '7600'} | +| 5032 | カミサマ魔方陣_金縛り | {'EffectDuration': '3.0', 'SpecialState': '32', 'UseVisualEffect': '1'} | +| 2993 | カラテカ | {'StatusIcon': '5010', 'EffectDuration': '-1.0'} | +| 5490 | ガーゴイル2体目用 HP半分 | {'HPReductionPercentage': '52.0'} | +| 3965 | キメラDS | {'SoulAmountChange': '19600'} | +| 5013 | キメラ強化 | {'EffectDuration': '25.0', 'MaxStaminaMultiplier': '3.0', 'OutgoingPhysicalDamageMultiplier': '1.7000000476837158', 'Out | +| 4140 | クラーナのテリトリに入っている | {'EffectDuration': '2.0', 'EnemySightPercentageReduction': '100', 'EnemyHearingPercentageReduction': '100', 'ThrowCondit | +| 500 | グラビティ | {'StatusIcon': '5010', 'EffectDuration': '0.6000000238418579', 'SpecialEffectCategory': '20', 'SpecialState': '102', 'Us | +| 510 | グラビティ(使用者用) | {'StatusIcon': '5010', 'EffectDuration': '10.0', 'SpecialEffectCategory': '10001', 'SpecialState': '9', 'UseVisualEffect | +| 4014 | ゴロゴロ砲弾 ドーピング | {'EffectDuration': '-1.0', 'HPReductionPercentage': '100.0'} | +| 1981 | ゴーストカムフラージュ | {'EffectDuration': '30.0', 'EnemySightPercentageReduction': '80', 'EnemyHearingPercentageReduction': '90', 'SpecialEffec | +| 5010 | ゴールドラン強化 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '1.2000000476837158', 'MaxMPMultiplier': '3.0', 'MaxStaminaMultiplier': '5 | +| 3313 | ゴーレムのソウル | {'SoulAmountChange': '12000'} | +| 540 | サイレンス | {'StatusIcon': '5009', 'EffectDuration': '30.0', 'EnemyHearingPercentageReduction': '100', 'SpecialEffectCategory': '100 | +| 5295 | シース用着弾結晶呪いダメージ | {'CurseDamage': '2', 'NextSpecialEffect': '34', 'AttackAttribute': '4', 'ElementAttribute': '8', 'SpecialState': '116', | +| 5296 | シース用自己中心爆発用結晶呪いダメージ | {'CurseDamage': '4', 'NextSpecialEffect': '34', 'AttackAttribute': '4', 'ElementAttribute': '8', 'SpecialState': '116', | +| 5451 | スケルトン 不死状態 | {'EffectDuration': '-1.0', 'SpecialState': '143'} | +| 5452 | スケルトン 仮死状態 | {'EffectDuration': '5.0', 'SpecialState': '144'} | +| 5450 | スケルトン 仮死状態から復活 | {'HPReductionPercentage': '-100.0'} | +| 2013 | スタミナ回復アップ | {'StatusIcon': '5001', 'EffectDuration': '-1.0', 'StaminaRecoverySpeedChange': '20', 'SpecialState': '75', 'UseVisualEff | +| 6210 | スタミナ回復ダウン_胴_レベル1 | {'EffectDuration': '-1.0', 'StaminaRecoverySpeedChange': '-1', 'SpecialEffectCategory': '10'} | +| 6211 | スタミナ回復ダウン_胴_レベル2 | {'EffectDuration': '-1.0', 'StaminaRecoverySpeedChange': '-2', 'SpecialEffectCategory': '10'} | +| 6212 | スタミナ回復ダウン_胴_レベル3 | {'EffectDuration': '-1.0', 'StaminaRecoverySpeedChange': '-3', 'SpecialEffectCategory': '10'} | +| 6213 | スタミナ回復ダウン_胴_レベル4 | {'EffectDuration': '-1.0', 'StaminaRecoverySpeedChange': '-4', 'SpecialEffectCategory': '10'} | +| 6230 | スタミナ回復ダウン_脚_レベル1 | {'EffectDuration': '-1.0', 'StaminaRecoverySpeedChange': '-1', 'SpecialEffectCategory': '10'} | +| 6231 | スタミナ回復ダウン_脚_レベル2 | {'EffectDuration': '-1.0', 'StaminaRecoverySpeedChange': '-1', 'SpecialEffectCategory': '10'} | +| 6232 | スタミナ回復ダウン_脚_レベル3 | {'EffectDuration': '-1.0', 'StaminaRecoverySpeedChange': '-2', 'SpecialEffectCategory': '10'} | +| 6233 | スタミナ回復ダウン_脚_レベル4 | {'EffectDuration': '-1.0', 'StaminaRecoverySpeedChange': '-2', 'SpecialEffectCategory': '10'} | +| 6220 | スタミナ回復ダウン_腕_レベル1 | {'EffectDuration': '-1.0', 'StaminaRecoverySpeedChange': '-1', 'SpecialEffectCategory': '10'} | +| 6221 | スタミナ回復ダウン_腕_レベル2 | {'EffectDuration': '-1.0', 'StaminaRecoverySpeedChange': '-1', 'SpecialEffectCategory': '10'} | +| 6222 | スタミナ回復ダウン_腕_レベル3 | {'EffectDuration': '-1.0', 'StaminaRecoverySpeedChange': '-2', 'SpecialEffectCategory': '10'} | +| 6223 | スタミナ回復ダウン_腕_レベル4 | {'EffectDuration': '-1.0', 'StaminaRecoverySpeedChange': '-2', 'SpecialEffectCategory': '10'} | +| 6200 | スタミナ回復ダウン_頭_レベル1 | {'EffectDuration': '-1.0', 'StaminaRecoverySpeedChange': '-1', 'SpecialEffectCategory': '10'} | +| 6201 | スタミナ回復ダウン_頭_レベル2 | {'EffectDuration': '-1.0', 'StaminaRecoverySpeedChange': '-1', 'SpecialEffectCategory': '10'} | +| 6202 | スタミナ回復ダウン_頭_レベル3 | {'EffectDuration': '-1.0', 'StaminaRecoverySpeedChange': '-1', 'SpecialEffectCategory': '10'} | +| 6203 | スタミナ回復ダウン_頭_レベル4 | {'EffectDuration': '-1.0', 'StaminaRecoverySpeedChange': '-2', 'SpecialEffectCategory': '10'} | +| 3040 | スタミナ草 | {'StatusIcon': '5001', 'EffectDuration': '60.0', 'StaminaRecoverySpeedChange': '40', 'SpecialEffectCategory': '10001', ' | +| 6300 | スーパーアーマー | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '10', 'ReplaceSmallImpactLevel': '1 | +| 5230 | ゼリーまみれ | {'EffectDuration': '15.0', 'UpdateInterval': '0.8999999761581421', 'HPReductionPercentage': '2.0', 'StaminaReductionPerc | +| 3270 | ソウル1 | {'SoulAmountChange': '200'} | +| 3279 | ソウル10 | {'SoulAmountChange': '20000'} | +| 3271 | ソウル2 | {'SoulAmountChange': '400'} | +| 3272 | ソウル3 | {'SoulAmountChange': '800'} | +| 3273 | ソウル4 | {'SoulAmountChange': '1000'} | +| 3274 | ソウル5 | {'SoulAmountChange': '2000'} | +| 3275 | ソウル6 | {'SoulAmountChange': '3000'} | +| 3276 | ソウル7 | {'SoulAmountChange': '5000'} | +| 3277 | ソウル8 | {'SoulAmountChange': '8000'} | +| 3278 | ソウル9 | {'SoulAmountChange': '10000'} | +| 5035 | ソウルの名残 無効 | {'EffectDuration': '-1.0'} | +| 5043 | ソウルスティール 無効 | {'EffectDuration': '-1.0'} | +| 1600 | ソウルドレイン1【AI】 | {'SpecialState': '14', 'UseVisualEffect': '1'} | +| 1610 | ソウルドレイン1【PC】 | {'SpecialState': '14', 'UseVisualEffect': '1'} | +| 1620 | ソウルドレイン2【AI】 | {'SpecialState': '14', 'UseVisualEffect': '1'} | +| 1630 | ソウルドレイン2【PC】 | {'SpecialState': '14', 'UseVisualEffect': '1'} | +| 37 | ソウルドレイン投げ状態(投げ条件) | {'EffectDuration': '0.10000000149011612', 'ThrowCondition': '6'} | +| 7100 | ソウルブラック | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '2.0', 'PhysicalAttackPowerMultiplier': '1.7999999523162842', 'MagicAttack | +| 3226 | ダークリング | {'HumanityDamage': '99', 'SpecialState': '16', 'ClearSoul': '1'} | +| 5233 | ダークレイス 吸魂効果 | {'HumanityDamage': '1', 'SpecialState': '119'} | +| 5492 | チュートリアルNPC 瀕死 | {'HPReductionPercentage': '99.9000015258789'} | +| 1210 | デスクラウド用の猛毒 | {'EffectDuration': '600.0', 'UpdateInterval': '1.0199999809265137', 'HPPointsLost': '6', 'StaminaRecoverySpeedChange': ' | +| 3974 | デブデーモンDS | {'SoulAmountChange': '1500'} | +| 3972 | ドラゴンデーモンDS | {'SoulAmountChange': '26400'} | +| 5084 | ドラン強化用 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '1.5', 'IncomingMagicDamageMultiplier': '0.5', 'IncomingFireDamageMultipli | +| 5042 | ドラン逆ドーピング用 | {'EffectDuration': '-1.0', 'OutgoingPhysicalDamageMultiplier': '0.30000001192092896', 'OutgoingMagicDamageMultiplier': ' | +| 5026 | ナメクジ_毒粘液 | {'EffectDuration': '180.0', 'HPPointsLost': '10', 'PoisonDamage': '35', 'SpecialEffectCategory': '10004', 'AttackAttribu | +| 5220 | バジリスク石化効果(ブレス) | {'CurseDamage': '20', 'NextSpecialEffect': '33', 'AttackAttribute': '4', 'ElementAttribute': '7', 'SpecialState': '116', | +| 5221 | バジリスク石化効果(弾) | {'CurseDamage': '9', 'NextSpecialEffect': '33', 'AttackAttribute': '4', 'ElementAttribute': '7', 'SpecialState': '116', | +| 5222 | バジリスク石化効果(煙) | {'CurseDamage': '10', 'NextSpecialEffect': '33', 'AttackAttribute': '4', 'ElementAttribute': '7', 'SpecialState': '116', | +| 3978 | バッドエンドDS | {'SoulAmountChange': '200000'} | +| 30 | パリィ崩され状態(投げ条件) | {'EffectDuration': '0.10000000149011612', 'ThrowCondition': '2'} | +| 3973 | ヒロインDS | {'SoulAmountChange': '60000'} | +| 550 | ヒント血文字 | {'StatusIcon': '5003', 'EffectDuration': '30.0', 'SpecialEffectCategory': '10001', 'SpecialState': '133', 'UseVisualEffe | +| 2010 | ピンチ攻撃力アップ | {'StatusIcon': '5005', 'MaxHPPercentageForEffect': '20.0', 'EffectDuration': '-1.0', 'PhysicalAttackPowerMultiplier': '1 | +| 2290 | ピンチ防御力アップ | {'StatusIcon': '5005', 'MaxHPPercentageForEffect': '20.0', 'EffectDuration': '-1.0', 'PhysicalDefenseMultiplier': '1.5', | +| 2981 | ピンチ防御力アップ | {'MaxHPPercentageForEffect': '20.0', 'EffectDuration': '-1.0', 'PhysicalDefenseMultiplier': '1.5', 'MagicDefenseMultipli | +| 3957 | ファランクスDS | {'SoulAmountChange': '1520'} | +| 5012 | ファランクス もっとチビ張り付きドーピング | {'EffectDuration': '3.0', 'IncomingMagicDamageMultiplier': '0.25', 'IncomingFireDamageMultiplier': '0.25', 'HPReductionP | +| 5011 | ファランクス チビ張り付きドーピング | {'EffectDuration': '3.0', 'IncomingMagicDamageMultiplier': '0.5', 'IncomingFireDamageMultiplier': '0.5', 'HPReductionPer | +| 5066 | ファランクス・チビ 張り付きドーピング | {'EffectDuration': '-1.0', 'UpdateInterval': '4.0', 'HPReductionPercentage': '-20.0'} | +| 2991 | フェロモン | {'EffectDuration': '-1.0', 'TargetPriorityChange': '0.10000000149011612', 'SpecialState': '46'} | +| 640 | フォーリングコントロール | {'StatusIcon': '5001', 'EffectDuration': '45.0', 'SpecialEffectCategory': '10001', 'SpecialState': '47', 'UseVisualEffec | +| 2984 | ブラック希望 | {'EffectDuration': '-1.0', 'IncomingMagicDamageMultiplier': '0.8999999761581421', 'IncomingFireDamageMultiplier': '0.899 | +| 5410 | プリンスイザリス モーションチェンジ(デフォルト) | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '100'} | +| 5412 | プリンスイザリス モーションチェンジ(上向き崖) | {'EffectDuration': '-1.0', 'AnimationIDOffset': '20000', 'SpecialEffectCategory': '100'} | +| 5411 | プリンスイザリス モーションチェンジ(上向き) | {'EffectDuration': '-1.0', 'AnimationIDOffset': '10000', 'SpecialEffectCategory': '100'} | +| 5413 | プリンスイザリス モーションチェンジ(下向き) | {'EffectDuration': '-1.0', 'AnimationIDOffset': '30000', 'SpecialEffectCategory': '100'} | +| 32 | プレイヤが落下中(投げ条件) | {'EffectDuration': '0.10000000149011612', 'ThrowCondition': '4'} | +| 5447 | ヘルカイト HP回復 | {'UpdateInterval': '0.20000000298023224', 'HPReductionPercentage': '-0.8999999761581421'} | +| 3299 | ベイグラントソウル10 | {'SoulAmountChange': '30000'} | +| 3300 | ベイグラントソウル11 | {'SoulAmountChange': '50000'} | +| 3292 | ベイグラントソウル3 | {'SoulAmountChange': '800'} | +| 3293 | ベイグラントソウル4 | {'SoulAmountChange': '1000'} | +| 3294 | ベイグラントソウル5 | {'SoulAmountChange': '2000'} | +| 3295 | ベイグラントソウル6 | {'SoulAmountChange': '4000'} | +| 3296 | ベイグラントソウル7 | {'SoulAmountChange': '8000'} | +| 3297 | ベイグラントソウル8 | {'SoulAmountChange': '10000'} | +| 3298 | ベイグラントソウル9 | {'SoulAmountChange': '20000'} | +| 3290 | ベイグラント人間性1 | {'HPReductionPercentage': '-100.0', 'HumanityDamage': '-1', 'SpecialState': '119'} | +| 3291 | ベイグラント人間性2 | {'HPReductionPercentage': '-100.0', 'HumanityDamage': '-2', 'SpecialState': '119'} | +| 2983 | ホワイト希望 | {'EffectDuration': '-1.0', 'IncomingMagicDamageMultiplier': '0.8999999761581421', 'IncomingFireDamageMultiplier': '0.899 | +| 1200 | ポイズンクラウド用の毒 | {'EffectDuration': '180.0', 'UpdateInterval': '0.800000011920929', 'HPPointsLost': '3', 'PoisonDamage': '10', 'SpecialEf | +| 5210 | ポリポリ潜伏期間 | {'EffectDuration': '120.0', 'NextSpecialEffect': '5211', 'SaveCategory': '3', 'SpecialState': '111'} | +| 5211 | ポリポリ状態 | {'EffectDuration': '200.0', 'UpdateInterval': '10.0', 'NextSpecialEffect': '5212', 'SaveCategory': '3', 'SpecialState': | +| 3950 | ポーションA | {'HPPointsLost': '-120'} | +| 3951 | ポーションC | {'HPPointsLost': '-400'} | +| 3952 | ポーションD | {'HPPointsLost': '-600'} | +| 7500 | マルチドーピング_ホワイト一人 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '1.5', 'PoisonResistanceMultiplier': '1.5', 'ToxicResistanceMultiplier': ' | +| 7502 | マルチドーピング_ホワイト三人 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '2.5999999046325684', 'PoisonResistanceMultiplier': '2.5999999046325684', | +| 7501 | マルチドーピング_ホワイト二人 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '2.0', 'PoisonResistanceMultiplier': '2.0', 'ToxicResistanceMultiplier': ' | +| 5421 | ミミック 擬態状態 | {'EffectDuration': '-1.0', 'AnimationIDOffset': '10000', 'SpecialEffectCategory': '100', 'SpecialState': '128'} | +| 5422 | ミミック 擬態眠り状態 | {'EffectDuration': '-1.0', 'AnimationIDOffset': '20000', 'SpecialEffectCategory': '100', 'SpecialState': '129'} | +| 5420 | ミミック 通常状態 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '100', 'SpecialState': '130'} | +| 5424 | ミミック 通常眠り始め状態 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '100', 'SpecialState': '135'} | +| 5423 | ミミック 通常眠り状態 | {'EffectDuration': '-1.0', 'AnimationIDOffset': '30000', 'SpecialEffectCategory': '100', 'SpecialState': '131'} | +| 5023 | ムカデ_腐食攻撃 | {'CurrentDurabilityAddition': '70', 'AttackAttribute': '4', 'ElementAttribute': '4', 'SpecialState': '4', 'AffectedWeapo | +| 620 | ライト | {'EffectDuration': '300.0', 'SpecialEffectCategory': '20', 'SpecialState': '147', 'UseVisualEffect': '1', 'AffectedByEff | +| 570 | リジェネレイト | {'StatusIcon': '5001', 'EffectDuration': '60.0', 'HPPointsLost': '-10', 'SpecialEffectCategory': '10001', 'SpecialState' | +| 571 | リジェネレイト_共鳴LV1 | {'StatusIcon': '5001', 'EffectDuration': '60.0', 'HPPointsLost': '-12', 'SpecialEffectCategory': '10001', 'SpecialState' | +| 572 | リジェネレイト_共鳴LV2 | {'StatusIcon': '5001', 'EffectDuration': '60.0', 'HPPointsLost': '-14', 'SpecialEffectCategory': '10001', 'SpecialState' | +| 573 | リジェネレイト_共鳴LV3 | {'StatusIcon': '5001', 'EffectDuration': '60.0', 'HPPointsLost': '-16', 'SpecialEffectCategory': '10001', 'SpecialState' | +| 574 | リジェネレイト_共鳴LV4 | {'StatusIcon': '5001', 'EffectDuration': '60.0', 'HPPointsLost': '-20', 'SpecialEffectCategory': '10001', 'SpecialState' | +| 110 | リスポン回復効果1 | {'HPReductionPercentage': '-100.0', 'MPReductionPercentage': '-100.0', 'StaminaReductionPercentage': '-100.0'} | +| 111 | リスポン回復効果2 | {'SpecialState': '13'} | +| 112 | リスポン回復効果3 | {'BleedDamage': '-99999', 'SpecialEffectCategory': '10003', 'SpecialState': '6'} | +| 113 | リスポン回復効果4 | {'PoisonDamage': '-99999', 'SpecialEffectCategory': '10004', 'SpecialState': '2'} | +| 114 | リスポン回復効果5 | {'ToxicDamage': '-99999', 'SpecialEffectCategory': '10005', 'SpecialState': '5'} | +| 115 | リスポン回復効果6 | {'CurseDamage': '-99999', 'SpecialState': '118'} | +| 116 | リスポン回復効果7 | {'CurseDamage': '-99999', 'SpecialState': '116'} | +| 3969 | リーブラDS | {'SoulAmountChange': '48000'} | +| 5083 | リーブラ 回復 | {'EffectDuration': '5.0', 'UpdateInterval': '0.10000000149011612', 'HPPointsLost': '-13'} | +| 7001 | レベル1 | {'EffectDuration': '-1.0', 'AffectsMagic': '1', 'AffectsMiracles': '1'} | +| 7010 | レベル10 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '2.0999999046325684', 'MaxStaminaMultiplier': '1.7000000476837158', 'Physi | +| 7011 | レベル11 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '2.200000047683716', 'MaxStaminaMultiplier': '1.7999999523162842', 'Physic | +| 7012 | レベル12 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '2.299999952316284', 'MaxStaminaMultiplier': '1.899999976158142', 'Physica | +| 7013 | レベル13 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '2.4000000953674316', 'MaxStaminaMultiplier': '2.0', 'PhysicalAttackPowerM | +| 7014 | レベル14 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '2.5', 'MaxStaminaMultiplier': '2.0999999046325684', 'PhysicalAttackPowerM | +| 7015 | レベル15 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '2.700000047683716', 'MaxStaminaMultiplier': '2.200000047683716', 'Physica | +| 7002 | レベル2 | {'EffectDuration': '-1.0', 'MaxStaminaMultiplier': '1.0499999523162842', 'PhysicalAttackPowerMultiplier': '1.125', 'Magi | +| 7003 | レベル3 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '1.2000000476837158', 'MaxStaminaMultiplier': '1.100000023841858', 'Physic | +| 7004 | レベル4 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '1.399999976158142', 'MaxStaminaMultiplier': '1.149999976158142', 'Physica | +| 7005 | レベル5 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '1.5', 'MaxStaminaMultiplier': '1.2000000476837158', 'PhysicalAttackPowerM | +| 7006 | レベル6 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '1.600000023841858', 'MaxStaminaMultiplier': '1.2999999523162842', 'Physic | +| 7007 | レベル7 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '1.7000000476837158', 'MaxStaminaMultiplier': '1.399999976158142', 'Physic | +| 7008 | レベル8 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '1.7999999523162842', 'MaxStaminaMultiplier': '1.5', 'PhysicalAttackPowerM | +| 7009 | レベル9 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '2.0', 'MaxStaminaMultiplier': '1.600000023841858', 'PhysicalAttackPowerMu | +| 3960 | レンドルDS | {'SoulAmountChange': '60000'} | +| 5031 | レンドル王専用ソウルスティール | {'SpecialState': '14', 'UseVisualEffect': '1'} | +| 5493 | ロートレクのお供用フォーリングコントロール | {'StatusIcon': '5001', 'EffectDuration': '-1.0', 'SpecialEffectCategory': '10001', 'SpecialState': '47', 'UseVisualEffec | +| 5018 | 一般兵士 回復アイテムを使う | {'HPPointsLost': '-50'} | +| 5104 | 一般兵士 回復アイテムを使う | {'HPPointsLost': '-50'} | +| 1301 | 万能治療【出血耐性回復】 | {'BleedDamage': '-99999', 'SpecialState': '6'} | +| 1302 | 万能治療【毒耐性回復】 | {'PoisonDamage': '-99999', 'SpecialState': '2'} | +| 1300 | 万能治療【状態回復】 | {'SpecialState': '13'} | +| 3080 | 万能治療【状態回復】 | {'SpecialState': '13'} | +| 1303 | 万能治療【猛毒耐性回復】 | {'ToxicDamage': '-99999', 'SpecialState': '5'} | +| 5231 | 不死人(蓑虫) 吹き矢専用毒 | {'EffectDuration': '180.0', 'UpdateInterval': '0.6000000238418579', 'HPPointsLost': '14', 'StaminaRecoverySpeedChange': | +| 71110 | 不死系無効 | {'EffectDuration': '-1.0', 'IgnoreUndeadFakeTargets': '1'} | +| 2977 | 両手威力アップ | {'StatusIcon': '5000', 'EffectDuration': '-1.0'} | +| 3231 | 人間性回復 | {'HPReductionPercentage': '-100.0', 'HumanityDamage': '-1', 'SpecialState': '119'} | +| 3330 | 人間性回復 | {'HPReductionPercentage': '-100.0', 'HumanityDamage': '-5', 'SpecialState': '119'} | +| 1990 | 他者回復_状態異常回復 | {'SpecialState': '13'} | +| 1980 | 他者回復_HP回復 | {'EffectDuration': '3.0', 'UpdateInterval': '4.0', 'HPReductionPercentage': '-100.0', 'SpecialState': '42', 'UseVisualEf | +| 3956 | 光の石 | {'StatusIcon': '5004', 'EffectDuration': '60.0', 'MagicAttackPowerAddition': '110', 'SpecialEffectCategory': '10000', 'E | +| 2024 | 全耐性アップ1 | {'StatusIcon': '5002', 'EffectDuration': '-1.0', 'MagicDefenseAddition': '25', 'FireDefenseAddition': '25', 'LightningDe | +| 2997 | 全耐性アップ2 | {'StatusIcon': '5003', 'EffectDuration': '-1.0', 'PoisonResistanceMultiplier': '2.0', 'ToxicResistanceMultiplier': '2.0' | +| 2140 | 共鳴 | {'StatusIcon': '5004', 'EffectDuration': '-1.0', 'SpecialState': '169'} | +| 41 | 共鳴Lv1 | {'EffectDuration': '4.0', 'SpecialEffectCategory': '110', 'SpecialState': '138'} | +| 42 | 共鳴Lv2 | {'EffectDuration': '4.0', 'SpecialEffectCategory': '110', 'SpecialState': '139'} | +| 43 | 共鳴Lv3 | {'EffectDuration': '4.0', 'SpecialEffectCategory': '110', 'SpecialState': '140'} | +| 44 | 共鳴Lv4 | {'EffectDuration': '4.0', 'SpecialEffectCategory': '110', 'SpecialState': '141'} | +| 40 | 共鳴なし | {'SpecialEffectCategory': '110', 'SpecialState': '137'} | +| 3316 | 処刑者スモウのソウル | {'SoulAmountChange': '12000'} | +| 6400 | 出血_1 | {'EffectDuration': '2.0', 'UpdateInterval': '3.0', 'HPReductionPercentage': '30.0', 'BleedDamage': '30', 'SpecialEffectC | +| 6401 | 出血_2 | {'EffectDuration': '2.0', 'UpdateInterval': '3.0', 'HPReductionPercentage': '30.0', 'BleedDamage': '33', 'SpecialEffectC | +| 6402 | 出血_3 | {'EffectDuration': '2.0', 'UpdateInterval': '3.0', 'HPReductionPercentage': '30.0', 'BleedDamage': '36', 'SpecialEffectC | +| 6403 | 出血_4 | {'EffectDuration': '2.0', 'UpdateInterval': '3.0', 'HPReductionPercentage': '30.0', 'BleedDamage': '39', 'SpecialEffectC | +| 6404 | 出血_5 | {'EffectDuration': '2.0', 'UpdateInterval': '3.0', 'HPReductionPercentage': '30.0', 'BleedDamage': '42', 'SpecialEffectC | +| 6405 | 出血_6 | {'EffectDuration': '2.0', 'UpdateInterval': '3.0', 'HPReductionPercentage': '30.0', 'BleedDamage': '45', 'SpecialEffectC | +| 5279 | 出血ダメージ 大出血 | {'EffectDuration': '2.0', 'UpdateInterval': '3.0', 'HPReductionPercentage': '60.0', 'BleedDamage': '80', 'SpecialEffectC | +| 5151 | 出血ダメージ軽減(暫定) | {'EffectDuration': '-1.0', 'IncomingBleedDamagePercentage': '30'} | +| 5270 | 出血ダメージ1 | {'EffectDuration': '2.0', 'UpdateInterval': '3.0', 'HPReductionPercentage': '17.0', 'BleedDamage': '30', 'SpecialEffectC | +| 5271 | 出血ダメージ2 | {'EffectDuration': '2.0', 'UpdateInterval': '3.0', 'HPReductionPercentage': '22.0', 'BleedDamage': '33', 'SpecialEffectC | +| 5272 | 出血ダメージ3 | {'EffectDuration': '2.0', 'UpdateInterval': '3.0', 'HPReductionPercentage': '27.0', 'BleedDamage': '36', 'SpecialEffectC | +| 5273 | 出血ダメージ4 | {'EffectDuration': '2.0', 'UpdateInterval': '3.0', 'HPReductionPercentage': '32.0', 'BleedDamage': '39', 'SpecialEffectC | +| 5274 | 出血ダメージ5 | {'EffectDuration': '2.0', 'UpdateInterval': '3.0', 'HPReductionPercentage': '42.0', 'BleedDamage': '42', 'SpecialEffectC | +| 5275 | 出血ダメージ6 | {'EffectDuration': '2.0', 'UpdateInterval': '3.0', 'HPReductionPercentage': '68.0', 'BleedDamage': '45', 'SpecialEffectC | +| 5024 | 出血攻撃 (耐性弱・効果弱) | {'EffectDuration': '2.0', 'UpdateInterval': '3.0', 'HPReductionPercentage': '15.0', 'BleedDamage': '30', 'SpecialEffectC | +| 5025 | 出血攻撃 (耐性強・効果強) | {'EffectDuration': '2.0', 'UpdateInterval': '3.0', 'HPReductionPercentage': '30.0', 'BleedDamage': '30', 'SpecialEffectC | +| 3050 | 出血治療【状態回復】 | {'SpecialState': '12'} | +| 3051 | 出血治療【耐性回復】 | {'BleedDamage': '-99999', 'SpecialState': '6'} | +| 5054 | 出血無効 | {'EffectDuration': '-1.0', 'BleedImmunity': '1'} | +| 91011 | 出血無効 | {'EffectDuration': '-1.0', 'ToxicImmunity': '1'} | +| 2030 | 出血耐性 | {'StatusIcon': '5003', 'EffectDuration': '-1.0', 'BleedResistanceMultiplier': '4.0'} | +| 91010 | 出血&呪い無効 | {'EffectDuration': '-1.0', 'ToxicImmunity': '1', 'CurseImmunity': '1'} | +| 5058 | 出血&疫病無効 | {'EffectDuration': '-1.0', 'ToxicImmunity': '1', 'BleedImmunity': '1'} | +| 91001 | 出血&疫病無効 | {'EffectDuration': '-1.0', 'ToxicImmunity': '1', 'BleedImmunity': '1'} | +| 91000 | 出血&疫病&呪い無効 | {'EffectDuration': '-1.0', 'ToxicImmunity': '1', 'BleedImmunity': '1', 'CurseImmunity': '1'} | +| 2120 | 剛脚 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1000', 'SpecialEffectPriority': '3'} | +| 3317 | 半竜プリシラのソウル | {'SoulAmountChange': '12000'} | +| 59 | 協力Lv1 | {'EffectDuration': '-1.0', 'SpecialState': '105', 'UseVisualEffect': '1', 'EnableLifeTime': '1'} | +| 60 | 協力Lv2 | {'EffectDuration': '-1.0', 'SpecialState': '106', 'UseVisualEffect': '1', 'EnableLifeTime': '1'} | +| 61 | 協力Lv3 | {'EffectDuration': '-1.0', 'SpecialState': '107', 'UseVisualEffect': '1', 'EnableLifeTime': '1'} | +| 62 | 協力待ち解除 | {'SpecialState': '104'} | +| 3091 | 卵治療 | {'SpecialState': '198'} | +| 5213 | 卵頭 | {'EffectDuration': '-1.0', 'SoulsFromKillsMultiplier': '0.5', 'SpecialEffectCategory': '1', 'SaveCategory': '3', 'Specia | +| 5214 | 卵頭_第二段階 | {'EffectDuration': '-1.0', 'SoulsFromKillsMultiplier': '0.5', 'SpecialEffectCategory': '1', 'SaveCategory': '3', 'Specia | +| 5212 | 卵頭スタンバイ | {'EffectDuration': '-1.0', 'NextSpecialEffect': '5213', 'SaveCategory': '3', 'SpecialState': '113'} | +| 2101 | 取得ソウルアップ | {'StatusIcon': '5008', 'EffectDuration': '-1.0', 'SoulsFromKillsMultiplier': '1.2000000476837158', 'SpecialState': '76'} | +| 80111 | 名残無効 | {'EffectDuration': '-1.0', 'EnableCharming': '1'} | +| 80011 | 名残&吸魂無効 | {'EffectDuration': '-1.0', 'EnableCharming': '1'} | +| 80101 | 名残&魅了無効 | {'EffectDuration': '-1.0'} | +| 81011 | 吸魂無効 | {'EffectDuration': '-1.0', 'EnableCharming': '1'} | +| 81001 | 吸魂&魅了無効 | {'EffectDuration': '-1.0'} | +| 7401 | 周回パワーアップ_ レベル1 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '2.700000047683716', 'MaxMPMultiplier': '1.5', 'MaxStaminaMultiplier': '2. | +| 7410 | 周回パワーアップ_ レベル10 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '1.75', 'MaxMPMultiplier': '1.5', 'MaxStaminaMultiplier': '1.4299999475479 | +| 7411 | 周回パワーアップ_ レベル11 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '1.690000057220459', 'MaxMPMultiplier': '1.5', 'MaxStaminaMultiplier': '1. | +| 7412 | 周回パワーアップ_ レベル12 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '1.6399999856948853', 'MaxMPMultiplier': '1.5', 'MaxStaminaMultiplier': '1 | +| 7413 | 周回パワーアップ_ レベル13 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '1.600000023841858', 'MaxMPMultiplier': '1.5', 'MaxStaminaMultiplier': '1. | +| 7414 | 周回パワーアップ_ レベル14 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '1.5700000524520874', 'MaxMPMultiplier': '1.5', 'MaxStaminaMultiplier': '1 | +| 7415 | 周回パワーアップ_ レベル15 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '1.5399999618530273', 'MaxMPMultiplier': '1.5', 'MaxStaminaMultiplier': '1 | +| 7402 | 周回パワーアップ_ レベル2 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '2.5999999046325684', 'MaxMPMultiplier': '1.5', 'MaxStaminaMultiplier': '2 | +| 7403 | 周回パワーアップ_ レベル3 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '2.5', 'MaxMPMultiplier': '1.5', 'MaxStaminaMultiplier': '2.03999996185302 | +| 7404 | 周回パワーアップ_ レベル4 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '2.440000057220459', 'MaxMPMultiplier': '1.5', 'MaxStaminaMultiplier': '1. | +| 7405 | 周回パワーアップ_ レベル5 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '2.2899999618530273', 'MaxMPMultiplier': '1.5', 'MaxStaminaMultiplier': '1 | +| 7406 | 周回パワーアップ_ レベル6 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '2.190000057220459', 'MaxMPMultiplier': '1.5', 'MaxStaminaMultiplier': '1. | +| 7407 | 周回パワーアップ_ レベル7 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '2.0299999713897705', 'MaxMPMultiplier': '1.5', 'MaxStaminaMultiplier': '1 | +| 7408 | 周回パワーアップ_ レベル8 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '1.9199999570846558', 'MaxMPMultiplier': '1.5', 'MaxStaminaMultiplier': '1 | +| 7409 | 周回パワーアップ_ レベル9 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '1.8300000429153442', 'MaxMPMultiplier': '1.5', 'MaxStaminaMultiplier': '1 | +| 2131 | 呪いからの復活 | {'StatusIcon': '5011', 'EffectDuration': '-1.0', 'SpecialState': '160'} | +| 71 | 呪い効果_LV1 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '0.5', 'SpecialEffectPerUpdate': '80', 'SaveCategory': '6', 'SpecialState' | +| 72 | 呪い効果_LV2 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '0.5', 'SpecialEffectPerUpdate': '80', 'SaveCategory': '6', 'SpecialState' | +| 73 | 呪い効果_LV3 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '0.5', 'SpecialEffectPerUpdate': '80', 'SaveCategory': '6', 'SpecialState' | +| 74 | 呪い効果_LV4 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '0.5', 'SpecialEffectPerUpdate': '80', 'SaveCategory': '6', 'SpecialState' | +| 80 | 呪い効果【対霊強化】 | {'UpdateInterval': '1.5', 'SpecialEffectCategory': '20', 'SpecialState': '157'} | +| 91110 | 呪い無効 | {'EffectDuration': '-1.0', 'CurseImmunity': '1'} | +| 3090 | 呪治療 | {'CurseDamage': '-99999', 'SpecialState': '118'} | +| 2034 | 呪耐性アップ | {'StatusIcon': '5003', 'EffectDuration': '-1.0', 'CurseResistanceMultiplier': '4.0'} | +| 5471 | 味方強化魔法(仲間用) | {'EffectDuration': '60.0', 'PhysicalAttackPowerMultiplier': '1.850000023841858', 'SpecialState': '178', 'UseVisualEffect | +| 5470 | 味方強化魔法(自分用) | {'EffectDuration': '60.0', 'PhysicalAttackPowerMultiplier': '1.850000023841858', 'SpecialState': '178', 'UseVisualEffect | +| 2979 | 因果応報 | {'EffectDuration': '-1.0', 'UseVisualEffect': '1'} | +| 1800 | 因果応報_カウント用 | {'StatusIcon': '5000', 'EffectDuration': '60.0', 'SpecialEffectCategory': '10001', 'SpecialState': '170', 'UseVisualEffe | +| 1810 | 因果応報_爆発発生用 | {'StatusIcon': '5000', 'BehaviorToTrigger': '1000', 'SpecialState': '171'} | +| 5232 | 土偶戦士 グラビティ | {'EffectDuration': '0.6000000238418579', 'SpecialEffectCategory': '20', 'SpecialState': '102', 'UseVisualEffect': '1'} | +| 2988 | 大事にします | {'EffectDuration': '-1.0', 'MaxDurabilityAddition': '10'} | +| 3312 | 大王グウィンのソウル | {'SoulAmountChange': '20000'} | +| 5028 | 大蚊_毒血_満腹時 | {'EffectDuration': '180.0', 'HPPointsLost': '8', 'PoisonDamage': '60', 'SpecialEffectCategory': '10004', 'AttackAttribut | +| 5027 | 大蚊_毒血_通常時 | {'EffectDuration': '180.0', 'HPPointsLost': '4', 'PoisonDamage': '35', 'SpecialEffectCategory': '10004', 'AttackAttribut | +| 3970 | 大蜘蛛DS | {'SoulAmountChange': '3200'} | +| 1070 | 太陽の剣 | {'EffectDuration': '60.0', 'LightningAttackPowerAddition': '180', 'SpecialEffectCategory': '10000', 'ElementAttribute': | +| 2982 | 奇跡の天性 | {'EffectDuration': '-1.0', 'AttunementMiracleSlotCountChange': '1'} | +| 2300 | 奇跡威力アップ | {'StatusIcon': '5004', 'EffectDuration': '-1.0', 'PhysicalAttackPowerMultiplier': '1.2000000476837158', 'MagicAttackPowe | +| 5017 | 奴隷兵士_炎短剣(王城1) | {'EffectDuration': '-1.0', 'FireAttackPowerAddition': '60', 'ElementAttribute': '2', 'SpecialState': '28', 'AffectedWeap | +| 5061 | 奴隷兵士_炎短剣(王城2) | {'EffectDuration': '-1.0', 'FireAttackPowerAddition': '80', 'ElementAttribute': '2', 'SpecialState': '28', 'AffectedWeap | +| 530 | 姿隠し | {'StatusIcon': '5009', 'EffectDuration': '30.0', 'EnemySightPercentageReduction': '90', 'SpecialEffectCategory': '10001' | +| 3961 | 審判者DS | {'SoulAmountChange': '13200'} | +| 5073 | 審判者腹出血 | {'EffectDuration': '-1.0', 'SpecialState': '94', 'UseVisualEffect': '1'} | +| 5162 | 小ダメージしか出ない0.1秒版 | {'EffectDuration': '0.10000000149011612', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '200', 'ReplaceNoImp | +| 3962 | 嵐の戦士DS | {'SoulAmountChange': '36000'} | +| 3963 | 嵐の獣DS | {'SoulAmountChange': '48000'} | +| 5170 | 巨人奴隷 ダウン時のダメージアニメ変化【大のみ】 | {'EffectDuration': '0.10000000149011612', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '190', 'ReplaceNoImp | +| 581 | 帰還【発動】 | {'SpecialState': '16'} | +| 580 | 帰還【発動待機】 | {'EffectDuration': '0.6000000238418579', 'NextSpecialEffect': '581'} | +| 3220 | 帰還石 | {'SpecialState': '16'} | +| 3221 | 帰還石A | {'SpecialState': '165'} | +| 3222 | 帰還石B | {'SpecialState': '161'} | +| 3223 | 帰還石C | {'SpecialState': '162'} | +| 3224 | 帰還石D | {'SpecialState': '163'} | +| 3225 | 帰還石E | {'SpecialState': '164'} | +| 5160 | 常に小ダメージ | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '200', 'ReplaceNoImpactLevel': '1', | +| 5333 | 常駐ダメージアニメ変化【中のみ】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '200', 'ReplaceNoImpactLevel': '1', | +| 5334 | 常駐ダメージアニメ変化【中・吹っ飛びのみ】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '200', 'ReplaceNoImpactLevel': '1', | +| 5321 | 常駐ダメージアニメ変化【中・大・叩きつけ のみ】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '200', 'ReplaceNoImpactLevel': '1', | +| 5309 | 常駐ダメージアニメ変化【中以上、押しあり】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '200', 'ReplaceNoImpactLevel': '1', | +| 5308 | 常駐ダメージアニメ変化【中以上】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '200', 'ReplaceNoImpactLevel': '1', | +| 5332 | 常駐ダメージアニメ変化【中以下は大扱い】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '200', 'ReplaceNoImpactLevel': '1', | +| 5300 | 常駐ダメージアニメ変化【全て無効】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '200', 'ReplaceNoImpactLevel': '1', | +| 5161 | 常駐ダメージアニメ変化【全て無効】0.1秒版 | {'EffectDuration': '0.10000000149011612', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '200', 'ReplaceNoImp | +| 5322 | 常駐ダメージアニメ変化【吹っ飛びがない】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '200', 'ReplaceNoImpactLevel': '1', | +| 5323 | 常駐ダメージアニメ変化【吹っ飛び・叩きつけ がない】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '200', 'ReplaceNoImpactLevel': '1', | +| 5325 | 常駐ダメージアニメ変化【吹っ飛び・押し がない】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '200', 'ReplaceNoImpactLevel': '1', | +| 5320 | 常駐ダメージアニメ変化【大 のみ】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '200', 'ReplaceNoImpactLevel': '1', | +| 5329 | 常駐ダメージアニメ変化【小のみ】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '200', 'ReplaceNoImpactLevel': '1', | +| 5326 | 常駐ダメージアニメ変化【小・中のみ】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '200', 'ReplaceNoImpactLevel': '1', | +| 5327 | 常駐ダメージアニメ変化【小・中・大のみ】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '200', 'ReplaceNoImpactLevel': '1', | +| 5328 | 常駐ダメージアニメ変化【小・中・大・叩きのみ】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '200', 'ReplaceNoImpactLevel': '1', | +| 5330 | 常駐ダメージアニメ変化【小・大・吹っ飛びのみ】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '200', 'ReplaceNoImpactLevel': '1', | +| 5306 | 常駐ダメージアニメ変化【押し→小】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '200', 'ReplaceNoImpactLevel': '1', | +| 5307 | 常駐ダメージアニメ変化【極小→小】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '200', 'ReplaceNoImpactLevel': '1', | +| 5324 | 常駐ダメージアニメ変化【極小・小・中・大のみ】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '200', 'ReplaceNoImpactLevel': '1', | +| 5301 | 常駐ダメージアニメ変化【極小・小・中・大・叩き・打上・押し 無効】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '200', 'ReplaceNoImpactLevel': '1', | +| 5302 | 常駐ダメージアニメ変化【極小・小・中・大・押し 無効】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '200', 'ReplaceNoImpactLevel': '1', | +| 5303 | 常駐ダメージアニメ変化【極小・小・中・押し 無効】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '200', 'ReplaceNoImpactLevel': '1', | +| 5304 | 常駐ダメージアニメ変化【極小・小・押し 無効】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '200', 'ReplaceNoImpactLevel': '1', | +| 5305 | 常駐ダメージアニメ変化【極小・押し 無効】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '200', 'ReplaceNoImpactLevel': '1', | +| 5331 | 常駐ダメージアニメ変化【結晶トカゲ用】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '200', 'ReplaceNoImpactLevel': '1', | +| 520 | 幻聴 | {'SpecialState': '38'} | +| 2080 | 弓の達人 | {'StatusIcon': '5000', 'EffectDuration': '-1.0', 'BowRangePercentageChange': '65', 'SpecialState': '168'} | +| 2990 | 弱「ゴーストカムフラージュ」 | {'EffectDuration': '-1.0', 'EnemySightPercentageReduction': '55', 'EnemyHearingPercentageReduction': '65', 'SpecialState | +| 2989 | 強ゴースト | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '1.399999976158142', 'SpecialState': '19', 'CurrentHPIgnoresMaxHPChange': | +| 5007 | 強制ゴースト第1段階 | {'EffectDuration': '-1.0', 'SpecialState': '43', 'UseVisualEffect': '1'} | +| 5008 | 強制ゴースト第2段階 | {'EffectDuration': '-1.0', 'SpecialState': '44', 'UseVisualEffect': '1'} | +| 5009 | 強制ゴースト第3段階 | {'EffectDuration': '-1.0', 'HPReductionPercentage': '100.0', 'SpecialState': '45'} | +| 38 | 強化投げダメージアップ効果 | {'EffectDuration': '0.10000000149011612', 'OutgoingPhysicalDamageMultiplier': '1.2999999523162842', 'OutgoingMagicDamage | +| 2992 | 強欲 | {'EffectDuration': '-1.0', 'SoulsFromKillsMultiplier': '1.2000000476837158', 'SpecialState': '76', 'UseVisualEffect': '1 | +| 2250 | 強者の呪い | {'StatusIcon': '5012', 'EffectDuration': '-1.0', 'MaxHPMultiplier': '1.2000000476837158', 'MaxStaminaMultiplier': '1.200 | +| 5120 | 徘徊デーモン 通常ロジックになる | {'EffectDuration': '-1.0'} | +| 8000 | 徘徊ドーピングテスト(中) | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '2.0', 'MaxMPMultiplier': '1.5', 'MaxStaminaMultiplier': '1.33000004291534 | +| 8001 | 徘徊ドーピングテスト(強) | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '6.0', 'MaxMPMultiplier': '1.5', 'MaxStaminaMultiplier': '1.33000004291534 | +| 2130 | 復活 | {'StatusIcon': '5011', 'EffectDuration': '-1.0', 'SpecialState': '159'} | +| 3230 | 復活石【復活効果】 | {'SpecialState': '17'} | +| 5480 | 投げられアニメ・防御力調整 | {'EffectDuration': '0.10000000149011612', 'PhysicalDefenseMultiplier': '0.25', 'MagicDefenseMultiplier': '0.25', 'FireDe | +| 35 | 投げ無効状態 | {'EffectDuration': '0.10000000149011612', 'ThrowCondition': '1'} | +| 4004 | 持続ダメージ【糸】 | {'EffectDuration': '7.0', 'SpecialEffectCategory': '1000', 'SpecialEffectPriority': '7', 'SpecialState': '30', 'Movement | +| 4011 | 持続ダメージ床_後 【ヒル沼】 | {'EffectDuration': '3.0', 'HPPointsLost': '5', 'AttackAttribute': '4', 'ElementAttribute': '4', 'SpecialState': '56', 'A | +| 4012 | 持続ダメージ床_後 【毒】 | {'EffectDuration': '180.0', 'HPPointsLost': '4', 'PoisonDamage': '15', 'SpecialEffectCategory': '10004', 'AttackAttribut | +| 4013 | 持続ダメージ床_後 【血沼】 | {'EffectDuration': '600.0', 'HPPointsLost': '18', 'StaminaRecoverySpeedChange': '-15', 'ToxicDamage': '20', 'SpecialEffe | +| 4001 | 持続ダメージ床【ヒル沼】 | {'EffectDuration': '-1.0', 'HPPointsLost': '5', 'AttackAttribute': '4', 'ElementAttribute': '4', 'SpecialState': '56', ' | +| 4017 | 持続ダメージ床【坑道ボス溶岩】 | {'EffectDuration': '-1.0', 'UpdateInterval': '0.10000000149011612', 'HPPointsLost': '6', 'AttackAttribute': '4', 'Elemen | +| 4000 | 持続ダメージ床【坑道1溶岩】 | {'EffectDuration': '-1.0', 'UpdateInterval': '0.10000000149011612', 'HPPointsLost': '125', 'AttackAttribute': '4', 'Elem | +| 4016 | 持続ダメージ床【坑道2溶岩】 | {'EffectDuration': '0.10000000149011612', 'HPPointsLost': '40', 'AttackAttribute': '4', 'ElementAttribute': '2', 'Specia | +| 4021 | 持続ダメージ床【毒_効果本体_影町】 | {'EffectDuration': '180.0', 'UpdateInterval': '1.0199999809265137', 'HPPointsLost': '4', 'PoisonDamage': '3', 'SpecialEf | +| 4020 | 持続ダメージ床【毒_間隔調整_影町】 | {'EffectDuration': '0.05999999865889549', 'UpdateInterval': '-1.0', 'NextSpecialEffect': '4021'} | +| 4002 | 持続ダメージ床【毒用鈍足】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1000', 'SpecialEffectPriority': '5', 'MovementType': '4'} | +| 4030 | 持続ダメージ床【溶岩_廃都_指輪で無効】 | {'EffectDuration': '0.20000000298023224', 'UpdateInterval': '0.5', 'BehaviorToTrigger': '5090', 'SpecialEffectCategory': | +| 4031 | 持続ダメージ床【溶岩_廃都_指輪も貫通】 | {'EffectDuration': '0.20000000298023224', 'UpdateInterval': '0.5', 'BehaviorToTrigger': '5091', 'AttackAttribute': '4', | +| 4003 | 持続ダメージ床【血沼用鈍足】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1000', 'SpecialEffectPriority': '6', 'MovementType': '4'} | +| 36 | 指輪装備投げ(投げ条件) | {'StatusIcon': '5000', 'EffectDuration': '-1.0', 'ThrowCondition': '5'} | +| 1500 | 擬態 | {'EffectDuration': '-1.0', 'EnemySightPercentageReduction': '100', 'EnemyHearingPercentageReduction': '100', 'SpecialEff | +| 1510 | 擬態【移動鈍足効果】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1000', 'SpecialEffectPriority': '2', 'SpecialState': '95', 'Movemen | +| 5460 | 敵キャラ エスト【HP】 | {'HPReductionPercentage': '-40.0'} | +| 5466 | 敵キャラ 奇跡・大回復 | {'HPReductionPercentage': '-60.0'} | +| 4160 | 敵用フォーリングコントロール | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '10001', 'SpecialState': '47'} | +| 2320 | 暗月神の指輪 | {'EffectDuration': '-1.0', 'SpecialState': '190'} | +| 1080 | 月の剣 | {'EffectDuration': '60.0', 'MagicAttackPowerAddition': '180', 'SpecialEffectCategory': '10000', 'ElementAttribute': '3', | +| 1081 | 月の剣_LV1 | {'EffectDuration': '60.0', 'MagicAttackPowerAddition': '190', 'SpecialEffectCategory': '10000', 'ElementAttribute': '3', | +| 1082 | 月の剣_LV2 | {'EffectDuration': '60.0', 'MagicAttackPowerAddition': '200', 'SpecialEffectCategory': '10000', 'ElementAttribute': '3', | +| 1083 | 月の剣_LV3 | {'EffectDuration': '60.0', 'MagicAttackPowerAddition': '210', 'SpecialEffectCategory': '10000', 'ElementAttribute': '3', | +| 3315 | 月光蝶のソウル | {'SoulAmountChange': '1200'} | +| 5110 | 木登りトカゲ モーションチェンジ(デフォルト) | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '100'} | +| 5111 | 木登りトカゲ モーションチェンジ(木登り) | {'EffectDuration': '-1.0', 'AnimationIDOffset': '10000', 'SpecialEffectCategory': '100'} | +| 4500 | 森の盗賊団テリトリ内 | {'SpecialEffectCategory': '20', 'SpecialState': '189'} | +| 4130 | 棺に隠れている | {'EffectDuration': '0.10000000149011612', 'EnemySightPercentageReduction': '100', 'EnemyHearingPercentageReduction': '10 | +| 2270 | 武器を大切に | {'StatusIcon': '5013', 'EffectDuration': '-1.0', 'MaxDurabilityAddition': '10'} | +| 5400 | 武器チェンジ アニメIDオフセット0 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '100'} | +| 5401 | 武器チェンジ アニメIDオフセット10000 | {'EffectDuration': '-1.0', 'AnimationIDOffset': '10000', 'SpecialEffectCategory': '100'} | +| 5402 | 武器チェンジ アニメIDオフセット20000 | {'EffectDuration': '-1.0', 'AnimationIDOffset': '20000', 'SpecialEffectCategory': '100'} | +| 5403 | 武器チェンジ アニメIDオフセット30000 | {'EffectDuration': '-1.0', 'AnimationIDOffset': '30000', 'SpecialEffectCategory': '100'} | +| 3100 | 武器修理 | {'CurrentDurabilityAddition': '-100', 'SpecialState': '26', 'AffectedWeaponType': '1'} | +| 3180 | 武器対霊強化 | {'EffectDuration': '300.0', 'SpecialEffectCategory': '10001', 'SpecialState': '157', 'UseVisualEffect': '1'} | +| 3191 | 武器毒化【攻撃時相手を毒にする】 | {'EffectDuration': '180.0', 'UpdateInterval': '1.0199999809265137', 'HPPointsLost': '3', 'PoisonDamage': '30', 'SpecialE | +| 3190 | 武器毒化【武器にかける】 | {'EffectDuration': '60.0', 'SpecialEffectOnAttack': '3191', 'SpecialEffectCategory': '10000', 'SpecialState': '152', 'Af | +| 3160 | 武器炎強化 | {'EffectDuration': '60.0', 'FireAttackPowerAddition': '80', 'SpecialEffectCategory': '10000', 'ElementAttribute': '2', ' | +| 6320 | 武器胴 | {'EffectDuration': '-1.0', 'PhysicalAttackPowerAddition': '50', 'SpecialState': '124'} | +| 6340 | 武器脚 | {'EffectDuration': '-1.0', 'PhysicalAttackPowerAddition': '20', 'SpecialState': '126'} | +| 6330 | 武器腕 | {'EffectDuration': '-1.0', 'PhysicalAttackPowerAddition': '20', 'SpecialState': '125'} | +| 1330 | 武器防具修復 | {'CurrentDurabilityAddition': '-150', 'SpecialState': '146', 'UseVisualEffect': '1'} | +| 3170 | 武器雷強化 | {'EffectDuration': '60.0', 'LightningAttackPowerAddition': '150', 'SpecialEffectCategory': '10000', 'ElementAttribute': | +| 6310 | 武器頭 | {'EffectDuration': '-1.0', 'PhysicalAttackPowerAddition': '20', 'SpecialState': '123'} | +| 1000 | 武器魔法強化1 | {'EffectDuration': '60.0', 'MagicAttackPowerAddition': '80', 'SpecialEffectCategory': '10000', 'ElementAttribute': '3', | +| 1010 | 武器魔法強化2 | {'EffectDuration': '60.0', 'MagicAttackPowerAddition': '110', 'SpecialEffectCategory': '10000', 'ElementAttribute': '3', | +| 1020 | 武器魔法強化3 | {'EffectDuration': '60.0', 'MagicAttackPowerAddition': '140', 'SpecialEffectCategory': '10000', 'ElementAttribute': '3', | +| 560 | 死んだとき復活 | {'StatusIcon': '5001', 'EffectDuration': '-1.0', 'SpecialEffectCategory': '10001', 'SpecialState': '69', 'UseVisualEffec | +| 6500 | 毒_1 | {'EffectDuration': '180.0', 'UpdateInterval': '0.8999999761581421', 'HPPointsLost': '3', 'PoisonDamage': '30', 'SpecialE | +| 6501 | 毒_2 | {'EffectDuration': '180.0', 'UpdateInterval': '0.800000011920929', 'HPPointsLost': '3', 'PoisonDamage': '30', 'SpecialEf | +| 6502 | 毒_3 | {'EffectDuration': '180.0', 'UpdateInterval': '0.8999999761581421', 'HPPointsLost': '4', 'PoisonDamage': '30', 'SpecialE | +| 6503 | 毒_4 | {'EffectDuration': '180.0', 'UpdateInterval': '0.800000011920929', 'HPPointsLost': '4', 'PoisonDamage': '30', 'SpecialEf | +| 6504 | 毒_5 | {'EffectDuration': '180.0', 'UpdateInterval': '0.8999999761581421', 'HPPointsLost': '5', 'PoisonDamage': '30', 'SpecialE | +| 6505 | 毒_6 | {'EffectDuration': '180.0', 'UpdateInterval': '0.800000011920929', 'HPPointsLost': '5', 'PoisonDamage': '30', 'SpecialEf | +| 5250 | 毒ダメージ1 | {'EffectDuration': '180.0', 'UpdateInterval': '0.9272729754447937', 'HPPointsLost': '4', 'PoisonDamage': '12', 'SpecialE | +| 5251 | 毒ダメージ2 | {'EffectDuration': '180.0', 'UpdateInterval': '0.9272729754447937', 'HPPointsLost': '9', 'PoisonDamage': '45', 'SpecialE | +| 5252 | 毒ダメージ3 | {'EffectDuration': '180.0', 'UpdateInterval': '0.9272729754447937', 'HPPointsLost': '7', 'PoisonDamage': '55', 'SpecialE | +| 5253 | 毒ダメージ4 | {'EffectDuration': '180.0', 'UpdateInterval': '0.9272729754447937', 'HPPointsLost': '10', 'PoisonDamage': '60', 'Special | +| 5254 | 毒ダメージ5 | {'EffectDuration': '180.0', 'HPPointsLost': '5', 'PoisonDamage': '30', 'SpecialEffectCategory': '10004', 'AttackAttribut | +| 5255 | 毒ダメージ6 | {'EffectDuration': '180.0', 'HPPointsLost': '5', 'PoisonDamage': '30', 'SpecialEffectCategory': '10004', 'AttackAttribut | +| 3110 | 毒投げナイフ【毒効果】 | {'EffectDuration': '180.0', 'UpdateInterval': '1.0199999809265137', 'HPPointsLost': '4', 'PoisonDamage': '55', 'SpecialE | +| 1320 | 毒治療【状態回復】 | {'SpecialState': '10'} | +| 3060 | 毒治療【状態回復】 | {'SpecialState': '10'} | +| 1321 | 毒治療【耐性回復】 | {'PoisonDamage': '-99999', 'SpecialState': '2'} | +| 3061 | 毒治療【耐性回復】 | {'PoisonDamage': '-99999', 'SpecialState': '2'} | +| 5053 | 毒無効 | {'EffectDuration': '-1.0', 'PoisonImmunity': '1'} | +| 90111 | 毒無効 | {'EffectDuration': '-1.0', 'PoisonImmunity': '1'} | +| 2031 | 毒耐性 | {'StatusIcon': '5003', 'EffectDuration': '-1.0', 'PoisonResistanceMultiplier': '4.0'} | +| 5056 | 毒&出血無効 | {'EffectDuration': '-1.0', 'PoisonImmunity': '1', 'BleedImmunity': '1'} | +| 90011 | 毒&出血無効 | {'EffectDuration': '-1.0', 'PoisonImmunity': '1', 'ToxicImmunity': '1'} | +| 90010 | 毒&出血&呪い無効 | {'EffectDuration': '-1.0', 'PoisonImmunity': '1', 'ToxicImmunity': '1', 'CurseImmunity': '1'} | +| 5059 | 毒&出血&疫病無効 | {'EffectDuration': '-1.0', 'PoisonImmunity': '1', 'ToxicImmunity': '1', 'BleedImmunity': '1'} | +| 90001 | 毒&出血&疫病無効 | {'EffectDuration': '-1.0', 'PoisonImmunity': '1', 'ToxicImmunity': '1', 'BleedImmunity': '1'} | +| 90110 | 毒&呪い無効 | {'EffectDuration': '-1.0', 'PoisonImmunity': '1', 'CurseImmunity': '1'} | +| 5057 | 毒&疫病無効 | {'EffectDuration': '-1.0', 'PoisonImmunity': '1', 'ToxicImmunity': '1'} | +| 90101 | 毒&疫病無効 | {'EffectDuration': '-1.0', 'PoisonImmunity': '1', 'BleedImmunity': '1'} | +| 90100 | 毒&疫病&呪い無効 | {'EffectDuration': '-1.0', 'PoisonImmunity': '1', 'BleedImmunity': '1', 'CurseImmunity': '1'} | +| 1120 | 水のヴェール | {'StatusIcon': '5002', 'EffectDuration': '60.0', 'IncomingFireDamageMultiplier': '0.550000011920929', 'SpecialEffectCate | +| 4150 | 汎用扉の内鍵 | {'EffectDuration': '3.0'} | +| 4100 | 深い水で足が遅くなる | {'EffectDuration': '0.10000000149011612', 'SpecialEffectCategory': '1000', 'SpecialEffectPriority': '4', 'MovementType': | +| 3310 | 混沌の娘クラーグのソウル | {'SoulAmountChange': '8000'} | +| 2190 | 混沌の言葉 | {'EffectDuration': '-1.0'} | +| 5430 | 湖獣 首1切断状態 | {'EffectDuration': '-1.0', 'AddBehaviorJudgeIDCondition': '1'} | +| 5431 | 湖獣 首2切断状態 | {'EffectDuration': '-1.0', 'AddBehaviorJudgeIDCondition': '2'} | +| 5432 | 湖獣 首3切断状態 | {'EffectDuration': '-1.0', 'AddBehaviorJudgeIDCondition': '3'} | +| 5433 | 湖獣 首4切断状態 | {'EffectDuration': '-1.0', 'AddBehaviorJudgeIDCondition': '4'} | +| 5434 | 湖獣 首5切断状態 | {'EffectDuration': '-1.0', 'AddBehaviorJudgeIDCondition': '5'} | +| 5435 | 湖獣 首6切断状態 | {'EffectDuration': '-1.0', 'AddBehaviorJudgeIDCondition': '6'} | +| 5436 | 湖獣 首7切断状態 | {'EffectDuration': '-1.0', 'AddBehaviorJudgeIDCondition': '7'} | +| 2210 | 溶岩歩き | {'StatusIcon': '5015', 'EffectDuration': '-1.0', 'FireAttackPowerAddition': '80', 'SpecialEffectCategory': '1002', 'Spec | +| 5152 | 溶岩歩き(敵) | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1002', 'SpecialEffectPriority': '1'} | +| 4015 | 火薬樽 ドーピング | {'EffectDuration': '-1.0', 'HPReductionPercentage': '100.0'} | +| 5180 | 灰色の聖女 常に小ダメージ | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '200', 'ReplaceNoImpactLevel': '1', | +| 5034 | 炎に対してノーダメージ | {'EffectDuration': '-1.0'} | +| 5150 | 炎ダメージ無効化 | {'EffectDuration': '-1.0'} | +| 3971 | 炎巨人DS | {'SoulAmountChange': '18000'} | +| 5001 | 炎怪人第1段階 | {'EffectDuration': '-1.0', 'SpecialState': '34', 'UseVisualEffect': '1'} | +| 5002 | 炎怪人第2段階 | {'EffectDuration': '-1.0', 'SpecialState': '35', 'UseVisualEffect': '1'} | +| 5003 | 炎怪人第3段階 | {'EffectDuration': '-1.0', 'SpecialState': '36', 'UseVisualEffect': '1'} | +| 5004 | 炎怪人第4段階 | {'EffectDuration': '-1.0', 'SpecialState': '37'} | +| 2020 | 炎耐性 | {'StatusIcon': '5002', 'EffectDuration': '-1.0', 'FireDefenseAddition': '50'} | +| 3979 | 無限ゲート | {'SpecialState': '16', 'ClearSoul': '1'} | +| 5131 | 爛れ続けるもの モーションチェンジ(崖) | {'EffectDuration': '-1.0', 'AnimationIDOffset': '20000', 'SpecialEffectCategory': '100'} | +| 5130 | 爛れ続けるもの モーションチェンジ(腕解放) | {'EffectDuration': '-1.0', 'AnimationIDOffset': '10000', 'SpecialEffectCategory': '100'} | +| 5132 | 爛れ続けるもの 火力第1段階 | {'EffectDuration': '-1.0', 'SpecialState': '34', 'UseVisualEffect': '1'} | +| 5133 | 爛れ続けるもの 火力第2段階 | {'EffectDuration': '-1.0', 'SpecialState': '35', 'UseVisualEffect': '1'} | +| 5065 | 牢城3翁NPC強化用 | {'EffectDuration': '-1.0', 'MagicDefenseMultiplier': '2.5', 'FireDefenseMultiplier': '2.5', 'MPPointsLost': '-100', 'Max | +| 5048 | 牢城3 ドーピング レベル−11〜 | {'EffectDuration': '-1.0', 'OutgoingPhysicalDamageMultiplier': '1.2000000476837158', 'OutgoingMagicDamageMultiplier': '1 | +| 5047 | 牢城3 ドーピング レベル−6〜−10 | {'EffectDuration': '-1.0', 'OutgoingPhysicalDamageMultiplier': '1.149999976158142', 'OutgoingMagicDamageMultiplier': '1. | +| 5046 | 牢城3 ドーピング レベル+0〜−5 | {'EffectDuration': '-1.0', 'OutgoingPhysicalDamageMultiplier': '1.0499999523162842', 'OutgoingMagicDamageMultiplier': '1 | +| 5045 | 牢城3 ドーピング レベル+5〜+1 | {'EffectDuration': '-1.0', 'AffectsMagic': '1', 'AffectsMiracles': '1'} | +| 2023 | 物理耐性 | {'StatusIcon': '5002', 'EffectDuration': '-1.0', 'PhysicalDefenseAddition': '50'} | +| 1090 | 狂気の力 | {'StatusIcon': '5002', 'EffectDuration': '100.0', 'OutgoingPhysicalDamageMultiplier': '1.399999976158142', 'OutgoingMagi | +| 6600 | 猛毒_1 | {'EffectDuration': '600.0', 'UpdateInterval': '0.8999999761581421', 'HPPointsLost': '5', 'StaminaRecoverySpeedChange': ' | +| 6601 | 猛毒_2 | {'EffectDuration': '600.0', 'UpdateInterval': '0.8999999761581421', 'HPPointsLost': '6', 'StaminaRecoverySpeedChange': ' | +| 6602 | 猛毒_3 | {'EffectDuration': '600.0', 'UpdateInterval': '0.8999999761581421', 'HPPointsLost': '7', 'StaminaRecoverySpeedChange': ' | +| 6603 | 猛毒_4 | {'EffectDuration': '600.0', 'UpdateInterval': '0.8999999761581421', 'HPPointsLost': '8', 'StaminaRecoverySpeedChange': ' | +| 6604 | 猛毒_5 | {'EffectDuration': '600.0', 'UpdateInterval': '0.8999999761581421', 'HPPointsLost': '9', 'StaminaRecoverySpeedChange': ' | +| 6605 | 猛毒_6 | {'EffectDuration': '600.0', 'UpdateInterval': '0.8999999761581421', 'HPPointsLost': '10', 'StaminaRecoverySpeedChange': | +| 5020 | 猛毒ねずみ_猛毒攻撃 | {'EffectDuration': '600.0', 'HPPointsLost': '5', 'StaminaRecoverySpeedChange': '-15', 'ToxicDamage': '25', 'SpecialEffec | +| 5269 | 猛毒ダメージ10 | {'EffectDuration': '600.0', 'UpdateInterval': '0.9272729754447937', 'HPPointsLost': '8', 'StaminaRecoverySpeedChange': ' | +| 5260 | 猛毒ダメージ1 | {'EffectDuration': '600.0', 'UpdateInterval': '0.9272729754447937', 'HPPointsLost': '5', 'StaminaRecoverySpeedChange': ' | +| 5261 | 猛毒ダメージ2 | {'EffectDuration': '600.0', 'HPPointsLost': '6', 'StaminaRecoverySpeedChange': '-15', 'ToxicDamage': '30', 'SpecialEffec | +| 5262 | 猛毒ダメージ3 | {'EffectDuration': '600.0', 'UpdateInterval': '0.9272729754447937', 'HPPointsLost': '7', 'StaminaRecoverySpeedChange': ' | +| 5263 | 猛毒ダメージ4 | {'EffectDuration': '600.0', 'UpdateInterval': '0.9090908765792847', 'HPPointsLost': '8', 'StaminaRecoverySpeedChange': ' | +| 5264 | 猛毒ダメージ5 | {'EffectDuration': '600.0', 'HPPointsLost': '9', 'StaminaRecoverySpeedChange': '-15', 'ToxicDamage': '30', 'SpecialEffec | +| 5265 | 猛毒ダメージ6 | {'EffectDuration': '600.0', 'HPPointsLost': '9', 'StaminaRecoverySpeedChange': '-15', 'ToxicDamage': '96', 'SpecialEffec | +| 3070 | 猛毒治療【状態回復】 | {'SpecialState': '11'} | +| 3071 | 猛毒治療【耐性回復】 | {'ToxicDamage': '-99999', 'SpecialState': '5'} | +| 2987 | 猫の着地 | {'EffectDuration': '-1.0', 'SpecialState': '47'} | +| 3959 | 王の剣DS | {'SoulAmountChange': '36000'} | +| 5070 | 王の盾1段階右足 | {'EffectDuration': '-1.0', 'SpecialState': '91', 'UseVisualEffect': '1'} | +| 5067 | 王の盾1段階左足 | {'EffectDuration': '-1.0', 'SpecialState': '78', 'UseVisualEffect': '1'} | +| 5071 | 王の盾2段階右足 | {'EffectDuration': '-1.0', 'SpecialState': '92', 'UseVisualEffect': '1'} | +| 5068 | 王の盾2段階左足 | {'EffectDuration': '-1.0', 'SpecialState': '79', 'UseVisualEffect': '1'} | +| 5072 | 王の盾3段階右足 | {'EffectDuration': '-1.0', 'SpecialState': '93', 'UseVisualEffect': '1'} | +| 5069 | 王の盾3段階左足 | {'EffectDuration': '-1.0', 'SpecialState': '80', 'UseVisualEffect': '1'} | +| 3958 | 王の盾DS | {'SoulAmountChange': '4400'} | +| 5062 | 王城1、2 レンドル王子(防御2.0倍) | {'EffectDuration': '-1.0', 'PhysicalDefenseMultiplier': '2.0', 'MagicDefenseMultiplier': '2.0', 'FireDefenseMultiplier': | +| 5064 | 王城2、3、4 ビヨ(防御2.5倍) | {'EffectDuration': '-1.0', 'PhysicalDefenseMultiplier': '2.5', 'MagicDefenseMultiplier': '2.5', 'FireDefenseMultiplier': | +| 5063 | 王城3 レンドル王子(防御2.0倍) | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '3.5', 'PhysicalDefenseMultiplier': '2.0', 'MagicDefenseMultiplier': '2.0' | +| 4501 | 王母弟テリトリ内 | {'SpecialEffectCategory': '20', 'SpecialState': '191'} | +| 5055 | 疫病無効 | {'EffectDuration': '-1.0', 'ToxicImmunity': '1'} | +| 91101 | 疫病無効 | {'EffectDuration': '-1.0', 'BleedImmunity': '1'} | +| 2996 | 疫病耐性 | {'StatusIcon': '5003', 'EffectDuration': '-1.0', 'ToxicResistanceMultiplier': '4.0'} | +| 91100 | 疫病&呪い無効 | {'EffectDuration': '-1.0', 'BleedImmunity': '1', 'CurseImmunity': '1'} | +| 1700 | 白救援探知魔法 | {'EffectDuration': '-1.0', 'SpecialState': '149'} | +| 4161 | 白猫用フォーリングコントロール | {'SpecialState': '47', 'UseVisualEffect': '1'} | +| 5440 | 白竜シース HP自動回復 | {'EffectDuration': '-1.0', 'UpdateInterval': '0.10000000149011612', 'HPReductionPercentage': '-5.0'} | +| 5441 | 白竜シース 無敵SFX表示1 | {'EffectDuration': '-1.0', 'SpecialState': '172', 'UseVisualEffect': '1'} | +| 5442 | 白竜シース 無敵SFX表示2 | {'EffectDuration': '-1.0', 'SpecialState': '173', 'UseVisualEffect': '1'} | +| 5443 | 白竜シース 無敵SFX表示3 | {'EffectDuration': '-1.0', 'SpecialState': '174', 'UseVisualEffect': '1'} | +| 2330 | 盗賊団の指輪 | {'EffectDuration': '-1.0', 'SpecialState': '188'} | +| 1040 | 盾強化1 | {'EffectDuration': '15.0', 'IncomingMagicDamageMultiplier': '0.30000001192092896', 'GuardStaminaMultiplier': '1.20000004 | +| 1050 | 盾強化2 | {'EffectDuration': '15.0', 'GuardStaminaMultiplier': '1.5', 'SpecialEffectCategory': '10006', 'SpecialState': '204', 'Af | +| 2985 | 真摯な祈り | {'EffectDuration': '-1.0', 'PhysicalAttackPowerMultiplier': '1.399999976158142', 'MagicAttackPowerMultiplier': '1.399999 | +| 2111 | 石コロ帽子 | {'StatusIcon': '5009', 'EffectDuration': '-1.0', 'EnemySightPercentageReduction': '70', 'SpecialState': '8', 'UseVisualE | +| 33 | 石化 | {'EffectDuration': '-1.0', 'AttackAttribute': '4', 'ElementAttribute': '7', 'SpecialState': '117', 'AffectedWeaponType': | +| 5280 | 石化呪いダメージ1 | {'CurseDamage': '10', 'NextSpecialEffect': '33', 'AttackAttribute': '4', 'ElementAttribute': '7', 'SpecialState': '116', | +| 5281 | 石化呪いダメージ2 | {'CurseDamage': '20', 'NextSpecialEffect': '33', 'AttackAttribute': '4', 'ElementAttribute': '7', 'SpecialState': '116', | +| 5282 | 石化呪いダメージ3 | {'CurseDamage': '30', 'NextSpecialEffect': '33', 'AttackAttribute': '4', 'ElementAttribute': '7', 'SpecialState': '116', | +| 5283 | 石化呪いダメージ4 | {'CurseDamage': '40', 'NextSpecialEffect': '33', 'AttackAttribute': '4', 'ElementAttribute': '7', 'SpecialState': '116', | +| 5284 | 石化呪いダメージ5 | {'CurseDamage': '50', 'NextSpecialEffect': '33', 'AttackAttribute': '4', 'ElementAttribute': '7', 'SpecialState': '116', | +| 2980 | 積載重量アップ | {'EffectDuration': '-1.0', 'MaxItemLoadMultiplier': '1.5'} | +| 1520 | 竜変化1 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '10002', 'SaveCategory': '4', 'SpecialState': '96', 'UseVisualEffect | +| 1530 | 竜変化2 | {'EffectDuration': '-1.0', 'SaveCategory': '5', 'SpecialState': '167', 'UseVisualEffect': '1', 'EnableLifeTime': '1'} | +| 3120 | 糞団子【相手を猛毒にする】 | {'EffectDuration': '600.0', 'UpdateInterval': '1.0199999809265137', 'HPPointsLost': '7', 'StaminaRecoverySpeedChange': ' | +| 3121 | 糞団子【自分もダメージを受ける】 | {'EffectDuration': '600.0', 'UpdateInterval': '1.0199999809265137', 'HPPointsLost': '7', 'StaminaRecoverySpeedChange': ' | +| 5005 | 糸まみれ | {'EffectDuration': '4.5', 'SpecialState': '30', 'MovementType': '4', 'UseVisualEffect': '1'} | +| 34 | 結晶化 | {'EffectDuration': '-1.0', 'AttackAttribute': '4', 'ElementAttribute': '8', 'SpecialState': '136', 'AffectedWeaponType': | +| 5290 | 結晶呪いダメージ1 | {'CurseDamage': '10', 'NextSpecialEffect': '34', 'AttackAttribute': '4', 'ElementAttribute': '8', 'SpecialState': '116', | +| 5291 | 結晶呪いダメージ2 | {'CurseDamage': '20', 'NextSpecialEffect': '34', 'AttackAttribute': '4', 'ElementAttribute': '8', 'SpecialState': '116', | +| 5292 | 結晶呪いダメージ3 | {'CurseDamage': '30', 'NextSpecialEffect': '34', 'AttackAttribute': '4', 'ElementAttribute': '8', 'SpecialState': '116', | +| 5293 | 結晶呪いダメージ4 | {'CurseDamage': '40', 'NextSpecialEffect': '34', 'AttackAttribute': '4', 'ElementAttribute': '8', 'SpecialState': '116', | +| 5294 | 結晶呪いダメージ5 | {'CurseDamage': '50', 'NextSpecialEffect': '34', 'AttackAttribute': '4', 'ElementAttribute': '8', 'SpecialState': '116', | +| 5015 | 翁召喚ブラックNPC強化 | {'EffectDuration': '-1.0', 'MaxHPMultiplier': '2.0', 'MaxMPMultiplier': '2.0', 'MaxStaminaMultiplier': '2.0', 'IncomingM | +| 5029 | 腐敗人_毒クラウド用 | {'EffectDuration': '180.0', 'HPPointsLost': '7', 'PoisonDamage': '50', 'SpecialEffectCategory': '10004', 'AttackAttribut | +| 5016 | 腐敗人_毒攻撃 | {'EffectDuration': '180.0', 'HPPointsLost': '7', 'PoisonDamage': '55', 'SpecialEffectCategory': '10004', 'AttackAttribut | +| 5030 | 腐敗人_猛毒攻撃 | {'EffectDuration': '180.0', 'HPPointsLost': '15', 'PoisonDamage': '90', 'SpecialEffectCategory': '10004', 'AttackAttribu | +| 1220 | 腐食クラウド用の腐食 | {'EffectDuration': '0.6000000238418579', 'UpdateInterval': '0.800000011920929', 'CurrentDurabilityAddition': '1', 'Speci | +| 5235 | 腐食攻撃・ゲロ | {'CurrentDurabilityAddition': '22', 'AttackAttribute': '4', 'ElementAttribute': '4', 'SpecialState': '4', 'AffectedWeapo | +| 5234 | 腐食攻撃・単発 | {'CurrentDurabilityAddition': '40', 'AttackAttribute': '4', 'ElementAttribute': '4', 'SpecialState': '4', 'AffectedWeapo | +| 5236 | 腐食攻撃・投げ連続 | {'CurrentDurabilityAddition': '18', 'AttackAttribute': '4', 'ElementAttribute': '4', 'SpecialState': '4', 'AffectedWeapo | +| 3210 | 興奮香 | {'EffectDuration': '60.0', 'PhysicalAttackPowerMultiplier': '1.2000000476837158', 'MagicAttackPowerMultiplier': '1.20000 | +| 5171 | 薪の王 常駐ダメージアニメ変化【SA解除時には、小以下を中にする】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '200', 'ReplaceNoImpactLevel': '1', | +| 1985 | 蘇生 | {'HPReductionPercentage': '-100.0', 'SpecialState': '23'} | +| 5060 | 虜囚_毒攻撃 | {'EffectDuration': '180.0', 'HPPointsLost': '9', 'PoisonDamage': '150', 'SpecialEffectCategory': '10004', 'AttackAttribu | +| 5014 | 蛭まみれ | {'EffectDuration': '10.0', 'HPReductionPercentage': '2.0', 'StaminaReductionPercentage': '2.0', 'HPRecoveryRate': '0.5', | +| 3967 | 蛭デーモンDS | {'SoulAmountChange': '6400'} | +| 5044 | 蛭デーモン 回復 | {'EffectDuration': '7.0', 'UpdateInterval': '0.10000000149011612', 'HPPointsLost': '-10'} | +| 5050 | 蛭デーモン 回復 HP100%〜 | {'EffectDuration': '7.0', 'UpdateInterval': '0.10000000149011612', 'HPPointsLost': '-4'} | +| 5052 | 蛭デーモン 回復 HP40%〜 | {'EffectDuration': '7.0', 'UpdateInterval': '0.10000000149011612', 'HPPointsLost': '-8'} | +| 5051 | 蛭デーモン 回復 HP70%〜 | {'EffectDuration': '7.0', 'UpdateInterval': '0.10000000149011612', 'HPPointsLost': '-6'} | +| 5006 | 蝿たかり | {'EffectDuration': '20.0', 'HPReductionPercentage': '2.0', 'StaminaReductionPercentage': '2.0', 'HPRecoveryRate': '0.5', | +| 3968 | 蠅巨像DS | {'SoulAmountChange': '40000'} | +| 5021 | 血ダニ_毒血 | {'EffectDuration': '180.0', 'HPPointsLost': '11', 'PoisonDamage': '150', 'SpecialEffectCategory': '10004', 'AttackAttrib | +| 2998 | 装備破壊無視 | {'StatusIcon': '5013', 'EffectDuration': '-1.0', 'SpecialState': '156'} | +| 2000 | 装備重量アップ | {'EffectDuration': '-1.0', 'MaxEquipLoadMultiplier': '1.5'} | +| 2230 | 補助魔法延長 | {'StatusIcon': '5004', 'EffectDuration': '-1.0', 'SpecialState': '193'} | +| 1340 | 解呪 | {'CurseDamage': '-99999', 'SpecialState': '116'} | +| 3954 | 解呪アイテム【呪耐性値回復】 | {'CurseDamage': '-99999', 'SpecialState': '116'} | +| 4600 | 解呪イベント | {'CurseDamage': '-99999', 'SpecialState': '118'} | +| 4601 | 解呪イベント | {'CurseDamage': '-99999', 'SpecialState': '116'} | +| 1 | 誓約効果テスト | {'StatusIcon': '5013', 'EffectDuration': '-1.0', 'HPPointsLost': '-10', 'SpecialEffectCategory': '10', 'SpecialState': ' | +| 4170 | 誓約特殊待機時投げ無効状態 | {'EffectDuration': '-1.0', 'ThrowCondition': '1'} | +| 3250 | 誓約破棄 | {'SpecialState': '166'} | +| 6410 | 超出血_1 | {'EffectDuration': '2.0', 'UpdateInterval': '3.0', 'HPReductionPercentage': '50.0', 'BleedDamage': '20', 'SpecialEffectC | +| 6420 | 超出血_死神の鎌_1 | {'EffectDuration': '2.0', 'UpdateInterval': '3.0', 'HPReductionPercentage': '50.0', 'BleedDamage': '50', 'SpecialEffectC | +| 2976 | 身代わり | {'StatusIcon': '5011', 'EffectDuration': '-1.0'} | +| 5142 | 車輪スケルトン ダメージアニメ変化【大・吹っ飛び のみ】 | {'EffectDuration': '0.10000000149011612', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '200', 'ReplaceNoImp | +| 5140 | 車輪スケルトン 状態チェンジ(アニメオフセット0) | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '100'} | +| 5141 | 車輪スケルトン 状態チェンジ(アニメオフセット10000) | {'EffectDuration': '-1.0', 'AnimationIDOffset': '10000', 'SpecialEffectCategory': '100'} | +| 2121 | 軽業 | {'EffectDuration': '-1.0', 'SpecialState': '115'} | +| 3240 | 遠眼鏡 | {'EffectDuration': '-1.0', 'SpecialState': '15'} | +| 65 | 邪眼(使用者用) | {'EffectDuration': '5.0', 'SpecialState': '103', 'UseVisualEffect': '1', 'HasTarget': '1'} | +| 63 | 邪眼Lv1 | {'EffectDuration': '6.0', 'RayCastPassingTime': '3000', 'SpecialState': '108', 'UseVisualEffect': '1'} | +| 64 | 邪眼Lv2 | {'UpdateInterval': '0.20000000298023224', 'HPPointsLost': '20', 'RayCastPassingTime': '1', 'SpecialState': '109', 'UseVi | +| 5491 | 重騎士 エスト中SA減少 | {'EffectDuration': '0.10000000149011612', 'PoiseAddition': '-100', 'SpecialState': '155'} | +| 5000 | 金縛り | {'EffectDuration': '5.0', 'SpecialState': '32', 'UseVisualEffect': '1'} | +| 1130 | 鉄の身体【はじきダメージ減少効果】 | {'StatusIcon': '5002', 'EffectDuration': '30.0', 'IncomingSlashDamageMultiplier': '0.6000000238418579', 'IncomingStrikeD | +| 1150 | 鉄の身体【ダメージアニメ変化効果】 | {'EffectDuration': '30.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '1', 'ReplaceSmallImpactLevel': '1' | +| 1140 | 鉄の身体【移動鈍足効果】 | {'EffectDuration': '30.0', 'SpecialEffectCategory': '1000', 'SpecialEffectPriority': '1', 'MovementType': '5', 'Affected | +| 3977 | 鉱石の精霊DS | {'SoulAmountChange': '5000'} | +| 1230 | 闇の霧用の猛毒 | {'EffectDuration': '180.0', 'UpdateInterval': '1.0199999809265137', 'HPPointsLost': '4', 'PoisonDamage': '8', 'SpecialEf | +| 2200 | 闇歩き | {'StatusIcon': '5014', 'EffectDuration': '-1.0'} | +| 4523 | 闘技場1対1【大】テリトリ内 | {'EffectDuration': '3.0', 'SpecialEffectCategory': '20', 'SpecialState': '219'} | +| 4526 | 闘技場1対1【大】召喚希望A | {'SpecialEffectCategory': '20', 'SpecialState': '222'} | +| 4527 | 闘技場1対1【大】召喚希望B | {'SpecialEffectCategory': '20', 'SpecialState': '223'} | +| 4510 | 闘技場1対1【小】テリトリ内 | {'EffectDuration': '3.0', 'SpecialEffectCategory': '20', 'SpecialState': '206'} | +| 4513 | 闘技場1対1【小】召喚希望A | {'SpecialEffectCategory': '20', 'SpecialState': '209'} | +| 4514 | 闘技場1対1【小】召喚希望B | {'SpecialEffectCategory': '20', 'SpecialState': '210'} | +| 4524 | 闘技場2対2【大】テリトリ内 | {'EffectDuration': '3.0', 'SpecialEffectCategory': '20', 'SpecialState': '220'} | +| 4528 | 闘技場2対2【大】召喚希望A1 | {'SpecialEffectCategory': '20', 'SpecialState': '224'} | +| 4529 | 闘技場2対2【大】召喚希望A2 | {'SpecialEffectCategory': '20', 'SpecialState': '225'} | +| 4530 | 闘技場2対2【大】召喚希望B1 | {'SpecialEffectCategory': '20', 'SpecialState': '226'} | +| 4531 | 闘技場2対2【大】召喚希望B2 | {'SpecialEffectCategory': '20', 'SpecialState': '227'} | +| 4511 | 闘技場2対2【小】テリトリ内 | {'EffectDuration': '3.0', 'SpecialEffectCategory': '20', 'SpecialState': '207'} | +| 4515 | 闘技場2対2【小】召喚希望A1 | {'SpecialEffectCategory': '20', 'SpecialState': '211'} | +| 4516 | 闘技場2対2【小】召喚希望A2 | {'SpecialEffectCategory': '20', 'SpecialState': '212'} | +| 4517 | 闘技場2対2【小】召喚希望B1 | {'SpecialEffectCategory': '20', 'SpecialState': '213'} | +| 4518 | 闘技場2対2【小】召喚希望B2 | {'SpecialEffectCategory': '20', 'SpecialState': '214'} | +| 4525 | 闘技場バトルロイヤル【大】テリトリ内 | {'EffectDuration': '3.0', 'SpecialEffectCategory': '20', 'SpecialState': '221'} | +| 4532 | 闘技場バトルロイヤル【大】召喚希望A | {'SpecialEffectCategory': '20', 'SpecialState': '228'} | +| 4533 | 闘技場バトルロイヤル【大】召喚希望B | {'SpecialEffectCategory': '20', 'SpecialState': '229'} | +| 4534 | 闘技場バトルロイヤル【大】召喚希望C | {'SpecialEffectCategory': '20', 'SpecialState': '230'} | +| 4535 | 闘技場バトルロイヤル【大】召喚希望D | {'SpecialEffectCategory': '20', 'SpecialState': '231'} | +| 4512 | 闘技場バトルロイヤル【小】テリトリ内 | {'EffectDuration': '3.0', 'SpecialEffectCategory': '20', 'SpecialState': '208'} | +| 4519 | 闘技場バトルロイヤル【小】召喚希望A | {'SpecialEffectCategory': '20', 'SpecialState': '215'} | +| 4520 | 闘技場バトルロイヤル【小】召喚希望B | {'SpecialEffectCategory': '20', 'SpecialState': '216'} | +| 4521 | 闘技場バトルロイヤル【小】召喚希望C | {'SpecialEffectCategory': '20', 'SpecialState': '217'} | +| 4522 | 闘技場バトルロイヤル【小】召喚希望D | {'SpecialEffectCategory': '20', 'SpecialState': '218'} | +| 4613 | 闘技場内 NoDead | {'EffectDuration': '3.0', 'SpecialEffectCategory': '20', 'SpecialState': '235'} | +| 4614 | 闘技場内 同率1位SFX用 | {'EffectDuration': '5.0', 'SpecialEffectCategory': '20', 'SpecialState': '236', 'UseVisualEffect': '1'} | +| 4610 | 闘技場内 指定アイテム使用禁止 | {'EffectDuration': '3.0', 'SpecialEffectCategory': '20', 'SpecialState': '232'} | +| 4612 | 闘技場内 暫定1位SFX用 | {'EffectDuration': '5.0', 'SpecialEffectCategory': '20', 'SpecialState': '234', 'UseVisualEffect': '1'} | +| 4618 | 闘技場内 暫定1位(100連勝)SFX用 | {'EffectDuration': '5.0', 'SpecialEffectCategory': '20', 'SpecialState': '241', 'UseVisualEffect': '1'} | +| 4615 | 闘技場内 暫定1位(10連勝)SFX用 | {'EffectDuration': '5.0', 'SpecialEffectCategory': '20', 'SpecialState': '238', 'UseVisualEffect': '1'} | +| 4616 | 闘技場内 暫定1位(30連勝)SFX用 | {'EffectDuration': '5.0', 'SpecialEffectCategory': '20', 'SpecialState': '239', 'UseVisualEffect': '1'} | +| 4617 | 闘技場内 暫定1位(50連勝)SFX用 | {'EffectDuration': '5.0', 'SpecialEffectCategory': '20', 'SpecialState': '240', 'UseVisualEffect': '1'} | +| 4611 | 闘技場内 闘技場死亡 | {'EffectDuration': '5.0', 'SpecialState': '233', 'ThrowCondition': '1', 'UseVisualEffect': '1', 'AffectsMagic': '1', 'Af | +| 3318 | 陰の太陽グウィンドリンのソウル | {'SoulAmountChange': '16000'} | +| 2021 | 雷耐性アップ | {'StatusIcon': '5002', 'EffectDuration': '-1.0', 'LightningDefenseAddition': '50'} | +| 2978 | 霊体隠れ | {'StatusIcon': '5009', 'EffectDuration': '-1.0', 'EnemySightPercentageReduction': '70', 'EnemyHearingPercentageReduction | +| 2110 | 音消去 | {'StatusIcon': '5009', 'EffectDuration': '-1.0', 'EnemyHearingPercentageReduction': '100', 'SpecialState': '54', 'UseVis | +| 3975 | 飛竜子DS | {'SoulAmountChange': '10000'} | +| 3976 | 飛竜親DS | {'SoulAmountChange': '30000'} | +| 5019 | 騎士 回復アイテムを使う | {'HPPointsLost': '-100'} | +| 3311 | 騎士アルトリウスのソウル | {'SoulAmountChange': '16000'} | +| 3314 | 騎士ロードリクのソウル | {'SoulAmountChange': '12000'} | +| 630 | 魅了 | {'EffectDuration': '30.0', 'SpecialState': '132', 'UseVisualEffect': '1'} | +| 81101 | 魅了無効 | {'EffectDuration': '-1.0'} | +| 50 | 魔法の天性(スロット+3版) | {'EffectDuration': '-1.0', 'AttunementSlotCountChange': '3'} | +| 2040 | 魔法スロットアップ | {'EffectDuration': '-1.0', 'AttunementSlotCountChange': '1'} | +| 2310 | 魔法スロットアップB | {'EffectDuration': '-1.0', 'AttunementSlotCountChange': '1'} | +| 2050 | 魔法威力アップ | {'StatusIcon': '5004', 'EffectDuration': '-1.0', 'PhysicalAttackPowerMultiplier': '1.2000000476837158', 'MagicAttackPowe | +| 2022 | 魔法耐性アップ | {'StatusIcon': '5002', 'EffectDuration': '-1.0', 'MagicDefenseAddition': '50'} | +| 2986 | 魔法鈍感 | {'EffectDuration': '-1.0', 'PhysicalAttackPowerMultiplier': '0.699999988079071', 'MagicAttackPowerMultiplier': '0.699999 | +| 1160 | 魔法防護1 | {'StatusIcon': '5002', 'EffectDuration': '40.0', 'IncomingMagicDamageMultiplier': '0.699999988079071', 'SpecialEffectCat | +| 1170 | 魔法防護2 | {'StatusIcon': '5002', 'EffectDuration': '40.0', 'IncomingMagicDamageMultiplier': '0.10000000149011612', 'SpecialEffectC | +| 3966 | 黄衣の翁DS | {'SoulAmountChange': '26400'} | +| 1984 | 黒ゴースト化 | {'EffectDuration': '30.0', 'SoulsFromKillsMultiplier': '1.5', 'SpecialEffectCategory': '10001', 'SpecialState': '22', 'U | +| 1983 | 黒ゴースト退散 | {'SpecialState': '18'} | +| 5022 | 黒タコ頭_ソウルスティール | {'SpecialState': '14', 'UseVisualEffect': '1'} | +| 1710 | 黒救援探知魔法 | {'EffectDuration': '-1.0', 'SpecialState': '150'} | +| 2350 | 黒竜の指輪 | {'EffectDuration': '-1.0', 'IncomingSlashDamageMultiplier': '2.0', 'IncomingStrikeDamageMultiplier': '2.0', 'IncomingThr | +| 5100 | DS2 ガスマン常駐 | {'EffectDuration': '-1.0', 'SpecialState': '97', 'UseVisualEffect': '1'} | +| 5102 | DS2プロト 獄吏_回復魔法 | {'UpdateInterval': '0.10000000149011612', 'HPReductionPercentage': '-4.0', 'SpecialState': '42', 'UseVisualEffect': '1'} | +| 5103 | DS2プロト 邪眼(使い手) | {'EffectDuration': '-1.0', 'SpecialState': '103'} | +| 5101 | DS2プロト 騎士_アイテムを使う | {'HPReductionPercentage': '-40.0'} | +| 5362 | SA時ダメージアニメ変化【中のみ】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '150', 'ReplaceNoImpactLevel': '1', | +| 5360 | SA時ダメージアニメ変化【全てアニメなし】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '150', 'ReplaceNoImpactLevel': '1', | +| 5363 | SA時ダメージアニメ変化【小と中】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '150', 'ReplaceNoImpactLevel': '1', | +| 5361 | SA時ダメージアニメ変化【小のみ】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '150', 'ReplaceNoImpactLevel': '1', | +| 5364 | SA時ダメージアニメ変化【小のみ・大無効】 | {'EffectDuration': '-1.0', 'SpecialEffectCategory': '1001', 'SpecialEffectPriority': '150', 'ReplaceNoImpactLevel': '1', | diff --git a/scripts_decompiled/001540_logic.lua b/scripts_decompiled/001540_logic.lua new file mode 100644 index 0000000..94cd390 --- /dev/null +++ b/scripts_decompiled/001540_logic.lua @@ -0,0 +1,19 @@ +REGISTER_LOGIC_FUNC(LOGIC_ID_Wataa1540, "Wataa1540_Logic", "Wataa1540_Interupt") +function Wataa1540_Logic(ai) + ai:AddTopGoal(GOAL_COMMON_MoveToSomewhere, 5, POINT_AutoWalkAroundTest, AI_DIR_TYPE_CENTER, 1, TARGET_LOCALPLAYER, false) + return +end + +function Wataa1540_Interupt(ai, goal) + if ai:DbgAutoRemo_IsWaitCommand() then + goal:ClearSubGoal() + local wait = ai:DbgAutoRemo_GetWaitCommandTime() + ai:AddTopGoal(GOAL_COMMON_Wait, wait, TARGET_NONE, 0, 0, 0) + ai:DbgAutoRemo_ResetWaitCommand() + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/006000_battle.lua b/scripts_decompiled/006000_battle.lua new file mode 100644 index 0000000..aeabbcd --- /dev/null +++ b/scripts_decompiled/006000_battle.lua @@ -0,0 +1,406 @@ +REGISTER_GOAL(GOAL_Knight_of_Sun6000_Battle, "Knight_of_Sun6000Battle") +local NormalR_min = 0 +local NormalR_max = 2 +local Guard_NormalR_min = 0 +local Guard_NormalR_max = 1.5 +local LargeR_min = 0 +local LargeR_max = 2.9 +local Whand_jyaku_min = 0 +local Whand_jyaku_max = 2.1 +local Whand_kyou_min = 0 +local Whand_kyou_max = 2.1 +local PushR_min = 0 +local PushR_max = 1.1 +local Magic_min = 5 +local Magic_max = 10 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 2.8 +local Rolling_Atk_min = 4 +local Rolling_Atk_max = 5 +REGISTER_GOAL_NO_UPDATE(GOAL_Knight_of_Sun6000_Battle, 1) +function Knight_of_Sun6000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local BothHandOff = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local MagicValue = 1 + local Magic1Limit = ai:GetNumber(0) + if 5 <= Magic1Limit then + MagicValue = 0 + end + if ai:IsTargetGuard(TARGET_ENE_0) == false and ai:IsBothHandMode(TARGET_SELF) and BothHandOff <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + if 8 <= targetDist then + actPerArr[1] = 5 + actPerArr[3] = 5 + actPerArr[5] = 45 * MagicValue + actPerArr[7] = 40 + actPerArr[10] = 5 + elseif 5 <= targetDist then + actPerArr[1] = 15 + actPerArr[3] = 15 + actPerArr[5] = 35 * MagicValue + actPerArr[7] = 30 + actPerArr[10] = 5 + elseif 2.9 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 25 + actPerArr[3] = 25 + actPerArr[5] = 50 * MagicValue + else + actPerArr[1] = 30 + actPerArr[3] = 30 + actPerArr[5] = 35 * MagicValue + actPerArr[10] = 5 + end + elseif 1 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 28 + actPerArr[3] = 27 + actPerArr[4] = 10 + actPerArr[6] = 25 + actPerArr[9] = 10 + else + actPerArr[1] = 30 + actPerArr[3] = 30 + actPerArr[6] = 25 + actPerArr[9] = 10 + actPerArr[10] = 5 + end + elseif ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 25 + actPerArr[3] = 25 + actPerArr[4] = 20 + actPerArr[6] = 20 + actPerArr[9] = 10 + else + actPerArr[1] = 30 + actPerArr[3] = 30 + actPerArr[6] = 25 + actPerArr[9] = 10 + actPerArr[10] = 5 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Knight_of_Sun6000_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Knight_of_Sun6000_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, Knight_of_Sun6000_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, Knight_of_Sun6000_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, Knight_of_Sun6000_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, Knight_of_Sun6000_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, Knight_of_Sun6000_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, Knight_of_Sun6000_Act08) + actFuncArr[9] = REGIST_FUNC(ai, goal, Knight_of_Sun6000_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, Knight_of_Sun6000_Act10) + local atkAfterFunc = REGIST_FUNC(ai, goal, Knight_of_Sun6000_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function Knight_of_Sun6000_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + if ai:IsTargetGuard(TARGET_ENE_0) == true and not ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Guard_NormalR_max +function Knight_of_Sun6000_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + if ai:IsTargetGuard(TARGET_ENE_0) == true and not ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + local AppDist = Guard_NormalR_max + local DashDist = Guard_NormalR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function Knight_of_Sun6000_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + if ai:IsTargetGuard(TARGET_ENE_0) == true and not ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + end + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function Knight_of_Sun6000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Magic_max +NormalR_min = Magic_min +function Knight_of_Sun6000_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic1Limit = ai:GetNumber(0) + CommonNPC_ChangeWepR2(ai, goal) + if Magic_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2.5, TARGET_ENE_0, Magic_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + elseif targetDist <= Magic_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, Magic_min, TARGET_ENE_0, false, -1) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + ai:SetNumber(0, Magic1Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_Atk_max +function Knight_of_Sun6000_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + if ai:IsTargetGuard(TARGET_ENE_0) == true and not ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + local AppDist = Backstep_Atk_max + local DashDist = Backstep_Atk_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Rolling_Atk_max +function Knight_of_Sun6000_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + if ai:IsTargetGuard(TARGET_ENE_0) == true and not ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + local AppDist = Rolling_Atk_max + local DashDist = Rolling_Atk_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Knight_of_Sun6000_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(2, 2.5), TARGET_SELF, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, 4) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Knight_of_Sun6000_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Knight_of_Sun6000_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Knight_of_Sun6000_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 5 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate2 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepL, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 2) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepR, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 2) + end + elseif fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 6, TARGET_ENE_0, ai:GetRandam_Float(1.5, 3), TARGET_ENE_0, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + return +end + +function Knight_of_Sun6000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Knight_of_Sun6000Battle_Terminate(ai, goal) + return +end + +NormalR_min = LargeR_max +function Knight_of_Sun6000Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 10 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 80 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 10 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + end + end + if ai:IsInterupt(INTERUPT_GuardBreak) then + local distGuardBreak_Act = 2 + local oddsGuardBreak_Act = 100 + if targetDist <= distGuardBreak_Act and fate <= oddsGuardBreak_Act then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 10 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + else + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/006010_battle.lua b/scripts_decompiled/006010_battle.lua new file mode 100644 index 0000000..be71799 --- /dev/null +++ b/scripts_decompiled/006010_battle.lua @@ -0,0 +1,386 @@ +REGISTER_GOAL(GOAL_DarkMoonKnight6010_Battle, "DarkMoonKnight6010Battle") +local NormalR_min = 0 +local NormalR_max = 2.3 +local Guard_NormalR_min = 0 +local Guard_NormalR_max = 1.5 +local LargeR_min = 0 +local LargeR_max = 3.1 +local PushR_min = 0 +local PushR_max = 1 +local Magic_min = 8 +local Magic_max = 8 +local NPC_ATK_Parry_min = 0 +local NPC_ATK_Parry_max = 0.8 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 2.8 +local Rolling_Atk_min = 4 +local Rolling_Atk_max = 6 +REGISTER_GOAL_NO_UPDATE(GOAL_DarkMoonKnight6010_Battle, 1) +function DarkMoonKnight6010Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if ai:IsFinishTimer(0) == true and 3 <= targetDist then + ai:SetTimer(0, 9999) + actPerArr[9] = 100 + end + local canMagic = 0 + if ai:IsFinishTimer(1) == true then + canMagic = 1 + end + local Magic1Limit = ai:GetNumber(2) + if 5 <= Magic1Limit then + canMagic = 0 + end + if 8 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 20 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 80 + actPerArr[7] = 0 + actPerArr[8] = 0 + actPerArr[9] = 100 * canMagic + elseif 5 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 20 + actPerArr[3] = 20 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 40 + actPerArr[7] = 0 + actPerArr[8] = 0 + actPerArr[9] = 100 * canMagic + elseif 2.8 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 20 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 0 + actPerArr[7] = 80 + actPerArr[8] = 0 + actPerArr[9] = 100 * canMagic + else + actPerArr[1] = 20 + actPerArr[2] = 20 + actPerArr[3] = 40 + actPerArr[4] = 0 + actPerArr[5] = 20 + actPerArr[6] = 0 + actPerArr[7] = 0 + actPerArr[8] = 0 + actPerArr[9] = 100 * canMagic + end + elseif 1 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 20 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 0 + actPerArr[7] = 80 + actPerArr[8] = 0 + actPerArr[9] = 100 * canMagic + else + actPerArr[1] = 15 + actPerArr[2] = 15 + actPerArr[3] = 20 + actPerArr[4] = 0 + actPerArr[5] = 30 + actPerArr[6] = 0 + actPerArr[7] = 0 + actPerArr[8] = 20 + actPerArr[9] = 100 * canMagic + end + elseif ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 20 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 0 + actPerArr[7] = 80 + actPerArr[8] = 0 + actPerArr[9] = 100 * canMagic + else + actPerArr[1] = 10 + actPerArr[2] = 10 + actPerArr[3] = 20 + actPerArr[4] = 30 + actPerArr[5] = 10 + actPerArr[6] = 0 + actPerArr[7] = 0 + actPerArr[8] = 20 + actPerArr[9] = 100 * canMagic + end + actFuncArr[1] = REGIST_FUNC(ai, goal, DarkMoonKnight6010_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, DarkMoonKnight6010_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, DarkMoonKnight6010_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, DarkMoonKnight6010_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, DarkMoonKnight6010_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, DarkMoonKnight6010_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, DarkMoonKnight6010_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, DarkMoonKnight6010_Act08) + actFuncArr[9] = REGIST_FUNC(ai, goal, DarkMoonKnight6010_Act09) + local atkAfterFunc = REGIST_FUNC(ai, goal, DarkMoonKnight6010_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function DarkMoonKnight6010_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 100 + CommonNPC_ChangeWepL1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Guard_NormalR_max +function DarkMoonKnight6010_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Guard_NormalR_max + local DashDist = Guard_NormalR_max + 5 + local Odds_Guard = 100 + CommonNPC_ChangeWepL1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function DarkMoonKnight6010_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + CommonNPC_ChangeWepL1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function DarkMoonKnight6010_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 100 + CommonNPC_ChangeWepL1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = NormalR_max +function DarkMoonKnight6010_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 100 + CommonNPC_ChangeWepL1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Rolling_Atk_max +function DarkMoonKnight6010_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Rolling_Atk_max + local DashDist = Rolling_Atk_max + 5 + local Odds_Guard = 100 + CommonNPC_ChangeWepL1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function DarkMoonKnight6010_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepL1(ai, goal) + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(2, 2.5), TARGET_SELF, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, 4) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function DarkMoonKnight6010_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + CommonNPC_ChangeWepL1(ai, goal) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR_min = Magic_min +function DarkMoonKnight6010_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic1Limit = ai:GetNumber(2) + CommonNPC_ChangeWepL2(ai, goal) + if targetDist <= Magic_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, Magic_min, TARGET_ENE_0, false, -1) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 1, NPC_ATK_MagicL, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 1, NPC_ATK_MagicL, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + ai:SetTimer(1, 62) + ai:SetNumber(2, Magic1Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function DarkMoonKnight6010_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 80 then + if fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 6, TARGET_ENE_0, ai:GetRandam_Float(1.5, 3), TARGET_ENE_0, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + end + return +end + +function DarkMoonKnight6010Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function DarkMoonKnight6010Battle_Terminate(ai, goal) + return +end + +function DarkMoonKnight6010Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local ParryDist = 3 + local ParryAng = 60 + local ParryThrowDist = 4 + local ParryThrowAng = 60 + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 80 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 40 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 10 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_ParryTiming) then + if targetDist <= ParryDist and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, ParryAng) and ai:IsTargetGuard(TARGET_SELF) == true then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_Parry, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + elseif ai:IsInterupt(INTERUPT_SuccessParry) and targetDist <= ParryThrowDist and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, ParryThrowAng) then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, TARGET_ENE_0, 1, TARGET_SELF, false, -1) + local life = ai:GetRandam_Float(0.3, 0.6) + goal:AddSubGoal(GOAL_COMMON_Wait, life, TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + return false +end + +return diff --git a/scripts_decompiled/006020_battle.lua b/scripts_decompiled/006020_battle.lua new file mode 100644 index 0000000..a0b529f --- /dev/null +++ b/scripts_decompiled/006020_battle.lua @@ -0,0 +1,367 @@ +REGISTER_GOAL(GOAL_Knight_Ostra6020_Battle, "Knight_Ostra6020Battle") +local NormalR_min = 0 +local NormalR_max = 2 +local LargeR_min = 0 +local LargeR_max = 2.9 +local Whand_jyaku_min = 0 +local Whand_jyaku_max = 2 +local Whand_kyou_min = 0 +local Whand_kyou_max = 3.1 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 1.4 +local Backstep_AtkW_min = 0 +local Backstep_AtkW_max = 1.8 +local Rolling_Atk_min = 3.5 +local Rolling_Atk_max = 4.5 +local Rolling_AtkW_min = 4.5 +local Rolling_AtkW_max = 5.5 +local PushR_min = 0 +local PushR_max = 0.8 +REGISTER_GOAL_NO_UPDATE(GOAL_Knight_Ostra6020_Battle, 1) +function Knight_Ostra6020Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local BothHandOff = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local RYOUTE_odds = 1 + local KATATE_odds = 1 + if ai:IsTargetGuard(TARGET_ENE_0) == true then + RYOUTE_odds = 10 + end + if 8 <= targetDist then + actPerArr[1] = 10 * KATATE_odds + actPerArr[2] = 20 * KATATE_odds + actPerArr[7] = 20 * KATATE_odds + actPerArr[9] = 10 * RYOUTE_odds + actPerArr[10] = 20 * RYOUTE_odds + actPerArr[15] = 20 * RYOUTE_odds + elseif 4 <= targetDist then + actPerArr[1] = 15 * KATATE_odds + actPerArr[2] = 15 * KATATE_odds + actPerArr[7] = 20 * KATATE_odds + actPerArr[9] = 10 * RYOUTE_odds + actPerArr[10] = 20 * RYOUTE_odds + actPerArr[15] = 20 * RYOUTE_odds + elseif 2.1 <= targetDist then + actPerArr[1] = 25 * KATATE_odds + actPerArr[2] = 25 * KATATE_odds + actPerArr[9] = 25 * RYOUTE_odds + actPerArr[10] = 25 * RYOUTE_odds + elseif 1 <= targetDist then + actPerArr[1] = 18 * KATATE_odds + actPerArr[2] = 17 * KATATE_odds + actPerArr[5] = 15 * KATATE_odds + actPerArr[9] = 10 * RYOUTE_odds + actPerArr[10] = 10 * RYOUTE_odds + actPerArr[13] = 13 * KATATE_odds + actPerArr[17] = 30 * RYOUTE_odds + else + actPerArr[1] = 15 * KATATE_odds + actPerArr[2] = 15 * KATATE_odds + actPerArr[5] = 10 * KATATE_odds + actPerArr[17] = 20 * RYOUTE_odds + actPerArr[18] = 10 * KATATE_odds + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Knight_Ostra6020_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Knight_Ostra6020_Act02) + actFuncArr[5] = REGIST_FUNC(ai, goal, Knight_Ostra6020_Act05) + actFuncArr[7] = REGIST_FUNC(ai, goal, Knight_Ostra6020_Act07) + actFuncArr[9] = REGIST_FUNC(ai, goal, Knight_Ostra6020_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, Knight_Ostra6020_Act10) + actFuncArr[13] = REGIST_FUNC(ai, goal, Knight_Ostra6020_Act13) + actFuncArr[15] = REGIST_FUNC(ai, goal, Knight_Ostra6020_Act15) + actFuncArr[17] = REGIST_FUNC(ai, goal, Knight_Ostra6020_Act17) + actFuncArr[18] = REGIST_FUNC(ai, goal, Knight_Ostra6020_Act18) + local atkAfterFunc = REGIST_FUNC(ai, goal, Knight_Ostra6020_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function Knight_Ostra6020_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function Knight_Ostra6020_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_Atk_max +function Knight_Ostra6020_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = Backstep_Atk_max + local DashDist = Backstep_Atk_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Rolling_Atk_max +function Knight_Ostra6020_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = Rolling_Atk_max + local DashDist = Rolling_Atk_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Whand_jyaku_max +function Knight_Ostra6020_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Whand_jyaku_max + local DashDist = Whand_jyaku_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Whand_kyou_max +function Knight_Ostra6020_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Whand_kyou_max + local DashDist = Whand_kyou_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_AtkW_max +function Knight_Ostra6020_Act13(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Backstep_AtkW_max + local DashDist = Backstep_AtkW_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Rolling_AtkW_max +function Knight_Ostra6020_Act15(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Rolling_AtkW_max + local DashDist = Rolling_AtkW_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function Knight_Ostra6020_Act17(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Knight_Ostra6020_Act18(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Knight_Ostra6020_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 5 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate2 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepL, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 2) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepR, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 2) + end + elseif fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 6, TARGET_ENE_0, ai:GetRandam_Float(1.5, 3), TARGET_ENE_0, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + return +end + +function Knight_Ostra6020Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Knight_Ostra6020Battle_Terminate(ai, goal) + return +end + +NormalR_min = LargeR_max +function Knight_Ostra6020Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 10 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 80 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 10 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + end + end + if ai:IsInterupt(INTERUPT_GuardBreak) then + local distGuardBreak_Act = 2 + local oddsGuardBreak_Act = 100 + if targetDist <= distGuardBreak_Act and fate <= oddsGuardBreak_Act then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 10 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + else + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/006030_battle.lua b/scripts_decompiled/006030_battle.lua new file mode 100644 index 0000000..bbe8b02 --- /dev/null +++ b/scripts_decompiled/006030_battle.lua @@ -0,0 +1,408 @@ +REGISTER_GOAL(GOAL_BigHat_Logarn6030_Battle, "BigHat_Logarn6030Battle") +local NormalR2_min = 0 +local NormalR2_max = 1.3 +local Backstep_Atk2_min = 0 +local Backstep_Atk2_max = 1 +local Rolling_Atk2_min = 3.5 +local Rolling_Atk2_max = 4 +local Magic_min = 7 +local Magic_max = 10 +local Magic2_min = 7 +local Magic2_max = 10 +local Magic3_min = 9 +local Magic3_max = 12 +local Magic4_min = 9 +local Magic4_max = 12 +local Magic5_min = 9 +local Magic5_max = 12 +REGISTER_GOAL_NO_UPDATE(GOAL_BigHat_Logarn6030_Battle, 1) +function BigHat_Logarn6030Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local myThinkId = ai:GetNpcThinkParamID() + if myThinkId == 6032 then + if ai:IsLadderAct(TARGET_SELF) then + actPerArr[1] = 100 + elseif 7 <= targetDist then + actPerArr[3] = 2 + actPerArr[8] = 3 + actPerArr[10] = 13 + actPerArr[11] = 14 + actPerArr[12] = 14 + actPerArr[13] = 14 + actPerArr[14] = 40 + elseif 3.5 <= targetDist then + actPerArr[3] = 5 + actPerArr[8] = 5 + actPerArr[10] = 10 + actPerArr[11] = 10 + actPerArr[12] = 10 + actPerArr[13] = 10 + actPerArr[14] = 35 + actPerArr[20] = 15 + elseif 1 <= targetDist then + actPerArr[3] = 10 + actPerArr[10] = 8 + actPerArr[11] = 8 + actPerArr[12] = 8 + actPerArr[13] = 8 + actPerArr[14] = 33 + actPerArr[20] = 25 + else + actPerArr[3] = 5 + actPerArr[6] = 5 + actPerArr[10] = 10 + actPerArr[11] = 10 + actPerArr[12] = 10 + actPerArr[13] = 10 + actPerArr[14] = 35 + actPerArr[20] = 15 + end + elseif ai:IsLadderAct(TARGET_SELF) then + actPerArr[1] = 100 + elseif 7 <= targetDist then + actPerArr[3] = 2 + actPerArr[8] = 3 + actPerArr[10] = 18 + actPerArr[11] = 19 + actPerArr[12] = 29 + actPerArr[13] = 29 + elseif 3.5 <= targetDist then + actPerArr[3] = 5 + actPerArr[8] = 5 + actPerArr[10] = 15 + actPerArr[11] = 15 + actPerArr[12] = 22 + actPerArr[13] = 23 + actPerArr[20] = 15 + elseif 1 <= targetDist then + actPerArr[3] = 10 + actPerArr[10] = 10 + actPerArr[11] = 10 + actPerArr[12] = 22 + actPerArr[13] = 23 + actPerArr[20] = 25 + else + actPerArr[3] = 5 + actPerArr[6] = 5 + actPerArr[10] = 15 + actPerArr[11] = 15 + actPerArr[12] = 22 + actPerArr[13] = 23 + actPerArr[20] = 15 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, BigHat_Logarn6030_Act01) + actFuncArr[3] = REGIST_FUNC(ai, goal, BigHat_Logarn6030_Act03) + actFuncArr[6] = REGIST_FUNC(ai, goal, BigHat_Logarn6030_Act06) + actFuncArr[8] = REGIST_FUNC(ai, goal, BigHat_Logarn6030_Act06) + actFuncArr[10] = REGIST_FUNC(ai, goal, BigHat_Logarn6030_Act10) + actFuncArr[11] = REGIST_FUNC(ai, goal, BigHat_Logarn6030_Act11) + actFuncArr[12] = REGIST_FUNC(ai, goal, BigHat_Logarn6030_Act12) + actFuncArr[13] = REGIST_FUNC(ai, goal, BigHat_Logarn6030_Act13) + actFuncArr[14] = REGIST_FUNC(ai, goal, BigHat_Logarn6030_Act14) + actFuncArr[20] = REGIST_FUNC(ai, goal, BigHat_Logarn6030_Act20) + local atkAfterFunc = REGIST_FUNC(ai, goal, BigHat_Logarn6030_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +function BigHat_Logarn6030_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 1, TARGET_ENE_0, 0.8, TARGET_SELF, false, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR2_min = NormalR2_max +function BigHat_Logarn6030_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR2(ai, goal) + local AppDist = NormalR2_max + local DashDist = NormalR2_max + 5 + local Odds_Guard = 0 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR2_min = Backstep_Atk2_max +function BigHat_Logarn6030_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR2(ai, goal) + local AppDist = Backstep_Atk2_max + local DashDist = Backstep_Atk2_max + 5 + local Odds_Guard = 0 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function BigHat_Logarn6030_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR2(ai, goal) + local AppDist = Rolling_Atk_max + local DashDist = Rolling_Atk_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR2_min = Magic_max +NormalR2_min = Magic_min +function BigHat_Logarn6030_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + CommonNPC_ChangeWepR1(ai, goal) + ai:ChangeEquipMagic(0) + if Magic_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2.5, TARGET_ENE_0, Magic_max, TARGET_SELF, false, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_Far, 1.5, 90) + elseif targetDist <= Magic_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, Magic_min, TARGET_ENE_0, false, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_Far, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_Far, 1.5, 90) + end + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR2_min = Magic2_max +NormalR2_min = Magic2_min +function BigHat_Logarn6030_Act11(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + CommonNPC_ChangeWepR1(ai, goal) + ai:ChangeEquipMagic(1) + if Magic2_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2.5, TARGET_ENE_0, Magic2_max, TARGET_SELF, false, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_Far, 1.5, 90) + elseif targetDist <= Magic2_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, Magic2_min, TARGET_ENE_0, false, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_Far, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_Far, 1.5, 90) + end + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR2_min = Magic3_max +NormalR2_min = Magic3_min +function BigHat_Logarn6030_Act12(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + CommonNPC_ChangeWepR1(ai, goal) + ai:ChangeEquipMagic(2) + if Magic3_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3.5, TARGET_ENE_0, Magic3_max, TARGET_SELF, false, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_Far, 1.5, 90) + elseif targetDist <= Magic3_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3.5, TARGET_ENE_0, Magic3_min, TARGET_ENE_0, false, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_Far, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_Far, 1.5, 90) + end + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR2_min = Magic4_max +NormalR2_min = Magic4_min +function BigHat_Logarn6030_Act13(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + CommonNPC_ChangeWepR1(ai, goal) + ai:ChangeEquipMagic(3) + if Magic4_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3.5, TARGET_ENE_0, Magic4_max, TARGET_SELF, false, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_Far, 1.5, 90) + elseif targetDist <= Magic4_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3.5, TARGET_ENE_0, Magic4_min, TARGET_ENE_0, false, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_Far, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_Far, 1.5, 90) + end + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR2_min = Magic5_max +NormalR2_min = Magic5_min +function BigHat_Logarn6030_Act14(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + CommonNPC_ChangeWepR1(ai, goal) + ai:ChangeEquipMagic(4) + if Magic5_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3.5, TARGET_ENE_0, Magic5_max, TARGET_SELF, false, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_Far, 1.5, 90) + elseif targetDist <= Magic5_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3.5, TARGET_ENE_0, Magic5_min, TARGET_ENE_0, false, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_Far, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_Far, 1.5, 90) + end + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function BigHat_Logarn6030_Act20(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if 7 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(2, 2.5), TARGET_SELF, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, 4) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function BigHat_Logarn6030_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 40 then + if fate2 <= 30 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 6, TARGET_ENE_0, ai:GetRandam_Float(1.5, 3), TARGET_ENE_0, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + end + return +end + +function BigHat_Logarn6030Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function BigHat_Logarn6030Battle_Terminate(ai, goal) + return +end + +function BigHat_Logarn6030Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 40 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 5) + end + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 40 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 5) + end + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 10 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 5) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 80 + if fate <= shootIntPer then + goal:ClearSubGoal() + if 7 < targetDist then + if fate2 <= 30 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 5) + else + CommonNPC_ChangeWepR1(ai, goal) + ai:ChangeEquipMagic(3) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_Far, 1.5, 90) + end + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 5) + end + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/006040_battle.lua b/scripts_decompiled/006040_battle.lua new file mode 100644 index 0000000..c664434 --- /dev/null +++ b/scripts_decompiled/006040_battle.lua @@ -0,0 +1,336 @@ +REGISTER_GOAL(GOAL_Pupil_of_Logarn6040_Battle, "Pupil_of_Logarn6040Battle") +local PushR_min = 0 +local PushR_max = 0.8 +local NormalR2_min = 0 +local NormalR2_max = 1.5 +local LargeR2_min = 0 +local LargeR2_max = 2.6 +local Backstep_Atk2_min = 0 +local Backstep_Atk2_max = 2.4 +local Guard_NormalR_min = 0 +local Guard_NormalR_max = 0.9 +local Magic_min = 5 +local Magic_max = 15 +local Magic2_min = 5 +local Magic2_max = 15 +REGISTER_GOAL_NO_UPDATE(GOAL_Pupil_of_Logarn6040_Battle, 1) +function Pupil_of_Logarn6040Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local BothHandOff = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local RYOUTE_odds = 1 + local KATATE_odds = 1 + if ai:IsTargetGuard(TARGET_ENE_0) == true then + RYOUTE_odds = 10 + end + local MagicValue1 = 1 + local Magic1Limit = ai:GetNumber(0) + if 20 <= Magic1Limit then + MagicValue1 = 0 + end + local MagicValue2 = 1 + local Magic2Limit = ai:GetNumber(1) + if 20 <= Magic2Limit then + MagicValue2 = 0 + end + local GuardTaiou = 0 + if ai:IsTargetGuard(TARGET_ENE_0) == true then + GuardTaiou = 1 + end + if 8 <= targetDist then + actPerArr[3] = 5 + actPerArr[4] = 5 + actPerArr[6] = 0 + actPerArr[17] = 0 * GuardTaiou + actPerArr[18] = 45 * MagicValue1 + actPerArr[19] = 45 * MagicValue2 + actPerArr[20] = 0 + elseif 4 <= targetDist then + actPerArr[3] = 10 + actPerArr[4] = 10 + actPerArr[6] = 0 + actPerArr[17] = 10 * GuardTaiou + actPerArr[18] = 35 * MagicValue1 + actPerArr[19] = 35 * MagicValue2 + actPerArr[20] = 10 * GuardTaiou + elseif 2.4 <= targetDist then + actPerArr[3] = 15 + actPerArr[4] = 15 + actPerArr[6] = 0 + actPerArr[17] = 10 * GuardTaiou + actPerArr[18] = 25 * MagicValue1 + actPerArr[19] = 25 * MagicValue2 + actPerArr[20] = 10 * GuardTaiou + elseif 1 <= targetDist then + actPerArr[3] = 15 + actPerArr[4] = 15 + actPerArr[6] = 0 + actPerArr[17] = 15 * GuardTaiou + actPerArr[18] = 20 * MagicValue1 + actPerArr[19] = 20 * MagicValue2 + actPerArr[20] = 15 * GuardTaiou + else + actPerArr[3] = 25 + actPerArr[4] = 25 + actPerArr[6] = 0 + actPerArr[17] = 15 * GuardTaiou + actPerArr[18] = 10 * MagicValue1 + actPerArr[19] = 10 * MagicValue2 + actPerArr[20] = 15 * GuardTaiou + end + actFuncArr[3] = REGIST_FUNC(ai, goal, Pupil_of_Logarn6040_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, Pupil_of_Logarn6040_Act04) + actFuncArr[6] = REGIST_FUNC(ai, goal, Pupil_of_Logarn6040_Act06) + actFuncArr[17] = REGIST_FUNC(ai, goal, Pupil_of_Logarn6040_Act17) + actFuncArr[18] = REGIST_FUNC(ai, goal, Pupil_of_Logarn6040_Act18) + actFuncArr[19] = REGIST_FUNC(ai, goal, Pupil_of_Logarn6040_Act19) + actFuncArr[20] = REGIST_FUNC(ai, goal, Pupil_of_Logarn6040_Act20) + local atkAfterFunc = REGIST_FUNC(ai, goal, Pupil_of_Logarn6040_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +PushR_min = NormalR2_max +function Pupil_of_Logarn6040_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR2(ai, goal) + local AppDist = NormalR2_max + local DashDist = NormalR2_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +PushR_min = LargeR2_max +function Pupil_of_Logarn6040_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR2(ai, goal) + local AppDist = LargeR2_max + local DashDist = LargeR2_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +PushR_min = Backstep_Atk2_max +function Pupil_of_Logarn6040_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR2(ai, goal) + local AppDist = Backstep_Atk2_max + local DashDist = Backstep_Atk2_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +PushR_min = PushR_max +function Pupil_of_Logarn6040_Act17(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +PushR_min = Magic_max +PushR_min = Magic_min +function Pupil_of_Logarn6040_Act18(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic1Limit = ai:GetNumber(0) + CommonNPC_ChangeWepR1(ai, goal) + ai:ChangeEquipMagic(0) + if Magic_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2.5, TARGET_ENE_0, Magic_max, TARGET_SELF, false, 4) + elseif targetDist <= Magic_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, Magic_min, TARGET_ENE_0, false, 4) + end + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 1.5, 90) + ai:SetNumber(0, Magic1Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +PushR_min = Magic_max +PushR_min = Magic2_max +PushR_min = Magic_min +PushR_min = Magic2_min +function Pupil_of_Logarn6040_Act19(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic2Limit = ai:GetNumber(1) + CommonNPC_ChangeWepR1(ai, goal) + ai:ChangeEquipMagic(1) + if Magic_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2.5, TARGET_ENE_0, Magic2_max, TARGET_SELF, false, 4) + elseif targetDist <= Magic_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, Magic2_min, TARGET_ENE_0, false, 4) + end + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 1.5, 90) + ai:SetNumber(1, Magic2Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Pupil_of_Logarn6040_Act20(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(2, 2.5), TARGET_SELF, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, 4) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Pupil_of_Logarn6040_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 5 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate2 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepL, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 2) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepR, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 2) + end + elseif fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate <= 15 then + if fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 6, TARGET_ENE_0, ai:GetRandam_Float(1.5, 3), TARGET_ENE_0, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + end + return +end + +function Pupil_of_Logarn6040Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Pupil_of_Logarn6040Battle_Terminate(ai, goal) + return +end + +function Pupil_of_Logarn6040Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 10 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 10 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 10 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/006050_battle.lua b/scripts_decompiled/006050_battle.lua new file mode 100644 index 0000000..a29cdc1 --- /dev/null +++ b/scripts_decompiled/006050_battle.lua @@ -0,0 +1,140 @@ +REGISTER_GOAL(GOAL_Stateless_princess6050_Battle, "Stateless_princess6050Battle") +REGISTER_GOAL_NO_UPDATE(GOAL_Stateless_princess6050_Battle, 1) +function Stateless_princess6050Battle_Activate(ai, goal) + local hprate = ai:GetHpRate(TARGET_SELF) + local selfmp = ai:GetMp(TARGET_SELF) + if 0.5 <= hprate then + Stateless_princess6050_Battle_Sword(ai, goal) + Stateless_princess6050_Battle_Kougeki_Noato(ai, goal) + elseif 15 <= selfmp then + Stateless_princess6050_Battle_Magic(ai, goal) + Stateless_princess6050_Battle_Kougeki_Noato(ai, goal) + else + Stateless_princess6050_Battle_Sword(ai, goal) + Stateless_princess6050_Battle_Kougeki_Noato(ai, goal) + end + return +end + +function Stateless_princess6050_Battle_Sword(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local NormalR_Dist = 2.5 + CommonNPC_ChangeWepR1(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + CommonNPC_ChangeWepL1(ai, goal) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 4, TARGET_ENE_0, NormalR_Dist, TARGET_SELF, true, -1) + Stateless_princess6050_Battle_NormalR_Comb(ai, goal) + elseif fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 4, TARGET_ENE_0, NormalR_Dist, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 2, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(90, 120), false, true, -1) + Stateless_princess6050_Battle_NormalR_Comb(ai, goal) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, 7, TARGET_ENE_0, false, -1) + end + return +end + +function Stateless_princess6050_Battle_Magic(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local BackDist = 8 + if targetDist <= BackDist then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(2, 4), TARGET_ENE_0, BackDist, TARGET_ENE_0, false, -1) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 0, -1) + end + return +end + +function Stateless_princess6050_Battle_NormalR_Comb(ai, goal) + local NR_fate = ai:GetRandam_Int(1, 100) + local NR_fate2 = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + if NR_fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + if NR_fate2 <= 10 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + return +end + +function Stateless_princess6050_Battle_Kougeki_Noato(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + CommonNPC_ChangeWepL1(ai, goal) + if fate <= 50 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + elseif fate2 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepL, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepR, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + end + elseif fate <= 50 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 6), TARGET_ENE_0, MoveDist, TARGET_ENE_0, false, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 6), TARGET_ENE_0, MoveDist, TARGET_ENE_0, false, -1) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Int(4, 6), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(25, 50), false, true, -1) + end + end + return +end + +function Stateless_princess6050Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Stateless_princess6050Battle_Terminate(ai, goal) + return +end + +function Stateless_princess6050Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_MissSwing) then + local MissSwingDist = 1 + local MissSwingAttPer = 50 + if targetDist <= MissSwingDist and fate <= MissSwingAttPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 10, TARGET_ENE_0, false, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 2 + local combRunPer = 40 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate2 <= 60 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, NPC_ATK_StepB, TARGET_ENE_0, DIST_None, 0) + elseif fate2 <= 80 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, NPC_ATK_StepL, TARGET_ENE_0, DIST_None, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, NPC_ATK_StepR, TARGET_ENE_0, DIST_None, 0) + end + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, NPC_ATK_StepL, TARGET_ENE_0, DIST_None, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, NPC_ATK_StepR, TARGET_ENE_0, DIST_None, 0) + end + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/006051_battle.lua b/scripts_decompiled/006051_battle.lua new file mode 100644 index 0000000..13c96b2 --- /dev/null +++ b/scripts_decompiled/006051_battle.lua @@ -0,0 +1,168 @@ +REGISTER_GOAL(GOAL_SanzA6051_Battle, "SanzA6051Battle") +REGISTER_GOAL_NO_UPDATE(GOAL_SanzA6051_Battle, 1) +function SanzA6051Battle_Activate(ai, goal) + local hprate = ai:GetHpRate(TARGET_SELF) + local selfmp = ai:GetMp(TARGET_SELF) + local timer = ai:GetTimer(0) + local flag = ai:GetNumber(0) + if 0.1 <= timer then + if flag == 1 then + SanzA6051_Battle_Bow(ai, goal) + else + SanzA6051_Battle_Sword(ai, goal) + end + else + SanzA6051_Battle_Normal_Attack(ai, goal) + ai:SetTimer(0, 4) + end + return +end + +function SanzA6051_Battle_Normal_Attack(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local nearDist = 4 + if nearDist <= targetDist then + SanzA6051_Battle_Bow(ai, goal) + ai:SetNumber(0, 1) + else + SanzA6051_Battle_Sword(ai, goal) + ai:SetNumber(0, 0) + end + return +end + +function SanzA6051_Battle_Bow(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR2(ai, goal) + if targetDist <= 7 then + if fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 10, TARGET_ENE_0, false, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 2, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(20, 45), false, true, -1) + end + elseif targetDist <= 12 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 5, TARGET_ENE_0, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 2, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(20, 45), true, true, -1) + end + elseif fate3 <= 20 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 2, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(20, 45), false, true, -1) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + return +end + +function SanzA6051_Battle_Sword(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local NormalR_Dist = 2.5 + CommonNPC_ChangeWepR1(ai, goal) + CommonNPC_ChangeWepL1(ai, goal) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 4, TARGET_ENE_0, NormalR_Dist, TARGET_SELF, true, 4) + SanzA6051_Battle_NormalR_Comb(ai, goal) + elseif fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 4, TARGET_ENE_0, NormalR_Dist, TARGET_SELF, false, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 2, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(90, 120), false, true, 4) + SanzA6051_Battle_NormalR_Comb(ai, goal) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 10, TARGET_ENE_0, 7, TARGET_ENE_0, false, 4) + end + SanzA6051_Battle_Kougeki_Noato(ai, goal) + return +end + +function SanzA6051_Battle_NormalR_Comb(ai, goal) + local NR_fate = ai:GetRandam_Int(1, 100) + local NR_fate2 = ai:GetRandam_Int(1, 100) + local NR_fate3 = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + if NR_fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + if NR_fate3 <= 20 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + if NR_fate2 <= 10 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + return +end + +function SanzA6051_Battle_Kougeki_Noato(ai, goal) + local KN_fate = ai:GetRandam_Int(1, 100) + local BackDist = 2.5 + CommonNPC_ChangeWepL1(ai, goal) + if KN_fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(2, 4), TARGET_ENE_0, BackDist, TARGET_ENE_0, false, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Int(3, 5), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(45, 65), false, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(4, 6), TARGET_ENE_0, BackDist, TARGET_ENE_0, true, 4) + end + return +end + +function SanzA6051Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function SanzA6051Battle_Terminate(ai, goal) + return +end + +function SanzA6051Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_MissSwing) then + local MissSwingDist = 1 + local MissSwingAttPer = 50 + if targetDist <= MissSwingDist and fate <= MissSwingAttPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 10, TARGET_ENE_0, false, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 2 + local combRunPer = 40 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate2 <= 60 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, NPC_ATK_StepB, TARGET_ENE_0, DIST_None, 0) + elseif fate2 <= 80 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, NPC_ATK_StepL, TARGET_ENE_0, DIST_None, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, NPC_ATK_StepR, TARGET_ENE_0, DIST_None, 0) + end + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, NPC_ATK_StepL, TARGET_ENE_0, DIST_None, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, NPC_ATK_StepR, TARGET_ENE_0, DIST_None, 0) + end + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/006052_battle.lua b/scripts_decompiled/006052_battle.lua new file mode 100644 index 0000000..7186e9d --- /dev/null +++ b/scripts_decompiled/006052_battle.lua @@ -0,0 +1,130 @@ +REGISTER_GOAL(GOAL_SanzB6052_Battle, "SanzB6052Battle") +REGISTER_GOAL_NO_UPDATE(GOAL_SanzB6052_Battle, 1) +function SanzB6052Battle_Activate(ai, goal) + local hprate = ai:GetHpRate(TARGET_SELF) + local selfmp = ai:GetMp(TARGET_SELF) + if 0.5 <= hprate then + SanzB6052_Battle_Sword(ai, goal) + elseif 15 <= selfmp then + SanzB6052_Battle_Magic(ai, goal) + else + SanzB6052_Battle_Sword(ai, goal) + end + return +end + +function SanzB6052_Battle_Sword(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local NormalR_Dist = 2.5 + CommonNPC_ChangeWepR1(ai, goal) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 4, TARGET_ENE_0, NormalR_Dist, TARGET_SELF, true, 4) + SanzB6052_Battle_NormalR_Comb(ai, goal) + elseif fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 4, TARGET_ENE_0, NormalR_Dist, TARGET_SELF, false, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 2, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(90, 120), false, true, 4) + SanzB6052_Battle_NormalR_Comb(ai, goal) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 4, TARGET_ENE_0, 5, TARGET_ENE_0, false, 4) + end + SanzB6052_Battle_Kougeki_Noato(ai, goal) + return +end + +function SanzB6052_Battle_Magic(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local NormalR_Dist = 7.5 + CommonNPC_ChangeWepR2(ai, goal) + if NormalR_Dist <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, NormalR_Dist, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 0) + SanzB6052_Battle_Kougeki_Noato(ai, goal) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 0) + SanzB6052_Battle_Kougeki_Noato(ai, goal) + end + return +end + +function SanzB6052_Battle_NormalR_Comb(ai, goal) + local NR_fate = ai:GetRandam_Int(1, 100) + local NR_fate2 = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + if NR_fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + if NR_fate2 <= 10 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + return +end + +function SanzB6052_Battle_Kougeki_Noato(ai, goal) + local KN_fate = ai:GetRandam_Int(1, 100) + local BackDist = 2.5 + CommonNPC_ChangeWepL1(ai, goal) + if KN_fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(2, 4), TARGET_ENE_0, BackDist, TARGET_ENE_0, false, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Int(3, 5), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(45, 65), false, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(4, 6), TARGET_ENE_0, BackDist, TARGET_ENE_0, true, 4) + end + return +end + +function SanzB6052Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function SanzB6052Battle_Terminate(ai, goal) + return +end + +function SanzB6052Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_MissSwing) then + local MissSwingDist = 1 + local MissSwingAttPer = 50 + if targetDist <= MissSwingDist and fate <= MissSwingAttPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 10, TARGET_ENE_0, false, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 2 + local combRunPer = 40 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate2 <= 60 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, NPC_ATK_StepB, TARGET_ENE_0, DIST_None, 0) + elseif fate2 <= 80 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, NPC_ATK_StepL, TARGET_ENE_0, DIST_None, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, NPC_ATK_StepR, TARGET_ENE_0, DIST_None, 0) + end + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, NPC_ATK_StepL, TARGET_ENE_0, DIST_None, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, NPC_ATK_StepR, TARGET_ENE_0, DIST_None, 0) + end + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/006070_battle.lua b/scripts_decompiled/006070_battle.lua new file mode 100644 index 0000000..8f802ec --- /dev/null +++ b/scripts_decompiled/006070_battle.lua @@ -0,0 +1,295 @@ +REGISTER_GOAL(GOAL_White_HolyWoman6070_Battle, "White_HolyWoman6070Battle") +local NormalR_min = 0 +local NormalR_max = 1.3 +local LargeR_min = 0 +local LargeR_max = 1.6 +local Whand_jyaku_min = 0 +local Whand_jyaku_max = 2.5 +local Whand_kyou_min = 0 +local Whand_kyou_max = 4.2 +local PushR_min = 0 +local PushR_max = 1.1 +local Tate_min = 0 +local Tate_max = 1.3 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 3.8 +local Rolling_Atk_min = 4 +local Rolling_Atk_max = 5.6 +local Magic_min = 8 +local Magic_max = 8 +REGISTER_GOAL_NO_UPDATE(GOAL_White_HolyWoman6070_Battle, 1) +function White_HolyWoman6070Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local MagicValue1 = 1 + local Magic1Limit = ai:GetNumber(0) + if 5 <= Magic1Limit then + MagicValue1 = 0 + end + local hprate = ai:GetHpRate(TARGET_SELF) + local Kaifuku = 0 + if hprate <= 0.5 then + Kaifuku = 1 + end + actPerArr[1] = 2 + actPerArr[2] = 95 + actPerArr[3] = 3 + actPerArr[4] = 1000 * MagicValue1 * Kaifuku + actFuncArr[1] = REGIST_FUNC(ai, goal, White_HolyWoman6070_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, White_HolyWoman6070_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, White_HolyWoman6070_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, White_HolyWoman6070_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, White_HolyWoman6070_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, White_HolyWoman6070_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, White_HolyWoman6070_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, White_HolyWoman6070_Act08) + actFuncArr[9] = REGIST_FUNC(ai, goal, White_HolyWoman6070_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, White_HolyWoman6070_Act10) + local atkAfterFunc = REGIST_FUNC(ai, goal, White_HolyWoman6070_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function White_HolyWoman6070_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR2(ai, goal) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 0 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, NormalR_max, TARGET_SELF, false, 4) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function White_HolyWoman6070_Act02(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local NormalR_Dist = 2 + local MoveDist_n = 8.1 + local MoveDist_f = 40 + if 7 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 6), TARGET_ENE_0, MoveDist_f, TARGET_SELF, false, -1) + elseif NormalR_Dist <= targetDist then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 6), TARGET_ENE_0, MoveDist_n, TARGET_ENE_0, false, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 6), TARGET_ENE_0, MoveDist_n, TARGET_ENE_0, false, -1) + end + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function White_HolyWoman6070_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR2(ai, goal) + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 0 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_PushR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 0 + end + return GetWellSpace_Odds +end + +NormalR_min = Magic_max +NormalR_min = Magic_min +function White_HolyWoman6070_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic1Limit = ai:GetNumber(0) + CommonNPC_ChangeWepR1(ai, goal) + ai:ChangeEquipMagic(0) + if Magic_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 8, TARGET_ENE_0, Magic_min, TARGET_ENE_0, false, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 0, -1) + end + ai:SetNumber(0, Magic1Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR_min = Tate_max +function White_HolyWoman6070_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, Tate_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_Parry, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = NormalR_max +function White_HolyWoman6070_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + if ai:IsTargetGuard(TARGET_ENE_0) == true and not ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Rolling_Atk_max +function White_HolyWoman6070_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + if ai:IsTargetGuard(TARGET_ENE_0) == true and not ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + local AppDist = Rolling_Atk_max + local DashDist = Rolling_Atk_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function White_HolyWoman6070_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(2, 2.5), TARGET_SELF, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, 4) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function White_HolyWoman6070_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function White_HolyWoman6070_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function White_HolyWoman6070_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 80 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + end + return +end + +function White_HolyWoman6070Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function White_HolyWoman6070Battle_Terminate(ai, goal) + return +end + +function White_HolyWoman6070Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local MoveDist_f = 15 + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 50 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, MoveDist_f, TARGET_ENE_0, true, 4) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 50 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, combRunDist, TARGET_ENE_0, false, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + end + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_UseItem) then + local distUseItem_Act = 10 + local oddsUseItem_Act = 80 + if targetDist <= distUseItem_Act and fate <= oddsUseItem_Act then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, MoveDist_f, TARGET_SELF, false, -1) + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/006080_battle.lua b/scripts_decompiled/006080_battle.lua new file mode 100644 index 0000000..1e616da --- /dev/null +++ b/scripts_decompiled/006080_battle.lua @@ -0,0 +1,302 @@ +REGISTER_GOAL(GOAL_Knight_of_HolyWomanA6080_Battle, "Knight_of_HolyWomanA6080Battle") +local NormalR_min = 0 +local NormalR_max = 1.8 +local LargeR_min = 0 +local LargeR_max = 2.1 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 1 +local PushR_min = 0 +local PushR_max = 1 +local Magic_min = 8 +local Magic_max = 8 +local Magic2_min = 0 +local Magic2_max = 1.7 +REGISTER_GOAL_NO_UPDATE(GOAL_Knight_of_HolyWomanA6080_Battle, 1) +function Knight_of_HolyWomanA6080Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local BothHandOff = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local RYOUTE_odds = 1 + local KATATE_odds = 1 + local MagicValue1 = 1 + local Magic1Limit = ai:GetNumber(0) + if 2 <= Magic1Limit then + MagicValue1 = 0 + end + local MagicValue2 = 1 + local Magic2Limit = ai:GetNumber(1) + if 5 <= Magic2Limit then + MagicValue2 = 0 + end + local GuardTaiou = 0 + if ai:IsTargetGuard(TARGET_ENE_0) == true then + GuardTaiou = 1 + end + local hprate = ai:GetHpRate(TARGET_SELF) + local Kaifuku = 0 + if hprate <= 0.5 then + Kaifuku = 1 + end + if 4 <= targetDist then + actPerArr[1] = 35 + actPerArr[2] = 35 + actPerArr[17] = 0 * GuardTaiou + actPerArr[18] = 1000 * MagicValue1 * Kaifuku + actPerArr[19] = 0 * MagicValue2 + actPerArr[20] = 30 + elseif 1 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 20 + actPerArr[17] = 20 * GuardTaiou + actPerArr[18] = 1000 * MagicValue1 * Kaifuku + actPerArr[19] = 25 * MagicValue2 + actPerArr[20] = 35 + else + actPerArr[1] = 20 + actPerArr[2] = 20 + actPerArr[17] = 20 * GuardTaiou + actPerArr[18] = 1000 * MagicValue1 * Kaifuku + actPerArr[19] = 20 * MagicValue2 + actPerArr[20] = 40 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Knight_of_HolyWomanA6080_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Knight_of_HolyWomanA6080_Act02) + actFuncArr[17] = REGIST_FUNC(ai, goal, Knight_of_HolyWomanA6080_Act17) + actFuncArr[18] = REGIST_FUNC(ai, goal, Knight_of_HolyWomanA6080_Act18) + actFuncArr[19] = REGIST_FUNC(ai, goal, Knight_of_HolyWomanA6080_Act19) + actFuncArr[20] = REGIST_FUNC(ai, goal, Knight_of_HolyWomanA6080_Act20) + local atkAfterFunc = REGIST_FUNC(ai, goal, Knight_of_HolyWomanA6080_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function Knight_of_HolyWomanA6080_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function Knight_of_HolyWomanA6080_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function Knight_of_HolyWomanA6080_Act17(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Magic_max +NormalR_min = Magic_min +function Knight_of_HolyWomanA6080_Act18(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic1Limit = ai:GetNumber(0) + CommonNPC_ChangeWepR2(ai, goal) + ai:ChangeEquipMagic(0) + if Magic_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 7, TARGET_ENE_0, Magic_min, TARGET_ENE_0, false, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 0, -1) + end + ai:SetNumber(0, Magic1Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR_min = Magic2_max +function Knight_of_HolyWomanA6080_Act19(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic2Limit = ai:GetNumber(1) + CommonNPC_ChangeWepR2(ai, goal) + ai:ChangeEquipMagic(1) + local AppDist = Magic2_max + local DashDist = Magic2_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 1.5, 90) + ai:SetNumber(1, Magic2Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Knight_of_HolyWomanA6080_Act20(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(2, 2.5), TARGET_SELF, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, 4) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Knight_of_HolyWomanA6080_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 0 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate2 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepL, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 2) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepR, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 2) + end + elseif fate <= 0 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate <= 80 then + if fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 6, TARGET_ENE_0, ai:GetRandam_Float(1.5, 3), TARGET_ENE_0, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + end + return +end + +function Knight_of_HolyWomanA6080Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Knight_of_HolyWomanA6080Battle_Terminate(ai, goal) + return +end + +NormalR_min = LargeR_max +function Knight_of_HolyWomanA6080Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 40 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, combRunDist, TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 80 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 50 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, combRunDist, TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_GuardBreak) then + local distGuardBreak_Act = 2 + local oddsGuardBreak_Act = 60 + if targetDist <= distGuardBreak_Act and fate <= oddsGuardBreak_Act then + goal:ClearSubGoal() + CommonNPC_ChangeWepR1(ai, goal) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + goal:ClearSubGoal() + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + elseif ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 75 + if fate <= shootIntPer then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + else + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + return true + else + return true + end + else + return false + end +end + +return diff --git a/scripts_decompiled/006090_battle.lua b/scripts_decompiled/006090_battle.lua new file mode 100644 index 0000000..e9e0eca --- /dev/null +++ b/scripts_decompiled/006090_battle.lua @@ -0,0 +1,289 @@ +REGISTER_GOAL(GOAL_Knight_of_HolyWomanB6090_Battle, "Knight_of_HolyWomanB6090Battle") +local NormalR_min = 0 +local NormalR_max = 1.8 +local LargeR_min = 0 +local LargeR_max = 2.1 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 1 +local PushR_min = 0 +local PushR_max = 1 +local Magic2_min = 0 +local Magic2_max = 1.7 +REGISTER_GOAL_NO_UPDATE(GOAL_Knight_of_HolyWomanB6090_Battle, 1) +function Knight_of_HolyWomanB6090Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local BothHandOff = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local RYOUTE_odds = 1 + local KATATE_odds = 1 + local MagicValue2 = 1 + local Magic2Limit = ai:GetNumber(0) + if 5 <= Magic2Limit then + MagicValue2 = 0 + end + local GuardTaiou = 0 + if ai:IsTargetGuard(TARGET_ENE_0) == true then + GuardTaiou = 1 + end + local hprate = ai:GetHpRate(TARGET_SELF) + local Kaifuku = 0 + if hprate <= 0.5 then + Kaifuku = 1 + end + if 4 <= targetDist then + actPerArr[1] = 35 + actPerArr[2] = 35 + actPerArr[17] = 0 * GuardTaiou + actPerArr[19] = 0 * MagicValue2 + actPerArr[20] = 30 + elseif 1 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 20 + actPerArr[17] = 20 * GuardTaiou + actPerArr[19] = 25 * MagicValue2 + actPerArr[20] = 35 + else + actPerArr[1] = 15 + actPerArr[2] = 15 + actPerArr[5] = 15 + actPerArr[17] = 20 * GuardTaiou + actPerArr[19] = 20 * MagicValue2 + actPerArr[20] = 15 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Knight_of_HolyWomanB6090_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Knight_of_HolyWomanB6090_Act02) + actFuncArr[5] = REGIST_FUNC(ai, goal, Knight_of_HolyWomanB6090_Act05) + actFuncArr[17] = REGIST_FUNC(ai, goal, Knight_of_HolyWomanB6090_Act17) + actFuncArr[19] = REGIST_FUNC(ai, goal, Knight_of_HolyWomanB6090_Act19) + actFuncArr[20] = REGIST_FUNC(ai, goal, Knight_of_HolyWomanB6090_Act20) + local atkAfterFunc = REGIST_FUNC(ai, goal, Knight_of_HolyWomanB6090_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function Knight_of_HolyWomanB6090_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function Knight_of_HolyWomanB6090_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_Atk_max +function Knight_of_HolyWomanB6090_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = Backstep_Atk_max + local DashDist = Backstep_Atk_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function Knight_of_HolyWomanB6090_Act17(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Magic2_max +function Knight_of_HolyWomanB6090_Act19(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic2Limit = ai:GetNumber(1) + CommonNPC_ChangeWepR2(ai, goal) + ai:ChangeEquipMagic(0) + local AppDist = Magic2_max + local DashDist = Magic2_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 1.5, 90) + ai:SetNumber(0, Magic2Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Knight_of_HolyWomanB6090_Act20(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(2, 2.5), TARGET_SELF, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, 4) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Knight_of_HolyWomanB6090_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 0 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate2 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepL, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 2) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepR, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 2) + end + elseif fate <= 0 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate <= 80 then + if fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 6, TARGET_ENE_0, ai:GetRandam_Float(1.5, 3), TARGET_ENE_0, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + end + return +end + +function Knight_of_HolyWomanB6090Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Knight_of_HolyWomanB6090Battle_Terminate(ai, goal) + return +end + +NormalR_min = LargeR_max +function Knight_of_HolyWomanB6090Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 40 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, combRunDist, TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 80 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 50 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, combRunDist, TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_GuardBreak) then + local distGuardBreak_Act = 2 + local oddsGuardBreak_Act = 60 + if targetDist <= distGuardBreak_Act and fate <= oddsGuardBreak_Act then + goal:ClearSubGoal() + CommonNPC_ChangeWepR1(ai, goal) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + goal:ClearSubGoal() + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + elseif ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 75 + if fate <= shootIntPer then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + else + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + return true + else + return true + end + else + return false + end +end + +return diff --git a/scripts_decompiled/006100_battle.lua b/scripts_decompiled/006100_battle.lua new file mode 100644 index 0000000..c1da2eb --- /dev/null +++ b/scripts_decompiled/006100_battle.lua @@ -0,0 +1,330 @@ +REGISTER_GOAL(GOAL_Knight_of_HolyWomanC6100_Battle, "Knight_of_HolyWomanC6100Battle") +local NormalR_min = 0 +local NormalR_max = 2.6 +local LargeR_min = 0 +local LargeR_max = 2.2 +local Whand_jyaku_min = 0 +local Whand_jyaku_max = 2.6 +local Whand_kyou_min = 0 +local Whand_kyou_max = 2.3 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 2.1 +local Backstep_AtkW_min = 0 +local Backstep_AtkW_max = 2.2 +local PushR_min = 0 +local PushR_max = 1 +local Magic_min = 8 +local Magic_max = 8 +local Magic2_min = 0 +local Magic2_max = 1.7 +REGISTER_GOAL_NO_UPDATE(GOAL_Knight_of_HolyWomanC6100_Battle, 1) +function Knight_of_HolyWomanC6100Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local BothHandOff = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local RYOUTE_odds = 1 + local KATATE_odds = 1 + local MagicValue1 = 1 + local Magic1Limit = ai:GetNumber(0) + if 5 <= Magic1Limit or ai:IsFinishTimer(0) ~= true then + MagicValue1 = 0 + end + local GuardTaiou = 0 + if ai:IsTargetGuard(TARGET_ENE_0) == true then + GuardTaiou = 1 + end + local hprate = ai:GetHpRate(TARGET_SELF) + local Kaifuku = 0 + if hprate <= 0.75 then + Kaifuku = 1 + end + if ai:IsTargetGuard(TARGET_ENE_0) == true then + RYOUTE_odds = 10 + end + if 4 <= targetDist then + actPerArr[1] = 35 + actPerArr[2] = 35 + actPerArr[9] = 35 * GuardTaiou * RYOUTE_odds + actPerArr[10] = 35 * GuardTaiou * RYOUTE_odds + actPerArr[18] = 10000 * MagicValue1 * Kaifuku + actPerArr[20] = 30 + elseif 2.1 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 20 + actPerArr[9] = 20 * GuardTaiou * RYOUTE_odds + actPerArr[10] = 20 * GuardTaiou * RYOUTE_odds + actPerArr[17] = 20 * GuardTaiou + actPerArr[18] = 10000 * MagicValue1 * Kaifuku + actPerArr[20] = 35 + else + actPerArr[1] = 20 + actPerArr[2] = 20 + actPerArr[9] = 20 * GuardTaiou * RYOUTE_odds + actPerArr[10] = 20 * GuardTaiou * RYOUTE_odds + actPerArr[17] = 20 * GuardTaiou + actPerArr[18] = 10000 * MagicValue1 * Kaifuku + actPerArr[20] = 40 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Knight_of_HolyWomanC6100_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Knight_of_HolyWomanC6100_Act02) + actFuncArr[9] = REGIST_FUNC(ai, goal, Knight_of_HolyWomanC6100_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, Knight_of_HolyWomanC6100_Act10) + actFuncArr[11] = REGIST_FUNC(ai, goal, Knight_of_HolyWomanC6100_Act11) + actFuncArr[17] = REGIST_FUNC(ai, goal, Knight_of_HolyWomanC6100_Act17) + actFuncArr[18] = REGIST_FUNC(ai, goal, Knight_of_HolyWomanC6100_Act18) + actFuncArr[20] = REGIST_FUNC(ai, goal, Knight_of_HolyWomanC6100_Act20) + local atkAfterFunc = REGIST_FUNC(ai, goal, Knight_of_HolyWomanC6100_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function Knight_of_HolyWomanC6100_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function Knight_of_HolyWomanC6100_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Whand_jyaku_max +function Knight_of_HolyWomanC6100_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Whand_jyaku_max + local DashDist = Whand_jyaku_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Whand_kyou_max +function Knight_of_HolyWomanC6100_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Whand_kyou_max + local DashDist = Whand_kyou_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function Knight_of_HolyWomanC6100_Act17(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Magic_max +NormalR_min = Magic_min +function Knight_of_HolyWomanC6100_Act18(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic1Limit = ai:GetNumber(0) + CommonNPC_ChangeWepR2(ai, goal) + ai:ChangeEquipMagic(0) + if Magic_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 7, TARGET_ENE_0, Magic_min, TARGET_ENE_0, false, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 0, -1) + end + ai:SetTimer(0, 62) + ai:SetNumber(0, Magic1Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Knight_of_HolyWomanC6100_Act20(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(2, 2.5), TARGET_SELF, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, 4) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Knight_of_HolyWomanC6100_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate <= 80 then + if fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 6, TARGET_ENE_0, ai:GetRandam_Float(1.5, 3), TARGET_ENE_0, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + end + return +end + +function Knight_of_HolyWomanC6100Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Knight_of_HolyWomanC6100Battle_Terminate(ai, goal) + return +end + +NormalR_min = LargeR_max +function Knight_of_HolyWomanC6100Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 40 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, combRunDist, TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 80 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 50 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, combRunDist, TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_GuardBreak) then + local distGuardBreak_Act = 2 + local oddsGuardBreak_Act = 60 + if targetDist <= distGuardBreak_Act and fate <= oddsGuardBreak_Act then + goal:ClearSubGoal() + CommonNPC_ChangeWepR1(ai, goal) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + goal:ClearSubGoal() + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + elseif ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 75 + if fate <= shootIntPer then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + else + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + return true + else + return true + end + else + return false + end +end + +return diff --git a/scripts_decompiled/006130_battle.lua b/scripts_decompiled/006130_battle.lua new file mode 100644 index 0000000..66f321f --- /dev/null +++ b/scripts_decompiled/006130_battle.lua @@ -0,0 +1,342 @@ +REGISTER_GOAL(GOAL_Magician_of_Pot6130_Battle, "Magician_of_Pot6130Battle") +local PushR_min = 0 +local PushR_max = 1 +local NormalR2_min = 0 +local NormalR2_max = 1.7 +local LargeR2_min = 0 +local LargeR2_max = 1.8 +local Backstep_Atk2_min = 0 +local Backstep_Atk2_max = 1 +local Magic_min = 7 +local Magic_max = 7 +local Magic2_min = 7.4 +local Magic2_max = 7.4 +local Magic3_min = 1.5 +local Magic3_max = 1.5 +REGISTER_GOAL_NO_UPDATE(GOAL_Magician_of_Pot6130_Battle, 1) +function Magician_of_Pot6130Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local BothHandOff = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local RYOUTE_odds = 1 + local KATATE_odds = 1 + if ai:IsTargetGuard(TARGET_ENE_0) == true then + RYOUTE_odds = 10 + end + local MagicValue1 = 1 + local Magic1Limit = ai:GetNumber(0) + if 6 <= Magic1Limit then + MagicValue1 = 0 + end + local MagicValue2 = 1 + local Magic2Limit = ai:GetNumber(1) + if 6 <= Magic2Limit then + MagicValue2 = 0 + end + local MagicValue3 = 1 + local Magic3Limit = ai:GetNumber(2) + if 8 <= Magic3Limit then + MagicValue3 = 0 + end + local GuardTaiou = 0 + if ai:IsTargetGuard(TARGET_ENE_0) == true then + GuardTaiou = 1 + end + if 4 <= targetDist then + actPerArr[3] = 5 + actPerArr[4] = 5 + actPerArr[18] = 45 * MagicValue1 + actPerArr[19] = 45 * MagicValue2 + actPerArr[20] = 0 * MagicValue3 + elseif 1 <= targetDist then + actPerArr[3] = 19 + actPerArr[4] = 19 + actPerArr[16] = 5 + actPerArr[17] = 0 * GuardTaiou + actPerArr[18] = 19 * MagicValue1 + actPerArr[19] = 19 * MagicValue2 + actPerArr[20] = 19 * MagicValue3 + else + actPerArr[3] = 20 + actPerArr[4] = 20 + actPerArr[6] = 10 + actPerArr[16] = 5 + actPerArr[17] = 10 * GuardTaiou + actPerArr[18] = 15 * MagicValue1 + actPerArr[19] = 15 * MagicValue2 + actPerArr[20] = 15 * MagicValue3 + end + actFuncArr[3] = REGIST_FUNC(ai, goal, Magician_of_Pot6130_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, Magician_of_Pot6130_Act04) + actFuncArr[6] = REGIST_FUNC(ai, goal, Magician_of_Pot6130_Act06) + actFuncArr[16] = REGIST_FUNC(ai, goal, Magician_of_Pot6130_Act16) + actFuncArr[17] = REGIST_FUNC(ai, goal, Magician_of_Pot6130_Act17) + actFuncArr[18] = REGIST_FUNC(ai, goal, Magician_of_Pot6130_Act18) + actFuncArr[19] = REGIST_FUNC(ai, goal, Magician_of_Pot6130_Act19) + actFuncArr[20] = REGIST_FUNC(ai, goal, Magician_of_Pot6130_Act20) + local atkAfterFunc = REGIST_FUNC(ai, goal, Magician_of_Pot6130_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +PushR_min = NormalR2_max +function Magician_of_Pot6130_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR2(ai, goal) + local AppDist = NormalR2_max + local DashDist = NormalR2_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +PushR_min = LargeR2_max +function Magician_of_Pot6130_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR2(ai, goal) + local AppDist = LargeR2_max + local DashDist = LargeR2_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +PushR_min = Backstep_Atk2_max +function Magician_of_Pot6130_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR2(ai, goal) + local AppDist = Backstep_Atk2_max + local DashDist = Backstep_Atk2_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Magician_of_Pot6130_Act16(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(2, 2.5), TARGET_SELF, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, 4) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +PushR_min = PushR_max +function Magician_of_Pot6130_Act17(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +PushR_min = Magic_max +PushR_min = Magic_min +function Magician_of_Pot6130_Act18(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic1Limit = ai:GetNumber(0) + CommonNPC_ChangeWepR1(ai, goal) + ai:ChangeEquipMagic(0) + if Magic_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2.5, TARGET_ENE_0, Magic_max, TARGET_SELF, false, 4) + elseif targetDist <= Magic_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, Magic_min, TARGET_ENE_0, false, 4) + end + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 1.5, 90) + ai:SetNumber(0, Magic1Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +PushR_min = Magic_max +PushR_min = Magic2_max +PushR_min = Magic_min +PushR_min = Magic2_min +function Magician_of_Pot6130_Act19(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic2Limit = ai:GetNumber(1) + CommonNPC_ChangeWepR1(ai, goal) + ai:ChangeEquipMagic(1) + if Magic_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2.5, TARGET_ENE_0, Magic2_max, TARGET_SELF, false, 4) + elseif targetDist <= Magic_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, Magic2_min, TARGET_ENE_0, false, 4) + end + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 1.5, 90) + ai:SetNumber(1, Magic2Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +PushR_min = Magic3_max +function Magician_of_Pot6130_Act20(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic3Limit = ai:GetNumber(2) + CommonNPC_ChangeWepR1(ai, goal) + ai:ChangeEquipMagic(2) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Magic3_max, TARGET_SELF, false, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 1.5, 90) + ai:SetNumber(2, Magic3Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Magician_of_Pot6130_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 5 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate2 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepL, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 2) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepR, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 2) + end + elseif fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate <= 15 then + if fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 6, TARGET_ENE_0, ai:GetRandam_Float(1.5, 3), TARGET_ENE_0, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + end + return +end + +function Magician_of_Pot6130Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Magician_of_Pot6130Battle_Terminate(ai, goal) + return +end + +function Magician_of_Pot6130Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 10 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 10 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 10 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/006170_battle.lua b/scripts_decompiled/006170_battle.lua new file mode 100644 index 0000000..ce4071b --- /dev/null +++ b/scripts_decompiled/006170_battle.lua @@ -0,0 +1,205 @@ +REGISTER_GOAL(GOAL_Roaming_Chaos6170_Battle, "Roaming_Chaos6170Battle") +local PushR_min = 0 +local PushR_max = 1 +local NormalR2_min = 0 +local NormalR2_max = 1 +local LargeR2_min = 0 +local LargeR2_max = 1.1 +local Backstep_Atk2_min = 0 +local Backstep_Atk2_max = 1 +local Magic_min = 7 +local Magic_max = 7 +local Magic2_min = 4 +local Magic2_max = 4 +local Magic3_min = 1.5 +local Magic3_max = 1.5 +REGISTER_GOAL_NO_UPDATE(GOAL_Roaming_Chaos6170_Battle, 1) +function Roaming_Chaos6170Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local BothHandOff = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if 4 <= targetDist then + actPerArr[18] = 30 + actPerArr[19] = 50 + actPerArr[20] = 20 + elseif 1 <= targetDist then + actPerArr[18] = 35 + actPerArr[19] = 30 + actPerArr[20] = 35 + else + actPerArr[18] = 30 + actPerArr[19] = 30 + actPerArr[20] = 40 + end + actFuncArr[18] = REGIST_FUNC(ai, goal, Roaming_Chaos6170_Act18) + actFuncArr[19] = REGIST_FUNC(ai, goal, Roaming_Chaos6170_Act19) + actFuncArr[20] = REGIST_FUNC(ai, goal, Roaming_Chaos6170_Act20) + local atkAfterFunc = REGIST_FUNC(ai, goal, Roaming_Chaos6170_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +PushR_min = Magic_max +PushR_min = Magic_min +function Roaming_Chaos6170_Act18(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + CommonNPC_ChangeWepR1(ai, goal) + ai:ChangeEquipMagic(0) + if Magic_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2.5, TARGET_ENE_0, Magic_max, TARGET_SELF, false, -1) + elseif targetDist <= Magic_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, Magic_min, TARGET_ENE_0, false, -1) + end + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 1.5, 90) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +PushR_min = Magic_max +PushR_min = Magic2_max +PushR_min = Magic_min +PushR_min = Magic2_min +function Roaming_Chaos6170_Act19(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + CommonNPC_ChangeWepR1(ai, goal) + ai:ChangeEquipMagic(1) + if Magic_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2.5, TARGET_ENE_0, Magic2_max, TARGET_SELF, false, -1) + elseif targetDist <= Magic_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, Magic2_min, TARGET_ENE_0, false, -1) + end + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 1.5, 90) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +PushR_min = Magic3_max +function Roaming_Chaos6170_Act20(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + CommonNPC_ChangeWepR1(ai, goal) + ai:ChangeEquipMagic(2) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Magic3_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 1.5, 90) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Roaming_Chaos6170_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 5 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate2 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepL, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 2) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepR, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 2) + end + elseif fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate <= 50 then + if fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 6, TARGET_ENE_0, ai:GetRandam_Float(1.5, 3), TARGET_ENE_0, true, -1) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, -1) + end + end + return +end + +function Roaming_Chaos6170Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Roaming_Chaos6170Battle_Terminate(ai, goal) + return +end + +function Roaming_Chaos6170Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 10 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 10 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 10 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/006180_battle.lua b/scripts_decompiled/006180_battle.lua new file mode 100644 index 0000000..5eab230 --- /dev/null +++ b/scripts_decompiled/006180_battle.lua @@ -0,0 +1,290 @@ +REGISTER_GOAL(GOAL_Healer6180_Battle, "Healer6180Battle") +local PushR_min = 0 +local PushR_max = 1 +local NormalR2_min = 0 +local NormalR2_max = 1 +local LargeR2_min = 0 +local LargeR2_max = 1.1 +local Backstep_Atk2_min = 0 +local Backstep_Atk2_max = 1 +local Magic_min = 7 +local Magic_max = 7 +local Magic2_min = 7 +local Magic2_max = 7 +local Magic3_min = 8 +local Magic3_max = 8 +REGISTER_GOAL_NO_UPDATE(GOAL_Healer6180_Battle, 1) +function Healer6180Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local RYOUTE_odds = 1 + local KATATE_odds = 1 + local MagicValue1 = 1 + local Magic1Limit = ai:GetNumber(0) + if 20 <= Magic1Limit then + MagicValue1 = 0 + end + local MagicValue2 = 1 + local Magic2Limit = ai:GetNumber(1) + if 20 <= Magic2Limit then + MagicValue2 = 0 + end + local MagicValue3 = 1 + local Magic3Limit = ai:GetNumber(2) + if 5 <= Magic3Limit then + MagicValue3 = 0 + end + local GuardTaiou = 0 + if ai:IsTargetGuard(TARGET_ENE_0) == true then + GuardTaiou = 1 + end + local hprate = ai:GetHpRate(TARGET_SELF) + local Kaifuku = 0 + if (not not ai:HasSpecialEffectAttribute(TARGET_SELF, SP_EFFECT_TYPE_POIZON) or not not ai:HasSpecialEffectAttribute(TARGET_SELF, SP_EFFECT_TYPE_ILLNESS) or ai:HasSpecialEffectAttribute(TARGET_SELF, SP_EFFECT_TYPE_BLOOD)) and ai:IsFinishTimer(3) == true then + Kaifuku = 1 + end + if 7 <= targetDist then + actPerArr[1] = 5 + actPerArr[2] = 5 + actPerArr[18] = 45 * MagicValue1 + actPerArr[19] = 45 * MagicValue2 + actPerArr[20] = 10000 * MagicValue3 * Kaifuku + elseif 1.1 <= targetDist then + actPerArr[1] = 7 + actPerArr[2] = 8 + actPerArr[17] = 15 + actPerArr[18] = 35 * MagicValue1 + actPerArr[19] = 35 * MagicValue2 + actPerArr[20] = 10000 * MagicValue3 * Kaifuku + else + actPerArr[1] = 35 + actPerArr[2] = 35 + actPerArr[17] = 20 + actPerArr[18] = 5 * MagicValue1 + actPerArr[19] = 5 * MagicValue2 + actPerArr[20] = 10000 * MagicValue3 * Kaifuku + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Healer6180_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Healer6180_Act02) + actFuncArr[17] = REGIST_FUNC(ai, goal, Healer6180_Act17) + actFuncArr[18] = REGIST_FUNC(ai, goal, Healer6180_Act18) + actFuncArr[19] = REGIST_FUNC(ai, goal, Healer6180_Act19) + actFuncArr[20] = REGIST_FUNC(ai, goal, Healer6180_Act20) + local atkAfterFunc = REGIST_FUNC(ai, goal, Healer6180_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +PushR_min = NormalR2_max +function Healer6180_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = NormalR2_max + local DashDist = NormalR2_max + 5 + local Odds_Guard = 0 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalL, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalL, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalL, TARGET_ENE_0, DIST_Middle, 0, -1) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +PushR_min = LargeR2_max +function Healer6180_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = LargeR2_max + local DashDist = LargeR2_max + 5 + local Odds_Guard = 0 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 0, -1) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Healer6180_Act17(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if 7 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(2, 2.5), TARGET_SELF, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, -1) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, -1) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +PushR_min = Magic_max +PushR_min = Magic_min +function Healer6180_Act18(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic1Limit = ai:GetNumber(0) + CommonNPC_ChangeWepR1(ai, goal) + ai:ChangeEquipMagic(0) + if Magic_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2.5, TARGET_ENE_0, Magic_max, TARGET_SELF, false, -1) + elseif targetDist <= Magic_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, Magic_min, TARGET_ENE_0, false, -1) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 1.5, 90) + ai:SetNumber(0, Magic1Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +PushR_min = Magic2_max +PushR_min = Magic2_min +function Healer6180_Act19(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic2Limit = ai:GetNumber(1) + CommonNPC_ChangeWepR1(ai, goal) + ai:ChangeEquipMagic(1) + if Magic2_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2.5, TARGET_ENE_0, Magic2_max, TARGET_SELF, false, -1) + elseif targetDist <= Magic2_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, Magic2_min, TARGET_ENE_0, false, -1) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 1.5, 90) + ai:SetNumber(1, Magic2Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +PushR_min = Magic3_max +PushR_min = Magic3_min +function Healer6180_Act20(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic3Limit = ai:GetNumber(2) + CommonNPC_ChangeWepR1(ai, goal) + ai:ChangeEquipMagic(2) + if Magic3_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2.5, TARGET_ENE_0, Magic3_max, TARGET_SELF, false, -1) + elseif targetDist <= Magic3_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, Magic3_min, TARGET_ENE_0, false, -1) + end + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 1.5, 90) + ai:SetNumber(2, Magic3Limit + 1) + ai:SetTimer(3, 5) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Healer6180_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate <= 80 then + if fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, -1) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, -1) + end + end + return +end + +function Healer6180Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Healer6180Battle_Terminate(ai, goal) + return +end + +function Healer6180Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 10 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 10 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 10 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/006220_battle.lua b/scripts_decompiled/006220_battle.lua new file mode 100644 index 0000000..43c43f4 --- /dev/null +++ b/scripts_decompiled/006220_battle.lua @@ -0,0 +1,21 @@ +REGISTER_GOAL(GOAL_Blacksmith_Rickelt6220_Battle, "Blacksmith_Rickelt6220Battle") +REGISTER_GOAL_NO_UPDATE(GOAL_Blacksmith_Rickelt6220_Battle, 1) +function Blacksmith_Rickelt6220Battle_Activate(ai, goal) + goal:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_SELF) + goal:AddSubGoal(GOAL_COMMON_Turn, 2, TARGET_ENE_0, 0, 0, 0) + return +end + +function Blacksmith_Rickelt6220Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Blacksmith_Rickelt6220Battle_Terminate(ai, goal) + return +end + +function Blacksmith_Rickelt6220Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/006250_battle.lua b/scripts_decompiled/006250_battle.lua new file mode 100644 index 0000000..bdf922e --- /dev/null +++ b/scripts_decompiled/006250_battle.lua @@ -0,0 +1,366 @@ +REGISTER_GOAL(GOAL_Frustrated_merchant6250_Battle, "Frustrated_merchant6250Battle") +local NormalR_min = 0 +local NormalR_max = 2 +local LargeR_min = 0 +local LargeR_max = 2.5 +local Whand_jyaku_min = 0 +local Whand_jyaku_max = 2 +local Whand_kyou_min = 0 +local Whand_kyou_max = 2.3 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 2 +local Backstep_AtkW_min = 0 +local Backstep_AtkW_max = 2 +local PushR_min = 0 +local PushR_max = 1 +REGISTER_GOAL_NO_UPDATE(GOAL_Frustrated_merchant6250_Battle, 1) +function Frustrated_merchant6250Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local BothHandOff = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local RYOUTE_odds = 1 + local KATATE_odds = 1 + if ai:IsTargetGuard(TARGET_ENE_0) == true then + RYOUTE_odds = 10 + end + if 8 <= targetDist then + actPerArr[1] = 35 * KATATE_odds + actPerArr[2] = 35 * KATATE_odds + actPerArr[9] = 35 * RYOUTE_odds + actPerArr[10] = 35 * RYOUTE_odds + actPerArr[20] = 30 * RYOUTE_odds + elseif 3.5 <= targetDist then + actPerArr[1] = 30 * KATATE_odds + actPerArr[2] = 30 * KATATE_odds + actPerArr[7] = 5 * KATATE_odds + actPerArr[9] = 30 * RYOUTE_odds + actPerArr[10] = 30 * RYOUTE_odds + actPerArr[15] = 5 * RYOUTE_odds + actPerArr[20] = 40 * RYOUTE_odds + elseif 2 <= targetDist then + actPerArr[1] = 32 * KATATE_odds + actPerArr[2] = 33 * KATATE_odds + actPerArr[9] = 32 * RYOUTE_odds + actPerArr[10] = 33 * RYOUTE_odds + actPerArr[17] = 20 * RYOUTE_odds + actPerArr[20] = 35 * RYOUTE_odds + elseif 1 <= targetDist then + actPerArr[1] = 18 * KATATE_odds + actPerArr[2] = 17 * KATATE_odds + actPerArr[5] = 15 * KATATE_odds + actPerArr[9] = 10 * RYOUTE_odds + actPerArr[10] = 10 * RYOUTE_odds + actPerArr[13] = 13 * KATATE_odds + actPerArr[17] = 20 * RYOUTE_odds + else + actPerArr[1] = 17 * KATATE_odds + actPerArr[2] = 18 * KATATE_odds + actPerArr[5] = 15 * KATATE_odds + actPerArr[9] = 17 * RYOUTE_odds + actPerArr[10] = 18 * RYOUTE_odds + actPerArr[13] = 15 * KATATE_odds + actPerArr[17] = 20 * RYOUTE_odds + actPerArr[20] = 30 * RYOUTE_odds + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Frustrated_merchant6250_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Frustrated_merchant6250_Act02) + actFuncArr[5] = REGIST_FUNC(ai, goal, Frustrated_merchant6250_Act05) + actFuncArr[7] = REGIST_FUNC(ai, goal, Frustrated_merchant6250_Act07) + actFuncArr[9] = REGIST_FUNC(ai, goal, Frustrated_merchant6250_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, Frustrated_merchant6250_Act10) + actFuncArr[13] = REGIST_FUNC(ai, goal, Frustrated_merchant6250_Act13) + actFuncArr[15] = REGIST_FUNC(ai, goal, Frustrated_merchant6250_Act15) + actFuncArr[17] = REGIST_FUNC(ai, goal, Frustrated_merchant6250_Act17) + actFuncArr[20] = REGIST_FUNC(ai, goal, Frustrated_merchant6250_Act20) + local atkAfterFunc = REGIST_FUNC(ai, goal, Frustrated_merchant6250_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function Frustrated_merchant6250_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function Frustrated_merchant6250_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_Atk_max +function Frustrated_merchant6250_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = Backstep_Atk_max + local DashDist = Backstep_Atk_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Frustrated_merchant6250_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = Rolling_Atk_max + local DashDist = Rolling_Atk_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Whand_jyaku_max +function Frustrated_merchant6250_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Whand_jyaku_max + local DashDist = Whand_jyaku_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Whand_kyou_max +function Frustrated_merchant6250_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Whand_kyou_max + local DashDist = Whand_kyou_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_AtkW_max +function Frustrated_merchant6250_Act13(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Backstep_AtkW_max + local DashDist = Backstep_AtkW_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Frustrated_merchant6250_Act15(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Rolling_AtkW_max + local DashDist = Rolling_AtkW_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function Frustrated_merchant6250_Act17(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 100 + NPC_KATATE_Switch(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalL, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Frustrated_merchant6250_Act20(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(2, 2.5), TARGET_SELF, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, 4) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Frustrated_merchant6250_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 100 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3.5, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3.5, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + end + return +end + +function Frustrated_merchant6250Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Frustrated_merchant6250Battle_Terminate(ai, goal) + return +end + +NormalR_min = LargeR_max +function Frustrated_merchant6250Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 10 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 80 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 10 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + end + end + if ai:IsInterupt(INTERUPT_GuardBreak) then + local distGuardBreak_Act = 2 + local oddsGuardBreak_Act = 100 + if targetDist <= distGuardBreak_Act and fate <= oddsGuardBreak_Act then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 10 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + else + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/006260_battle.lua b/scripts_decompiled/006260_battle.lua new file mode 100644 index 0000000..c2ae473 --- /dev/null +++ b/scripts_decompiled/006260_battle.lua @@ -0,0 +1,553 @@ +REGISTER_GOAL(GOAL_TrickStar6260_Battle, "TrickStar6260Battle") +local NormalR_min = 0 +local NormalR_max = 1.5 +local NormalR2_min = 0 +local NormalR2_max = 2.1 +local LargeR_min = 0 +local LargeR_max = 2.5 +local LargeR2_min = 0 +local LargeR2_max = 2.6 +local Whand_jyaku_min = 0 +local Whand_jyaku_max = 2.1 +local Whand_jyaku2_min = 0 +local Whand_jyaku2_max = 2.1 +local Whand_kyou_min = 0 +local Whand_kyou_max = 2.6 +local Whand_kyou2_min = 0 +local Whand_kyou2_max = 1.7 +local PushR_min = 0 +local PushR_max = 0.6 +local Magic_min = 5 +local Magic_max = 10 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 2.2 +local Backstep_Atk2_min = 0 +local Backstep_Atk2_max = 1.3 +local Rolling_Atk_min = 4 +local Rolling_Atk_max = 5 +local Rolling_Atk2_min = 5 +local Rolling_Atk2_max = 6 +local Backstep_AtkW_min = 0 +local Backstep_AtkW_max = 2.2 +local Backstep_AtkW2_min = 0 +local Backstep_AtkW2_max = 1.3 +local Rolling_AtkW_min = 4 +local Rolling_AtkW_max = 5 +local Rolling_AtkW2_min = 5 +local Rolling_AtkW2_max = 6 +REGISTER_GOAL_NO_UPDATE(GOAL_TrickStar6260_Battle, 1) +function TrickStar6260Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local BothHandOff = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local RYOUTE_odds = 1 + local KATATE_odds = 1 + if ai:IsFinishTimer(0) == true then + if not ai:IsBothHandMode(TARGET_SELF) then + RYOUTE_odds = 0 + else + KATATE_odds = 0 + end + end + if ai:IsTargetGuard(TARGET_ENE_0) == true then + RYOUTE_odds = 10 + end + if 8 <= targetDist then + actPerArr[1] = 10 * KATATE_odds + actPerArr[2] = 20 * KATATE_odds + actPerArr[3] = 10 * KATATE_odds + actPerArr[4] = 20 * KATATE_odds + actPerArr[7] = 20 * KATATE_odds + actPerArr[8] = 20 * KATATE_odds + actPerArr[9] = 10 * RYOUTE_odds + actPerArr[10] = 20 * RYOUTE_odds + actPerArr[11] = 10 * RYOUTE_odds + actPerArr[12] = 20 * RYOUTE_odds + actPerArr[15] = 20 * RYOUTE_odds + actPerArr[16] = 20 * RYOUTE_odds + elseif 4 <= targetDist then + actPerArr[1] = 15 * KATATE_odds + actPerArr[2] = 15 * KATATE_odds + actPerArr[3] = 15 * KATATE_odds + actPerArr[4] = 15 * KATATE_odds + actPerArr[7] = 20 * KATATE_odds + actPerArr[8] = 20 * KATATE_odds + actPerArr[9] = 10 * RYOUTE_odds + actPerArr[10] = 20 * RYOUTE_odds + actPerArr[11] = 10 * RYOUTE_odds + actPerArr[12] = 20 * RYOUTE_odds + actPerArr[15] = 20 * RYOUTE_odds + actPerArr[16] = 20 * RYOUTE_odds + elseif 2.1 <= targetDist then + actPerArr[1] = 25 * KATATE_odds + actPerArr[2] = 25 * KATATE_odds + actPerArr[3] = 25 * KATATE_odds + actPerArr[4] = 25 * KATATE_odds + actPerArr[9] = 25 * RYOUTE_odds + actPerArr[10] = 25 * RYOUTE_odds + actPerArr[11] = 25 * RYOUTE_odds + actPerArr[12] = 25 * RYOUTE_odds + elseif 1 <= targetDist then + actPerArr[1] = 18 * KATATE_odds + actPerArr[2] = 17 * KATATE_odds + actPerArr[3] = 18 * KATATE_odds + actPerArr[4] = 17 * KATATE_odds + actPerArr[5] = 15 * KATATE_odds + actPerArr[6] = 15 * KATATE_odds + actPerArr[9] = 10 * RYOUTE_odds + actPerArr[10] = 10 * RYOUTE_odds + actPerArr[11] = 13 * RYOUTE_odds + actPerArr[12] = 12 * RYOUTE_odds + actPerArr[13] = 13 * KATATE_odds + actPerArr[14] = 12 * KATATE_odds + actPerArr[17] = 30 * RYOUTE_odds + else + actPerArr[1] = 15 * KATATE_odds + actPerArr[2] = 15 * KATATE_odds + actPerArr[3] = 18 * KATATE_odds + actPerArr[4] = 17 * KATATE_odds + actPerArr[5] = 10 * KATATE_odds + actPerArr[6] = 10 * KATATE_odds + actPerArr[9] = 15 * RYOUTE_odds + actPerArr[10] = 15 * RYOUTE_odds + actPerArr[11] = 18 * RYOUTE_odds + actPerArr[12] = 17 * RYOUTE_odds + actPerArr[13] = 10 * KATATE_odds + actPerArr[14] = 10 * KATATE_odds + actPerArr[17] = 20 * RYOUTE_odds + actPerArr[18] = 10 * KATATE_odds + end + actFuncArr[1] = REGIST_FUNC(ai, goal, TrickStar6260_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, TrickStar6260_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, TrickStar6260_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, TrickStar6260_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, TrickStar6260_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, TrickStar6260_Act06) + actFuncArr[9] = REGIST_FUNC(ai, goal, TrickStar6260_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, TrickStar6260_Act10) + actFuncArr[11] = REGIST_FUNC(ai, goal, TrickStar6260_Act11) + actFuncArr[12] = REGIST_FUNC(ai, goal, TrickStar6260_Act12) + actFuncArr[13] = REGIST_FUNC(ai, goal, TrickStar6260_Act13) + actFuncArr[14] = REGIST_FUNC(ai, goal, TrickStar6260_Act14) + actFuncArr[17] = REGIST_FUNC(ai, goal, TrickStar6260_Act17) + actFuncArr[18] = REGIST_FUNC(ai, goal, TrickStar6260_Act18) + local atkAfterFunc = REGIST_FUNC(ai, goal, TrickStar6260_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function TrickStar6260_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function TrickStar6260_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = NormalR2_max +function TrickStar6260_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = NormalR2_max + local DashDist = NormalR2_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR2_max +function TrickStar6260_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR2(ai, goal) + local AppDist = LargeR2_max + local DashDist = LargeR2_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_Atk_max +function TrickStar6260_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = Backstep_Atk_max + local DashDist = Backstep_Atk_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_Atk2_max +function TrickStar6260_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR2(ai, goal) + local AppDist = Backstep_Atk2_max + local DashDist = Backstep_Atk2_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Whand_jyaku_max +function TrickStar6260_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Whand_jyaku_max + local DashDist = Whand_jyaku_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Whand_kyou_max +function TrickStar6260_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = Whand_kyou_max + local DashDist = Whand_kyou_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Whand_jyaku2_max +function TrickStar6260_Act11(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR2(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Whand_jyaku2_max + local DashDist = Whand_jyaku2_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Whand_kyou2_max +function TrickStar6260_Act12(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR2(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Whand_kyou2_max + local DashDist = Whand_kyou2_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_AtkW_max +function TrickStar6260_Act13(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Backstep_AtkW_max + local DashDist = Backstep_AtkW_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_AtkW2_max +function TrickStar6260_Act14(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR2(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Backstep_AtkW2_max + local DashDist = Backstep_AtkW2_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function TrickStar6260_Act17(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function TrickStar6260_Act18(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function TrickStar6260_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 5 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate2 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepL, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 2) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepR, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 2) + end + elseif fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate <= 15 then + if fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 6, TARGET_ENE_0, ai:GetRandam_Float(1.5, 3), TARGET_ENE_0, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + end + return +end + +function TrickStar6260Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function TrickStar6260Battle_Terminate(ai, goal) + return +end + +NormalR_min = LargeR_max +function TrickStar6260Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 10 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 80 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 10 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + end + end + if ai:IsInterupt(INTERUPT_GuardBreak) then + local distGuardBreak_Act = 2 + local oddsGuardBreak_Act = 100 + if targetDist <= distGuardBreak_Act and fate <= oddsGuardBreak_Act then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 10 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + else + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/006270_battle.lua b/scripts_decompiled/006270_battle.lua new file mode 100644 index 0000000..8c0abcb --- /dev/null +++ b/scripts_decompiled/006270_battle.lua @@ -0,0 +1,377 @@ +REGISTER_GOAL(GOAL_Frustrated_Fighter6270_Battle, "Frustrated_Fighter6270Battle") +local NormalR_min = 0 +local NormalR_max = 1.2 +local Guard_NormalR_min = 0 +local Guard_NormalR_max = 1.5 +local LargeR_min = 0 +local LargeR_max = 2 +local PushR_min = 0 +local PushR_max = 1 +local Magic_min = 8 +local Magic_max = 8 +local NPC_ATK_Parry_min = 0 +local NPC_ATK_Parry_max = 0.8 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 1 +local Rolling_Atk_min = 3.5 +local Rolling_Atk_max = 4.5 +REGISTER_GOAL_NO_UPDATE(GOAL_Frustrated_Fighter6270_Battle, 1) +function Frustrated_Fighter6270Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if 8 <= targetDist then + actPerArr[1] = 10 + actPerArr[3] = 20 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 70 + actPerArr[7] = 0 + actPerArr[8] = 0 + elseif 4.5 <= targetDist then + actPerArr[1] = 20 + actPerArr[3] = 20 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 60 + actPerArr[7] = 0 + actPerArr[8] = 0 + elseif 2.8 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 0 + actPerArr[2] = 30 + actPerArr[3] = 20 + actPerArr[4] = 10 + actPerArr[5] = 0 + actPerArr[6] = 0 + actPerArr[7] = 40 + actPerArr[8] = 0 + else + actPerArr[1] = 20 + actPerArr[2] = 0 + actPerArr[3] = 30 + actPerArr[4] = 0 + actPerArr[5] = 20 + actPerArr[6] = 0 + actPerArr[7] = 30 + actPerArr[8] = 0 + end + elseif 1 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 0 + actPerArr[2] = 30 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 10 + actPerArr[6] = 0 + actPerArr[7] = 50 + actPerArr[8] = 10 + else + actPerArr[1] = 22 + actPerArr[2] = 0 + actPerArr[3] = 22 + actPerArr[4] = 0 + actPerArr[5] = 16 + actPerArr[6] = 0 + actPerArr[7] = 30 + actPerArr[8] = 10 + end + elseif ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 0 + actPerArr[2] = 18 + actPerArr[3] = 0 + actPerArr[4] = 12 + actPerArr[5] = 0 + actPerArr[6] = 0 + actPerArr[7] = 60 + actPerArr[8] = 10 + else + actPerArr[1] = 20 + actPerArr[2] = 0 + actPerArr[3] = 20 + actPerArr[4] = 0 + actPerArr[5] = 20 + actPerArr[6] = 0 + actPerArr[7] = 30 + actPerArr[8] = 10 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Frustrated_Fighter6270_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Frustrated_Fighter6270_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, Frustrated_Fighter6270_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, Frustrated_Fighter6270_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, Frustrated_Fighter6270_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, Frustrated_Fighter6270_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, Frustrated_Fighter6270_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, Frustrated_Fighter6270_Act08) + actFuncArr[9] = REGIST_FUNC(ai, goal, Frustrated_Fighter6270_Act09) + local atkAfterFunc = REGIST_FUNC(ai, goal, Frustrated_Fighter6270_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function Frustrated_Fighter6270_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 100 + CommonNPC_ChangeWepL1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function Frustrated_Fighter6270_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, LargeR_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_TurnAround, 2, TARGET_ENE_0, AI_DIR_TYPE_B, 10, false, true, 4) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function Frustrated_Fighter6270_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + CommonNPC_ChangeWepL1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + end + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function Frustrated_Fighter6270_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 100 + CommonNPC_ChangeWepL1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = NormalR_max +function Frustrated_Fighter6270_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 100 + CommonNPC_ChangeWepL1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Rolling_Atk_max +function Frustrated_Fighter6270_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Rolling_Atk_max + local DashDist = Rolling_Atk_max + 5 + local Odds_Guard = 100 + CommonNPC_ChangeWepL1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Frustrated_Fighter6270_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepL1(ai, goal) + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(2, 2.5), TARGET_SELF, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, 4) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Frustrated_Fighter6270_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + CommonNPC_ChangeWepL1(ai, goal) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR_min = Magic_min +function Frustrated_Fighter6270_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic1Limit = ai:GetNumber(2) + CommonNPC_ChangeWepL2(ai, goal) + if targetDist <= Magic_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, Magic_min, TARGET_ENE_0, false, -1) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicL, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicL, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + ai:SetTimer(1, 62) + ai:SetNumber(2, Magic1Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Frustrated_Fighter6270_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 5 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate2 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepL, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 2) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepR, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 2) + end + elseif fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate <= 60 then + if fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 6, TARGET_ENE_0, ai:GetRandam_Float(1.5, 3), TARGET_ENE_0, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + end + return +end + +function Frustrated_Fighter6270Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Frustrated_Fighter6270Battle_Terminate(ai, goal) + return +end + +function Frustrated_Fighter6270Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local ParryDist = 3 + local ParryAng = 60 + local ParryThrowDist = 4 + local ParryThrowAng = 60 + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 80 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 40 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 10 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_ParryTiming) then + if targetDist <= ParryDist and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, ParryAng) and ai:IsTargetGuard(TARGET_SELF) == true then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_Parry, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + elseif ai:IsInterupt(INTERUPT_SuccessParry) and targetDist <= ParryThrowDist and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, ParryThrowAng) then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, TARGET_ENE_0, 1, TARGET_SELF, false, -1) + local life = ai:GetRandam_Float(0.3, 0.6) + goal:AddSubGoal(GOAL_COMMON_Wait, life, TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + return false +end + +return diff --git a/scripts_decompiled/006271_battle.lua b/scripts_decompiled/006271_battle.lua new file mode 100644 index 0000000..31c9082 --- /dev/null +++ b/scripts_decompiled/006271_battle.lua @@ -0,0 +1,327 @@ +REGISTER_GOAL(GOAL_Frustrated_FighterH6271_Battle, "Frustrated_FighterH6271Battle") +local NormalR_min = 0 +local NormalR_max = 1.2 +local Guard_NormalR_min = 0 +local Guard_NormalR_max = 1.5 +local LargeR_min = 0 +local LargeR_max = 2 +local PushR_min = 0 +local PushR_max = 1 +local Magic_min = 8 +local Magic_max = 8 +local NPC_ATK_Parry_min = 0 +local NPC_ATK_Parry_max = 0.8 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 1 +local Rolling_Atk_min = 3.5 +local Rolling_Atk_max = 4.5 +REGISTER_GOAL_NO_UPDATE(GOAL_Frustrated_FighterH6271_Battle, 1) +function Frustrated_FighterH6271Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if 8 <= targetDist then + actPerArr[1] = 10 + actPerArr[3] = 20 + actPerArr[6] = 70 + elseif 4.5 <= targetDist then + actPerArr[1] = 20 + actPerArr[3] = 20 + actPerArr[6] = 60 + elseif 2.8 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[2] = 30 + actPerArr[3] = 20 + actPerArr[4] = 10 + actPerArr[7] = 40 + else + actPerArr[1] = 20 + actPerArr[3] = 30 + actPerArr[5] = 20 + actPerArr[7] = 30 + end + elseif 1 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[2] = 30 + actPerArr[5] = 10 + actPerArr[7] = 50 + actPerArr[8] = 10 + else + actPerArr[1] = 22 + actPerArr[3] = 22 + actPerArr[5] = 16 + actPerArr[7] = 30 + actPerArr[8] = 10 + end + elseif ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[2] = 18 + actPerArr[4] = 12 + actPerArr[7] = 60 + actPerArr[8] = 10 + else + actPerArr[1] = 20 + actPerArr[3] = 20 + actPerArr[5] = 20 + actPerArr[7] = 30 + actPerArr[8] = 10 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Frustrated_FighterH6271_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Frustrated_FighterH6271_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, Frustrated_FighterH6271_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, Frustrated_FighterH6271_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, Frustrated_FighterH6271_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, Frustrated_FighterH6271_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, Frustrated_FighterH6271_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, Frustrated_FighterH6271_Act08) + local atkAfterFunc = REGIST_FUNC(ai, goal, Frustrated_FighterH6271_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function Frustrated_FighterH6271_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 100 + CommonNPC_ChangeWepL1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function Frustrated_FighterH6271_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, LargeR_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_TurnAround, 2, TARGET_ENE_0, AI_DIR_TYPE_B, 10, false, true, 4) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function Frustrated_FighterH6271_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + CommonNPC_ChangeWepL1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + end + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function Frustrated_FighterH6271_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 100 + CommonNPC_ChangeWepL1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = NormalR_max +function Frustrated_FighterH6271_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 100 + CommonNPC_ChangeWepL1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Rolling_Atk_max +function Frustrated_FighterH6271_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Rolling_Atk_max + local DashDist = Rolling_Atk_max + 5 + local Odds_Guard = 100 + CommonNPC_ChangeWepL1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Frustrated_FighterH6271_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepL1(ai, goal) + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(2, 2.5), TARGET_SELF, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, 4) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Frustrated_FighterH6271_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + CommonNPC_ChangeWepL1(ai, goal) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Frustrated_FighterH6271_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 5 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate2 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepL, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 2) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepR, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 2) + end + elseif fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate <= 60 then + if fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 6, TARGET_ENE_0, ai:GetRandam_Float(1.5, 3), TARGET_ENE_0, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + end + return +end + +function Frustrated_FighterH6271Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Frustrated_FighterH6271Battle_Terminate(ai, goal) + return +end + +function Frustrated_FighterH6271Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local ParryDist = 3 + local ParryAng = 60 + local ParryThrowDist = 4 + local ParryThrowAng = 60 + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 80 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 40 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 10 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_ParryTiming) then + if targetDist <= ParryDist and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, ParryAng) and ai:IsTargetGuard(TARGET_SELF) == true then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_Parry, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + elseif ai:IsInterupt(INTERUPT_SuccessParry) and targetDist <= ParryThrowDist and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, ParryThrowAng) then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, TARGET_ENE_0, 1, TARGET_SELF, false, -1) + local life = ai:GetRandam_Float(0.3, 0.6) + goal:AddSubGoal(GOAL_COMMON_Wait, life, TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + return false +end + +return diff --git a/scripts_decompiled/006280_battle.lua b/scripts_decompiled/006280_battle.lua new file mode 100644 index 0000000..ff16062 --- /dev/null +++ b/scripts_decompiled/006280_battle.lua @@ -0,0 +1,374 @@ +REGISTER_GOAL(GOAL_OnionKnight6280_Battle, "OnionKnight6280Battle") +local NormalR_min = 0 +local NormalR_max = 2.5 +local LargeR_min = 0 +local LargeR_max = 4.2 +local Whand_jyaku_min = 0 +local Whand_jyaku_max = 2.5 +local Whand_kyou_min = 0 +local Whand_kyou_max = 4.2 +local PushR_min = 0 +local PushR_max = 1.1 +local Tate_min = 0 +local Tate_max = 1.3 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 3.8 +local Rolling_Atk_min = 4 +local Rolling_Atk_max = 5.6 +REGISTER_GOAL_NO_UPDATE(GOAL_OnionKnight6280_Battle, 1) +function OnionKnight6280Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local BothHandOff = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if ai:IsTargetGuard(TARGET_ENE_0) == false and ai:IsBothHandMode(TARGET_SELF) and BothHandOff <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + if 8 <= targetDist then + actPerArr[1] = 45 + actPerArr[3] = 45 + actPerArr[7] = 5 + actPerArr[8] = 5 + actPerArr[10] = 5 + elseif 5 <= targetDist then + actPerArr[1] = 35 + actPerArr[3] = 40 + actPerArr[7] = 5 + actPerArr[8] = 15 + actPerArr[10] = 5 + elseif 2.9 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 30 + actPerArr[3] = 30 + actPerArr[4] = 15 + actPerArr[8] = 25 + else + actPerArr[1] = 35 + actPerArr[3] = 35 + actPerArr[4] = 13 + actPerArr[8] = 12 + actPerArr[10] = 5 + end + elseif 1 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 21 + actPerArr[3] = 21 + actPerArr[4] = 22 + actPerArr[8] = 21 + actPerArr[6] = 15 + else + actPerArr[1] = 20 + actPerArr[3] = 20 + actPerArr[4] = 20 + actPerArr[8] = 20 + actPerArr[6] = 15 + actPerArr[10] = 5 + end + elseif ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 15 + actPerArr[3] = 15 + actPerArr[4] = 25 + actPerArr[8] = 25 + actPerArr[6] = 20 + else + actPerArr[1] = 15 + actPerArr[3] = 15 + actPerArr[4] = 23 + actPerArr[8] = 22 + actPerArr[6] = 15 + actPerArr[10] = 5 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, OnionKnight6280_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, OnionKnight6280_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, OnionKnight6280_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, OnionKnight6280_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, OnionKnight6280_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, OnionKnight6280_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, OnionKnight6280_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, OnionKnight6280_Act08) + actFuncArr[9] = REGIST_FUNC(ai, goal, OnionKnight6280_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, OnionKnight6280_Act10) + local atkAfterFunc = REGIST_FUNC(ai, goal, OnionKnight6280_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function OnionKnight6280_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + if ai:IsTargetGuard(TARGET_ENE_0) == true and not ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, NormalR_max, TARGET_SELF, false, 4) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function OnionKnight6280_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + if ai:IsTargetGuard(TARGET_ENE_0) == true and not ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + local AppDist = Guard_NormalR_max + local DashDist = Guard_NormalR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function OnionKnight6280_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + if ai:IsTargetGuard(TARGET_ENE_0) == true and not ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function OnionKnight6280_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalL, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Tate_max +function OnionKnight6280_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, Tate_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_Parry, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = NormalR_max +function OnionKnight6280_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + if ai:IsTargetGuard(TARGET_ENE_0) == true and not ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Rolling_Atk_max +function OnionKnight6280_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + if ai:IsTargetGuard(TARGET_ENE_0) == true and not ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + local AppDist = Rolling_Atk_max + local DashDist = Rolling_Atk_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function OnionKnight6280_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(2, 2.5), TARGET_SELF, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, 4) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function OnionKnight6280_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function OnionKnight6280_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function OnionKnight6280_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 100 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + end + return +end + +function OnionKnight6280Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function OnionKnight6280Battle_Terminate(ai, goal) + return +end + +NormalR_min = LargeR_max +function OnionKnight6280Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 75 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, combRunDist, TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 80 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_GuardBreak) then + local distGuardBreak_Act = 3 + local oddsGuardBreak_Act = 100 + if targetDist <= distGuardBreak_Act and fate <= oddsGuardBreak_Act then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 10 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 50 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, combRunDist, TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 75 + if fate <= shootIntPer then + goal:ClearSubGoal() + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/006290_battle.lua b/scripts_decompiled/006290_battle.lua new file mode 100644 index 0000000..67d5392 --- /dev/null +++ b/scripts_decompiled/006290_battle.lua @@ -0,0 +1,373 @@ +REGISTER_GOAL(GOAL_Daughter_of_OnionKnight6290_Battle, "Daughter_of_OnionKnight6290Battle") +local NormalR_min = 0 +local NormalR_max = 1.7 +local LargeR_min = 0 +local LargeR_max = 2.9 +local Whand_jyaku_min = 0 +local Whand_jyaku_max = 2.7 +local Whand_kyou_min = 0 +local Whand_kyou_max = 1.8 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 1.5 +local Backstep_AtkW_min = 0 +local Backstep_AtkW_max = 1.3 +local Rolling_Atk_min = 3.5 +local Rolling_Atk_max = 4.5 +local Rolling_AtkW_min = 4 +local Rolling_AtkW_max = 5 +local PushR_min = 0 +local PushR_max = 1 +REGISTER_GOAL_NO_UPDATE(GOAL_Daughter_of_OnionKnight6290_Battle, 1) +function Daughter_of_OnionKnight6290Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local BothHandOff = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local RYOUTE_odds = 1 + local KATATE_odds = 1 + if ai:IsTargetGuard(TARGET_ENE_0) == true then + RYOUTE_odds = 10 + end + if 8 <= targetDist then + actPerArr[1] = 35 * KATATE_odds + actPerArr[2] = 35 * KATATE_odds + actPerArr[7] = 5 * KATATE_odds + actPerArr[9] = 35 * RYOUTE_odds + actPerArr[10] = 35 * RYOUTE_odds + actPerArr[15] = 5 * RYOUTE_odds + actPerArr[20] = 25 * RYOUTE_odds + elseif 3.5 <= targetDist then + actPerArr[1] = 30 * KATATE_odds + actPerArr[2] = 30 * KATATE_odds + actPerArr[7] = 5 * KATATE_odds + actPerArr[9] = 30 * RYOUTE_odds + actPerArr[10] = 30 * RYOUTE_odds + actPerArr[15] = 5 * RYOUTE_odds + actPerArr[20] = 35 * RYOUTE_odds + elseif 1.3 <= targetDist then + actPerArr[1] = 32 * KATATE_odds + actPerArr[2] = 33 * KATATE_odds + actPerArr[9] = 32 * RYOUTE_odds + actPerArr[10] = 33 * RYOUTE_odds + actPerArr[17] = 30 * RYOUTE_odds + actPerArr[20] = 35 * RYOUTE_odds + elseif 1 <= targetDist then + actPerArr[1] = 18 * KATATE_odds + actPerArr[2] = 17 * KATATE_odds + actPerArr[5] = 15 * KATATE_odds + actPerArr[9] = 10 * RYOUTE_odds + actPerArr[10] = 10 * RYOUTE_odds + actPerArr[13] = 13 * KATATE_odds + actPerArr[17] = 30 * RYOUTE_odds + else + actPerArr[1] = 17 * KATATE_odds + actPerArr[2] = 18 * KATATE_odds + actPerArr[5] = 15 * KATATE_odds + actPerArr[9] = 17 * RYOUTE_odds + actPerArr[10] = 18 * RYOUTE_odds + actPerArr[13] = 15 * KATATE_odds + actPerArr[17] = 20 * RYOUTE_odds + actPerArr[20] = 30 * RYOUTE_odds + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Daughter_of_OnionKnight6290_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Daughter_of_OnionKnight6290_Act02) + actFuncArr[5] = REGIST_FUNC(ai, goal, Daughter_of_OnionKnight6290_Act05) + actFuncArr[7] = REGIST_FUNC(ai, goal, Daughter_of_OnionKnight6290_Act07) + actFuncArr[9] = REGIST_FUNC(ai, goal, Daughter_of_OnionKnight6290_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, Daughter_of_OnionKnight6290_Act10) + actFuncArr[13] = REGIST_FUNC(ai, goal, Daughter_of_OnionKnight6290_Act13) + actFuncArr[15] = REGIST_FUNC(ai, goal, Daughter_of_OnionKnight6290_Act15) + actFuncArr[17] = REGIST_FUNC(ai, goal, Daughter_of_OnionKnight6290_Act17) + actFuncArr[20] = REGIST_FUNC(ai, goal, Daughter_of_OnionKnight6290_Act20) + local atkAfterFunc = REGIST_FUNC(ai, goal, Daughter_of_OnionKnight6290_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function Daughter_of_OnionKnight6290_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function Daughter_of_OnionKnight6290_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_Atk_max +function Daughter_of_OnionKnight6290_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = Backstep_Atk_max + local DashDist = Backstep_Atk_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Rolling_Atk_max +function Daughter_of_OnionKnight6290_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = Rolling_Atk_max + local DashDist = Rolling_Atk_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Whand_jyaku_max +function Daughter_of_OnionKnight6290_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Whand_jyaku_max + local DashDist = Whand_jyaku_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Whand_kyou_max +function Daughter_of_OnionKnight6290_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Whand_kyou_max + local DashDist = Whand_kyou_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_AtkW_max +function Daughter_of_OnionKnight6290_Act13(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Backstep_AtkW_max + local DashDist = Backstep_AtkW_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Rolling_AtkW_max +function Daughter_of_OnionKnight6290_Act15(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Rolling_AtkW_max + local DashDist = Rolling_AtkW_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function Daughter_of_OnionKnight6290_Act17(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalL, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Daughter_of_OnionKnight6290_Act20(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(2, 2.5), TARGET_SELF, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, 4) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Daughter_of_OnionKnight6290_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 100 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + end + return +end + +function Daughter_of_OnionKnight6290Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Daughter_of_OnionKnight6290Battle_Terminate(ai, goal) + return +end + +NormalR_min = LargeR_max +function Daughter_of_OnionKnight6290Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 10 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 80 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 10 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + end + end + if ai:IsInterupt(INTERUPT_GuardBreak) then + local distGuardBreak_Act = 2 + local oddsGuardBreak_Act = 100 + if targetDist <= distGuardBreak_Act and fate <= oddsGuardBreak_Act then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 10 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + else + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/006300_battle.lua b/scripts_decompiled/006300_battle.lua new file mode 100644 index 0000000..edbac17 --- /dev/null +++ b/scripts_decompiled/006300_battle.lua @@ -0,0 +1,312 @@ +REGISTER_GOAL(GOAL_HeldKnight_laughtrec6300_Battle, "HeldKnight_laughtrec6300Battle") +local NormalR_min = 0 +local NormalR_max = 1.2 +local LargeR_min = 0 +local LargeR_max = 1.7 +local PushR_min = 0 +local PushR_max = 1 +local Magic_min = 8 +local Magic_max = 8 +local Magic2_min = 8 +local Magic2_max = 8 +local NPC_ATK_Parry_min = 0 +local NPC_ATK_Parry_max = 0.8 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 1 +local Rolling_Atk_min = 3 +local Rolling_Atk_max = 4 +REGISTER_GOAL_NO_UPDATE(GOAL_HeldKnight_laughtrec6300_Battle, 1) +function HeldKnight_laughtrec6300Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local MagicValue1 = 1 + local Magic1Limit = ai:GetNumber(0) + if 5 <= Magic1Limit or ai:HasSpecialEffectId(TARGET_SELF, 610) then + MagicValue1 = 0 + end + local MagicValue2 = 1 + local Magic2Limit = ai:GetNumber(1) + if 5 <= Magic2Limit or not not ai:HasSpecialEffectId(TARGET_SELF, 1800) or ai:HasSpecialEffectId(TARGET_SELF, 610) then + MagicValue2 = 0 + end + local MagicValue3 = 1 + local Magic3Limit = ai:GetNumber(2) + if 5 <= Magic3Limit or not not ai:HasSpecialEffectId(TARGET_SELF, 1800) or ai:HasSpecialEffectId(TARGET_SELF, 610) then + MagicValue3 = 0 + end + local hprate = ai:GetHpRate(TARGET_SELF) + local Kaifuku = 0 + if hprate <= 0.5 then + Kaifuku = 1 + end + if 8 <= targetDist then + actPerArr[1] = 15 + actPerArr[3] = 15 + actPerArr[6] = 70 + elseif 3 <= targetDist then + actPerArr[1] = 20 + actPerArr[3] = 20 + actPerArr[6] = 60 + elseif 1 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 10 + actPerArr[3] = 20 + actPerArr[4] = 20 + actPerArr[7] = 50 + else + actPerArr[1] = 20 + actPerArr[3] = 30 + actPerArr[7] = 50 + end + elseif ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[3] = 15 + actPerArr[4] = 15 + actPerArr[5] = 20 + actPerArr[7] = 50 + else + actPerArr[1] = 15 + actPerArr[3] = 15 + actPerArr[5] = 20 + actPerArr[7] = 50 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, HeldKnight_laughtrec6300_Act01) + actFuncArr[3] = REGIST_FUNC(ai, goal, HeldKnight_laughtrec6300_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, HeldKnight_laughtrec6300_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, HeldKnight_laughtrec6300_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, HeldKnight_laughtrec6300_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, HeldKnight_laughtrec6300_Act07) + local atkAfterFunc = REGIST_FUNC(ai, goal, HeldKnight_laughtrec6300_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function HeldKnight_laughtrec6300_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 0 + CommonNPC_ChangeWepL1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalL, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function HeldKnight_laughtrec6300_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 0 + CommonNPC_ChangeWepL1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + end + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function HeldKnight_laughtrec6300_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 0 + CommonNPC_ChangeWepL1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = NormalR_max +function HeldKnight_laughtrec6300_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 0 + CommonNPC_ChangeWepL1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Rolling_Atk_max +function HeldKnight_laughtrec6300_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Rolling_Atk_max + local DashDist = Rolling_Atk_max + 5 + local Odds_Guard = 100 + CommonNPC_ChangeWepL1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function HeldKnight_laughtrec6300_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepL2(ai, goal) + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(2, 2.5), TARGET_SELF, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, 4) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function HeldKnight_laughtrec6300_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 5 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate2 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepL, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 2) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepR, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 2) + end + elseif fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate <= 60 then + CommonNPC_ChangeWepL2(ai, goal) + if fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 6, TARGET_ENE_0, ai:GetRandam_Float(1.5, 3), TARGET_ENE_0, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + end + return +end + +function HeldKnight_laughtrec6300Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function HeldKnight_laughtrec6300Battle_Terminate(ai, goal) + return +end + +function HeldKnight_laughtrec6300Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local ParryDist = 3 + local ParryAng = 60 + local ParryThrowDist = 4 + local ParryThrowAng = 60 + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 80 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 40 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 10 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_ParryTiming) then + if targetDist <= ParryDist and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, ParryAng) and ai:IsTargetGuard(TARGET_SELF) == true then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_Parry, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + elseif ai:IsInterupt(INTERUPT_SuccessParry) and targetDist <= ParryThrowDist and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, ParryThrowAng) then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, TARGET_ENE_0, 1, TARGET_SELF, false, -1) + local life = ai:GetRandam_Float(0.3, 0.6) + goal:AddSubGoal(GOAL_COMMON_Wait, life, TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + return false +end + +return diff --git a/scripts_decompiled/006310_battle.lua b/scripts_decompiled/006310_battle.lua new file mode 100644 index 0000000..673f34e --- /dev/null +++ b/scripts_decompiled/006310_battle.lua @@ -0,0 +1,367 @@ +REGISTER_GOAL(GOAL_Nobushi6310_Battle, "Nobushi6310Battle") +local NormalR_min = 0 +local NormalR_max = 2.1 +local LargeR_min = 0 +local LargeR_max = 3.5 +local Whand_jyaku_min = 0 +local Whand_jyaku_max = 2.1 +local Whand_kyou_min = 0 +local Whand_kyou_max = 3.3 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 2 +local Backstep_AtkW_min = 0 +local Backstep_AtkW_max = 2.5 +local Rolling_Atk_min = 3.5 +local Rolling_Atk_max = 4.5 +local Rolling_AtkW_min = 4 +local Rolling_AtkW_max = 5 +local PushR_min = 0 +local PushR_max = 1 +REGISTER_GOAL_NO_UPDATE(GOAL_Nobushi6310_Battle, 1) +function Nobushi6310Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local BothHandOff = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local RYOUTE_odds = 1 + local KATATE_odds = 1 + if ai:IsTargetGuard(TARGET_ENE_0) == true then + RYOUTE_odds = 10 + end + if 8 <= targetDist then + actPerArr[1] = 10 * KATATE_odds + actPerArr[2] = 20 * KATATE_odds + actPerArr[7] = 20 * KATATE_odds + actPerArr[9] = 10 * RYOUTE_odds + actPerArr[10] = 20 * RYOUTE_odds + actPerArr[15] = 20 * RYOUTE_odds + elseif 4 <= targetDist then + actPerArr[1] = 15 * KATATE_odds + actPerArr[2] = 15 * KATATE_odds + actPerArr[7] = 20 * KATATE_odds + actPerArr[9] = 10 * RYOUTE_odds + actPerArr[10] = 20 * RYOUTE_odds + actPerArr[15] = 20 * RYOUTE_odds + elseif 2.1 <= targetDist then + actPerArr[1] = 25 * KATATE_odds + actPerArr[2] = 25 * KATATE_odds + actPerArr[9] = 25 * RYOUTE_odds + actPerArr[10] = 25 * RYOUTE_odds + elseif 1 <= targetDist then + actPerArr[1] = 18 * KATATE_odds + actPerArr[2] = 17 * KATATE_odds + actPerArr[5] = 15 * KATATE_odds + actPerArr[9] = 10 * RYOUTE_odds + actPerArr[10] = 10 * RYOUTE_odds + actPerArr[13] = 13 * KATATE_odds + actPerArr[17] = 30 * RYOUTE_odds + else + actPerArr[1] = 15 * KATATE_odds + actPerArr[2] = 15 * KATATE_odds + actPerArr[5] = 10 * KATATE_odds + actPerArr[17] = 20 * RYOUTE_odds + actPerArr[18] = 10 * KATATE_odds + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Nobushi6310_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Nobushi6310_Act02) + actFuncArr[5] = REGIST_FUNC(ai, goal, Nobushi6310_Act05) + actFuncArr[7] = REGIST_FUNC(ai, goal, Nobushi6310_Act07) + actFuncArr[9] = REGIST_FUNC(ai, goal, Nobushi6310_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, Nobushi6310_Act10) + actFuncArr[13] = REGIST_FUNC(ai, goal, Nobushi6310_Act13) + actFuncArr[15] = REGIST_FUNC(ai, goal, Nobushi6310_Act15) + actFuncArr[17] = REGIST_FUNC(ai, goal, Nobushi6310_Act17) + actFuncArr[18] = REGIST_FUNC(ai, goal, Nobushi6310_Act18) + local atkAfterFunc = REGIST_FUNC(ai, goal, Nobushi6310_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function Nobushi6310_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function Nobushi6310_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_Atk_max +function Nobushi6310_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = Backstep_Atk_max + local DashDist = Backstep_Atk_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Rolling_Atk_max +function Nobushi6310_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = Rolling_Atk_max + local DashDist = Rolling_Atk_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Whand_jyaku_max +function Nobushi6310_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Whand_jyaku_max + local DashDist = Whand_jyaku_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Whand_kyou_max +function Nobushi6310_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Whand_kyou_max + local DashDist = Whand_kyou_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_AtkW_max +function Nobushi6310_Act13(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Backstep_AtkW_max + local DashDist = Backstep_AtkW_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Rolling_AtkW_max +function Nobushi6310_Act15(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Rolling_AtkW_max + local DashDist = Rolling_AtkW_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function Nobushi6310_Act17(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Nobushi6310_Act18(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Nobushi6310_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 5 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate2 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepL, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 2) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepR, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 2) + end + elseif fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 6, TARGET_ENE_0, ai:GetRandam_Float(1.5, 3), TARGET_ENE_0, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + return +end + +function Nobushi6310Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Nobushi6310Battle_Terminate(ai, goal) + return +end + +NormalR_min = LargeR_max +function Nobushi6310Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 10 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 80 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 10 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + end + end + if ai:IsInterupt(INTERUPT_GuardBreak) then + local distGuardBreak_Act = 2 + local oddsGuardBreak_Act = 100 + if targetDist <= distGuardBreak_Act and fate <= oddsGuardBreak_Act then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 10 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + else + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/006320_battle.lua b/scripts_decompiled/006320_battle.lua new file mode 100644 index 0000000..846d5d6 --- /dev/null +++ b/scripts_decompiled/006320_battle.lua @@ -0,0 +1,316 @@ +REGISTER_GOAL(GOAL_CowardInGraveyard_Patch6320_Battle, "CowardInGraveyard_Patch6320Battle") +local NormalR_min = 0 +local NormalR_max = 2.6 +local Guard_NormalR_min = 0 +local Guard_NormalR_max = 1.8 +local LargeR_min = 0 +local LargeR_max = 2.9 +local Whand_jyaku_min = 0 +local Whand_jyaku_max = 3.2 +local Whand_kyou_min = 0 +local Whand_kyou_max = 3.6 +local PushR_min = 0 +local PushR_max = 1.1 +local Backstep_Atk_min = 1.8 +local Backstep_Atk_max = 3.2 +local Rolling_Atk_min = 4.4 +local Rolling_Atk_max = 5.4 +REGISTER_GOAL_NO_UPDATE(GOAL_CowardInGraveyard_Patch6320_Battle, 1) +function CowardInGraveyard_Patch6320Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local BothHandOff = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if 8 <= targetDist then + actPerArr[1] = 5 + actPerArr[2] = 25 + actPerArr[3] = 30 + actPerArr[7] = 10 + actPerArr[8] = 20 + elseif 5.6 <= targetDist then + actPerArr[1] = 5 + actPerArr[2] = 25 + actPerArr[3] = 30 + actPerArr[7] = 10 + actPerArr[8] = 20 + elseif 3.8 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[4] = 25 + actPerArr[8] = 30 + actPerArr[11] = 45 + else + actPerArr[1] = 5 + actPerArr[2] = 30 + actPerArr[3] = 35 + actPerArr[7] = 10 + actPerArr[8] = 15 + end + elseif 1 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[4] = 25 + actPerArr[8] = 10 + actPerArr[11] = 65 + else + actPerArr[1] = 5 + actPerArr[2] = 30 + actPerArr[3] = 30 + actPerArr[6] = 10 + actPerArr[8] = 20 + end + elseif ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[4] = 20 + actPerArr[8] = 10 + actPerArr[11] = 70 + else + actPerArr[1] = 5 + actPerArr[2] = 30 + actPerArr[3] = 30 + actPerArr[6] = 10 + actPerArr[8] = 20 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, CowardInGraveyard_Patch6320_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, CowardInGraveyard_Patch6320_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, CowardInGraveyard_Patch6320_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, CowardInGraveyard_Patch6320_Act04) + actFuncArr[6] = REGIST_FUNC(ai, goal, CowardInGraveyard_Patch6320_Act06) + actFuncArr[8] = REGIST_FUNC(ai, goal, CowardInGraveyard_Patch6320_Act08) + actFuncArr[11] = REGIST_FUNC(ai, goal, CowardInGraveyard_Patch6320_Act11) + local atkAfterFunc = REGIST_FUNC(ai, goal, CowardInGraveyard_Patch6320_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function CowardInGraveyard_Patch6320_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Guard_NormalR_max +function CowardInGraveyard_Patch6320_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Guard_NormalR_max + local DashDist = Guard_NormalR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function CowardInGraveyard_Patch6320_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, LargeR_max, TARGET_SELF, false, 4) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + end + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function CowardInGraveyard_Patch6320_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_Atk_max +function CowardInGraveyard_Patch6320_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Backstep_Atk_max + local DashDist = Backstep_Atk_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function CowardInGraveyard_Patch6320_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(2, 2.5), TARGET_SELF, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, 4) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR_min = Guard_NormalR_max +function CowardInGraveyard_Patch6320_Act11(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, Guard_NormalR_max, TARGET_SELF, false, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(150, 180), false, true, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function CowardInGraveyard_Patch6320_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 80 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + end + return +end + +function CowardInGraveyard_Patch6320Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function CowardInGraveyard_Patch6320Battle_Terminate(ai, goal) + return +end + +NormalR_min = LargeR_max +function CowardInGraveyard_Patch6320Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 40 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, combRunDist, TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 40 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 50 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, combRunDist, TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 10 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 75 + if fate <= shootIntPer then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + else + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + return true + else + return true + end + else + return false + end +end + +return diff --git a/scripts_decompiled/006370_battle.lua b/scripts_decompiled/006370_battle.lua new file mode 100644 index 0000000..9b63913 --- /dev/null +++ b/scripts_decompiled/006370_battle.lua @@ -0,0 +1,407 @@ +REGISTER_GOAL(GOAL_DragonOracle6370_Battle, "DragonOracle6370Battle") +local NormalR_min = 0 +local NormalR_max = 1.7 +local LargeR_min = 0 +local LargeR_max = 1.2 +local PushR_min = 0 +local PushR_max = 1 +local Magic_min = 8 +local Magic_max = 8 +local Magic2_min = 8 +local Magic2_max = 8 +local Magic3_min = 4 +local Magic3_max = 4 +local NPC_ATK_Parry_min = 0 +local NPC_ATK_Parry_max = 0.8 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 1.5 +local Rolling_Atk_min = 3.5 +local Rolling_Atk_max = 4.5 +REGISTER_GOAL_NO_UPDATE(GOAL_DragonOracle6370_Battle, 1) +function DragonOracle6370Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local MagicValue1 = 1 + local Magic1Limit = ai:GetNumber(0) + if 5 <= Magic1Limit or ai:HasSpecialEffectId(TARGET_SELF, 610) then + MagicValue1 = 0 + end + local MagicValue2 = 1 + local Magic2Limit = ai:GetNumber(1) + if 5 <= Magic2Limit or not not ai:HasSpecialEffectId(TARGET_SELF, 1800) or ai:HasSpecialEffectId(TARGET_SELF, 610) then + MagicValue2 = 0 + end + local MagicValue3 = 1 + local Magic3Limit = ai:GetNumber(2) + if 5 <= Magic3Limit or not not ai:HasSpecialEffectId(TARGET_SELF, 1800) or ai:HasSpecialEffectId(TARGET_SELF, 610) then + MagicValue3 = 0 + end + local hprate = ai:GetHpRate(TARGET_SELF) + local Kaifuku = 0 + if hprate <= 0.5 then + Kaifuku = 1 + end + if 8 <= targetDist then + actPerArr[1] = 15 + actPerArr[2] = 10000 * MagicValue1 * Kaifuku + actPerArr[3] = 15 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 60 + actPerArr[7] = 0 + actPerArr[8] = 50 * MagicValue2 + actPerArr[9] = 10 * MagicValue3 + elseif 5 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 10000 * MagicValue1 * Kaifuku + actPerArr[3] = 20 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 50 + actPerArr[7] = 0 + actPerArr[8] = 50 * MagicValue2 + actPerArr[9] = 10 * MagicValue3 + elseif 1.5 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 0 + actPerArr[2] = 10000 * MagicValue1 * Kaifuku + actPerArr[3] = 20 + actPerArr[4] = 20 + actPerArr[5] = 0 + actPerArr[6] = 0 + actPerArr[7] = 50 + actPerArr[8] = 50 * MagicValue2 + actPerArr[9] = 10 * MagicValue3 + else + actPerArr[1] = 20 + actPerArr[2] = 10000 * MagicValue1 * Kaifuku + actPerArr[3] = 20 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 0 + actPerArr[7] = 50 + actPerArr[8] = 50 * MagicValue2 + actPerArr[9] = 10 * MagicValue3 + end + elseif ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 0 + actPerArr[2] = 10000 * MagicValue1 * Kaifuku + actPerArr[3] = 15 + actPerArr[4] = 15 + actPerArr[5] = 20 + actPerArr[6] = 0 + actPerArr[7] = 50 + actPerArr[8] = 50 * MagicValue2 + actPerArr[9] = 10 * MagicValue3 + else + actPerArr[1] = 15 + actPerArr[2] = 10000 * MagicValue1 * Kaifuku + actPerArr[3] = 15 + actPerArr[4] = 0 + actPerArr[5] = 20 + actPerArr[6] = 0 + actPerArr[7] = 50 + actPerArr[8] = 50 * MagicValue2 + actPerArr[9] = 10 * MagicValue3 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, DragonOracle6370_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, DragonOracle6370_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, DragonOracle6370_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, DragonOracle6370_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, DragonOracle6370_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, DragonOracle6370_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, DragonOracle6370_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, DragonOracle6370_Act08) + actFuncArr[9] = REGIST_FUNC(ai, goal, DragonOracle6370_Act09) + local atkAfterFunc = REGIST_FUNC(ai, goal, DragonOracle6370_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function DragonOracle6370_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 100 + CommonNPC_ChangeWepR1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Magic_max +NormalR_min = Magic_min +function DragonOracle6370_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic1Limit = ai:GetNumber(0) + CommonNPC_ChangeWepR2(ai, goal) + ai:ChangeEquipMagic(0) + if Magic_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 7, TARGET_ENE_0, Magic_min, TARGET_ENE_0, false, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 0, -1) + end + ai:SetNumber(0, Magic1Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function DragonOracle6370_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + CommonNPC_ChangeWepR1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + end + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function DragonOracle6370_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = NormalR_max +function DragonOracle6370_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 100 + CommonNPC_ChangeWepR1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Rolling_Atk_max +function DragonOracle6370_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Rolling_Atk_max + local DashDist = Rolling_Atk_max + 5 + local Odds_Guard = 100 + CommonNPC_ChangeWepR1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function DragonOracle6370_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(2, 2.5), TARGET_SELF, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, 4) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR_min = Magic2_max +NormalR_min = Magic2_min +function DragonOracle6370_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic2Limit = ai:GetNumber(0) + CommonNPC_ChangeWepR2(ai, goal) + ai:ChangeEquipMagic(1) + if Magic2_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2.5, TARGET_ENE_0, Magic2_max, TARGET_SELF, false, 4) + elseif targetDist <= Magic2_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, Magic2_min, TARGET_ENE_0, false, 4) + end + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 0, -1) + ai:SetNumber(0, Magic2Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR_min = Magic3_max +NormalR_min = Magic3_min +function DragonOracle6370_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic3Limit = ai:GetNumber(2) + CommonNPC_ChangeWepR2(ai, goal) + ai:ChangeEquipMagic(2) + if Magic3_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2.5, TARGET_ENE_0, Magic3_max, TARGET_SELF, false, 4) + elseif targetDist <= Magic3_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, Magic3_min, TARGET_ENE_0, false, 4) + end + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 0, -1) + ai:SetNumber(2, Magic3Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function DragonOracle6370_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 5 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate2 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepL, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 2) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepR, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 2) + end + elseif fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate <= 60 then + if fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 6, TARGET_ENE_0, ai:GetRandam_Float(1.5, 3), TARGET_ENE_0, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + end + return +end + +function DragonOracle6370Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function DragonOracle6370Battle_Terminate(ai, goal) + return +end + +function DragonOracle6370Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local ParryDist = 3 + local ParryAng = 60 + local ParryThrowDist = 4 + local ParryThrowAng = 60 + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 80 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 40 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 10 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_ParryTiming) then + if targetDist <= ParryDist and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, ParryAng) and ai:IsTargetGuard(TARGET_SELF) == true then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_Parry, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + elseif ai:IsInterupt(INTERUPT_SuccessParry) and targetDist <= ParryThrowDist and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, ParryThrowAng) then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, TARGET_ENE_0, 1, TARGET_SELF, false, -1) + local life = ai:GetRandam_Float(0.3, 0.6) + goal:AddSubGoal(GOAL_COMMON_Wait, life, TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + return false +end + +return diff --git a/scripts_decompiled/006390_battle.lua b/scripts_decompiled/006390_battle.lua new file mode 100644 index 0000000..75ee0da --- /dev/null +++ b/scripts_decompiled/006390_battle.lua @@ -0,0 +1,126 @@ +REGISTER_GOAL(GOAL_Laughtrec_Helper6390_Battle, "Laughtrec_Helper6390Battle") +REGISTER_GOAL_NO_UPDATE(GOAL_Laughtrec_Helper6390_Battle, 1) +function Laughtrec_Helper6390Battle_Activate(ai, goal) + Laughtrec_Helper6390_Battle_Approach(ai, goal) + Laughtrec_Helper6390_Battle_Normal(ai, goal) + Laughtrec_Helper6390_Battle_Attack_After(ai, goal) + return +end + +function Laughtrec_Helper6390_Battle_Approach(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local NormalR_Dist = 2 + if NormalR_Dist <= targetDist then + if fate <= 50 then + CommonNPC_ChangeWepR1(ai, goal) + else + CommonNPC_ChangeWepR2(ai, goal) + end + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, NormalR_Dist, TARGET_SELF, false, 4) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, NormalR_Dist, TARGET_SELF, false, -1) + end + end + return +end + +function Laughtrec_Helper6390_Battle_Normal(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + if fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + if fate2 <= 10 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + return +end + +function Laughtrec_Helper6390_Battle_Attack_After(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 50 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + elseif fate2 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepL, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepR, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + end + elseif fate <= 50 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 6), TARGET_ENE_0, MoveDist, TARGET_ENE_0, false, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 6), TARGET_ENE_0, MoveDist, TARGET_ENE_0, false, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Int(4, 6), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(25, 50), false, true, -1) + end + end + return +end + +function Laughtrec_Helper6390Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Laughtrec_Helper6390Battle_Terminate(ai, goal) + return +end + +function Laughtrec_Helper6390Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 50 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, MoveDist, TARGET_ENE_0, true, 4) + return true + end + end + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 100 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 50 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, combRunDist, TARGET_ENE_0, false, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + end + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/006420_battle.lua b/scripts_decompiled/006420_battle.lua new file mode 100644 index 0000000..ffe6472 --- /dev/null +++ b/scripts_decompiled/006420_battle.lua @@ -0,0 +1,371 @@ +REGISTER_GOAL(GOAL_Ninja6420_Battle, "Ninja6420Battle") +local NormalR_min = 0 +local NormalR_max = 2 +local Guard_NormalR_min = 0 +local Guard_NormalR_max = 1.5 +local LargeR_min = 0 +local LargeR_max = 3.8 +local Whand_jyaku_min = 0 +local Whand_jyaku_max = 2.1 +local Whand_kyou_min = 0 +local Whand_kyou_max = 3.3 +local PushR_min = 0 +local PushR_max = 1.1 +local Magic_min = 0 +local Magic_max = 3.4 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 0.5 +local Rolling_Atk_min = 4.1 +local Rolling_Atk_max = 5.1 +REGISTER_GOAL_NO_UPDATE(GOAL_Ninja6420_Battle, 1) +function Ninja6420Battle_Activate(ai, goal) + ai:StartDash() + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local BothHandOff = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + ai:AddObserveArea(0, TARGET_ENE_0, TARGET_SELF, AI_DIR_TYPE_B, 40, 4) + if 8 <= targetDist then + actPerArr[1] = 11 + actPerArr[3] = 12 + actPerArr[5] = 5 + actPerArr[7] = 22 + actPerArr[11] = 50 + elseif 5.1 <= targetDist then + actPerArr[1] = 10 + actPerArr[3] = 15 + actPerArr[5] = 10 + actPerArr[7] = 15 + actPerArr[11] = 50 + elseif 2 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 2 + actPerArr[3] = 3 + actPerArr[5] = 35 + actPerArr[9] = 10 + actPerArr[11] = 50 + else + actPerArr[1] = 20 + actPerArr[3] = 20 + actPerArr[5] = 10 + actPerArr[9] = 10 + actPerArr[11] = 40 + end + elseif 1 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 2 + actPerArr[3] = 3 + actPerArr[5] = 35 + actPerArr[8] = 40 + actPerArr[9] = 10 + else + actPerArr[1] = 10 + actPerArr[3] = 15 + actPerArr[5] = 15 + actPerArr[8] = 50 + actPerArr[9] = 10 + end + elseif ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 2 + actPerArr[3] = 2 + actPerArr[5] = 34 + actPerArr[6] = 2 + actPerArr[8] = 50 + actPerArr[9] = 10 + else + actPerArr[1] = 15 + actPerArr[3] = 20 + actPerArr[5] = 10 + actPerArr[6] = 10 + actPerArr[8] = 40 + actPerArr[9] = 5 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Ninja6420_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Ninja6420_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, Ninja6420_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, Ninja6420_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, Ninja6420_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, Ninja6420_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, Ninja6420_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, Ninja6420_Act08) + actFuncArr[9] = REGIST_FUNC(ai, goal, Ninja6420_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, Ninja6420_Act10) + actFuncArr[11] = REGIST_FUNC(ai, goal, Ninja6420_Act11) + local atkAfterFunc = REGIST_FUNC(ai, goal, Ninja6420_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function Ninja6420_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, NormalR_max, TARGET_SELF, false, -1) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Guard_NormalR_max +function Ninja6420_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, Guard_NormalR_max, TARGET_SELF, false, 4) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function Ninja6420_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, LargeR_max, TARGET_SELF, false, 4) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + end + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function Ninja6420_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, PushR_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Magic_max +NormalR_min = Magic_min +function Ninja6420_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + CommonNPC_ChangeWepR2(ai, goal) + if Magic_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2.5, TARGET_ENE_0, Magic_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_Middle, 1.5, 10) + elseif targetDist <= Magic_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, Magic_min, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_Middle, 1.5, 10) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_Middle, 1.5, 10) + end + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Ninja6420_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Rolling_Atk_max +function Ninja6420_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, Rolling_Atk_max, TARGET_SELF, false, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Ninja6420_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + goal:AddSubGoal(GOAL_COMMON_TurnAround, 3, TARGET_ENE_0, AI_DIR_TYPE_B, 10, false, true, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Ninja6420_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Ninja6420_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Ninja6420_Act11(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2.5, TARGET_ENE_0, 2, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_TurnAround, 3, TARGET_ENE_0, AI_DIR_TYPE_B, 10, false, true, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Ninja6420_Battle_Attack_After(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + CommonNPC_ChangeWepL1(ai, goal) + if fate <= 25 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + elseif fate2 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepL, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepR, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + end + elseif fate2 <= 10 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 6), TARGET_ENE_0, MoveDist, TARGET_ENE_0, false, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 2, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(90, 120), false, true, 4) + end + return +end + +function Ninja6420Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Ninja6420Battle_Terminate(ai, goal) + return +end + +function Ninja6420Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 50 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + return true + end + end + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 100 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 50 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, combRunDist, TARGET_ENE_0, false, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + end + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 30 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Inside_ObserveArea) and ai:IsFinishTimer(0) == true then + ai:SetTimer(0, 4) + goal:ClearSubGoal() + CommonNPC_ChangeWepR1(ai, goal) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, 0.6, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 10) + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/006490_battle.lua b/scripts_decompiled/006490_battle.lua new file mode 100644 index 0000000..ae660fb --- /dev/null +++ b/scripts_decompiled/006490_battle.lua @@ -0,0 +1,290 @@ +REGISTER_GOAL(GOAL_Attendant_of_laughtrecA6490_Battle, "Attendant_of_laughtrecA6490Battle") +local NormalR_min = 0 +local NormalR_max = 2.8 +local LargeR_min = 0 +local LargeR_max = 2.2 +local Backstep_Atk_min = 3 +local Backstep_Atk_max = 6 +local Rolling_Atk_min = 4.5 +local Rolling_Atk_max = 5.5 +local PushR_min = 0 +local PushR_max = 1 +local Guard_NormalR_min = 0 +local Guard_NormalR_max = 2.3 +REGISTER_GOAL_NO_UPDATE(GOAL_Attendant_of_laughtrecA6490_Battle, 1) +function Attendant_of_laughtrecA6490Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local BothHandOff = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local RYOUTE_odds = 1 + local KATATE_odds = 1 + local GuardTaiou = 0 + if ai:IsTargetGuard(TARGET_ENE_0) == true then + GuardTaiou = 1 + end + if 4.5 <= targetDist then + actPerArr[1] = 5 + actPerArr[2] = 5 + actPerArr[5] = 40 + actPerArr[7] = 40 + actPerArr[19] = 10 * GuardTaiou + actPerArr[20] = 10 + elseif 3 <= targetDist then + actPerArr[1] = 15 + actPerArr[2] = 15 + actPerArr[5] = 40 + actPerArr[19] = 50 * GuardTaiou + actPerArr[20] = 30 + elseif 1 <= targetDist then + actPerArr[1] = 25 + actPerArr[2] = 30 + actPerArr[17] = 15 * GuardTaiou + actPerArr[19] = 100 * GuardTaiou + actPerArr[20] = 30 + else + actPerArr[1] = 20 + actPerArr[2] = 20 + actPerArr[17] = 30 * GuardTaiou + actPerArr[19] = 100 * GuardTaiou + actPerArr[20] = 30 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Attendant_of_laughtrecA6490_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Attendant_of_laughtrecA6490_Act02) + actFuncArr[5] = REGIST_FUNC(ai, goal, Attendant_of_laughtrecA6490_Act05) + actFuncArr[7] = REGIST_FUNC(ai, goal, Attendant_of_laughtrecA6490_Act07) + actFuncArr[17] = REGIST_FUNC(ai, goal, Attendant_of_laughtrecA6490_Act17) + actFuncArr[19] = REGIST_FUNC(ai, goal, Attendant_of_laughtrecA6490_Act19) + actFuncArr[20] = REGIST_FUNC(ai, goal, Attendant_of_laughtrecA6490_Act20) + local atkAfterFunc = REGIST_FUNC(ai, goal, Attendant_of_laughtrecA6490_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = Guard_NormalR_max +function Attendant_of_laughtrecA6490_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = Guard_NormalR_max + local DashDist = Guard_NormalR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function Attendant_of_laughtrecA6490_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_Atk_max +function Attendant_of_laughtrecA6490_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = Backstep_Atk_max + local DashDist = Backstep_Atk_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 20, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_None, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Rolling_Atk_max +function Attendant_of_laughtrecA6490_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = Rolling_Atk_max + local DashDist = Rolling_Atk_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_None, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function Attendant_of_laughtrecA6490_Act17(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Guard_NormalR_max +function Attendant_of_laughtrecA6490_Act19(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = Guard_NormalR_max + local DashDist = Guard_NormalR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_TurnAround, 3, TARGET_ENE_0, AI_DIR_TYPE_B, 10, false, true, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Attendant_of_laughtrecA6490_Act20(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(2, 2.5), TARGET_SELF, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, 4) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Attendant_of_laughtrecA6490_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate <= 80 then + if fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 6, TARGET_ENE_0, ai:GetRandam_Float(1.5, 3), TARGET_ENE_0, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + end + return +end + +function Attendant_of_laughtrecA6490Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Attendant_of_laughtrecA6490Battle_Terminate(ai, goal) + return +end + +NormalR_min = LargeR_max +function Attendant_of_laughtrecA6490Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 40 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, combRunDist, TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 80 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 50 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, combRunDist, TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_GuardBreak) then + local distGuardBreak_Act = 2 + local oddsGuardBreak_Act = 60 + if targetDist <= distGuardBreak_Act and fate <= oddsGuardBreak_Act then + goal:ClearSubGoal() + CommonNPC_ChangeWepR1(ai, goal) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + goal:ClearSubGoal() + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + elseif ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 75 + if fate <= shootIntPer then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + else + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + return true + else + return true + end + else + return false + end +end + +return diff --git a/scripts_decompiled/006500_battle.lua b/scripts_decompiled/006500_battle.lua new file mode 100644 index 0000000..be03c7f --- /dev/null +++ b/scripts_decompiled/006500_battle.lua @@ -0,0 +1,305 @@ +REGISTER_GOAL(GOAL_Attendant_of_laughtrecB6500_Battle, "Attendant_of_laughtrecB6500Battle") +local PushR_min = 0 +local PushR_max = 1 +local NormalR2_min = 0 +local NormalR2_max = 1 +local LargeR2_min = 0 +local LargeR2_max = 1.1 +local Backstep_Atk2_min = 0 +local Backstep_Atk2_max = 1 +local Guard_NormalR_min = 0 +local Guard_NormalR_max = 0.9 +local Magic_min = 7 +local Magic_max = 7 +local Magic2_min = 7 +local Magic2_max = 7 +local Magic3_min = 8 +local Magic3_max = 8 +REGISTER_GOAL_NO_UPDATE(GOAL_Attendant_of_laughtrecB6500_Battle, 1) +function Attendant_of_laughtrecB6500Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local BothHandOff = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local RYOUTE_odds = 1 + local KATATE_odds = 1 + local MagicValue1 = 1 + local Magic1Limit = ai:GetNumber(0) + if 20 <= Magic1Limit then + MagicValue1 = 0 + end + local MagicValue2 = 1 + local Magic2Limit = ai:GetNumber(1) + if 20 <= Magic2Limit then + MagicValue2 = 0 + end + local MagicValue3 = 1 + local Magic3Limit = ai:GetNumber(2) + if 5 <= Magic3Limit then + MagicValue3 = 0 + end + local GuardTaiou = 0 + if ai:IsTargetGuard(TARGET_ENE_0) == true then + GuardTaiou = 1 + end + local hprate = ai:GetHpRate(TARGET_SELF) + local Kaifuku = 0 + if (not not ai:HasSpecialEffectAttribute(TARGET_SELF, SP_EFFECT_TYPE_POIZON) or not not ai:HasSpecialEffectAttribute(TARGET_SELF, SP_EFFECT_TYPE_ILLNESS) or ai:HasSpecialEffectAttribute(TARGET_SELF, SP_EFFECT_TYPE_BLOOD)) and ai:IsFinishTimer(3) == true then + Kaifuku = 1 + end + if 7 <= targetDist then + actPerArr[3] = 3 + actPerArr[4] = 4 + actPerArr[17] = 3 * GuardTaiou + actPerArr[18] = 45 * MagicValue1 + actPerArr[19] = 45 * MagicValue2 + actPerArr[20] = 10000 * MagicValue3 * Kaifuku + elseif 3.5 <= targetDist then + actPerArr[3] = 5 + actPerArr[4] = 5 + actPerArr[17] = 5 * GuardTaiou + actPerArr[18] = 40 * MagicValue1 + actPerArr[19] = 45 * MagicValue2 + actPerArr[20] = 10000 * MagicValue3 * Kaifuku + else + actPerArr[3] = 10 + actPerArr[4] = 10 + actPerArr[17] = 10 * GuardTaiou + actPerArr[18] = 35 * MagicValue1 + actPerArr[19] = 35 * MagicValue2 + actPerArr[20] = 10000 * MagicValue3 * Kaifuku + end + actFuncArr[3] = REGIST_FUNC(ai, goal, Attendant_of_laughtrecB6500_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, Attendant_of_laughtrecB6500_Act04) + actFuncArr[17] = REGIST_FUNC(ai, goal, Attendant_of_laughtrecB6500_Act17) + actFuncArr[18] = REGIST_FUNC(ai, goal, Attendant_of_laughtrecB6500_Act18) + actFuncArr[19] = REGIST_FUNC(ai, goal, Attendant_of_laughtrecB6500_Act19) + actFuncArr[20] = REGIST_FUNC(ai, goal, Attendant_of_laughtrecB6500_Act20) + local atkAfterFunc = REGIST_FUNC(ai, goal, Attendant_of_laughtrecB6500_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +PushR_min = NormalR2_max +function Attendant_of_laughtrecB6500_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR2(ai, goal) + local AppDist = NormalR2_max + local DashDist = NormalR2_max + 5 + local Odds_Guard = 0 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +PushR_min = LargeR2_max +function Attendant_of_laughtrecB6500_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR2(ai, goal) + local AppDist = LargeR2_max + local DashDist = LargeR2_max + 5 + local Odds_Guard = 0 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +PushR_min = PushR_max +function Attendant_of_laughtrecB6500_Act17(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +PushR_min = Magic_max +PushR_min = Magic_min +function Attendant_of_laughtrecB6500_Act18(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic1Limit = ai:GetNumber(0) + CommonNPC_ChangeWepR1(ai, goal) + ai:ChangeEquipMagic(0) + if Magic_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2.5, TARGET_ENE_0, Magic_max, TARGET_SELF, false, -1) + elseif targetDist <= Magic_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, Magic_min, TARGET_ENE_0, false, -1) + end + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 1.5, 90) + ai:SetNumber(0, Magic1Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +PushR_min = Magic_max +PushR_min = Magic2_max +PushR_min = Magic_min +PushR_min = Magic2_min +function Attendant_of_laughtrecB6500_Act19(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic2Limit = ai:GetNumber(1) + CommonNPC_ChangeWepR1(ai, goal) + ai:ChangeEquipMagic(1) + if Magic_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2.5, TARGET_ENE_0, Magic2_max, TARGET_SELF, false, -1) + elseif targetDist <= Magic_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, Magic2_min, TARGET_ENE_0, false, -1) + end + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 1.5, 90) + ai:SetNumber(1, Magic2Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +PushR_min = Magic3_max +PushR_min = Magic3_min +function Attendant_of_laughtrecB6500_Act20(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic3Limit = ai:GetNumber(2) + CommonNPC_ChangeWepR1(ai, goal) + ai:ChangeEquipMagic(2) + if Magic3_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2.5, TARGET_ENE_0, Magic3_max, TARGET_SELF, false, -1) + elseif targetDist <= Magic3_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, Magic3_min, TARGET_ENE_0, false, -1) + end + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 1.5, 90) + ai:SetNumber(2, Magic3Limit + 1) + ai:SetTimer(3, 5) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Attendant_of_laughtrecB6500_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 30 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + end + return +end + +function Attendant_of_laughtrecB6500Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Attendant_of_laughtrecB6500Battle_Terminate(ai, goal) + return +end + +function Attendant_of_laughtrecB6500Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 10 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 10 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 10 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/006510_battle.lua b/scripts_decompiled/006510_battle.lua new file mode 100644 index 0000000..dd18853 --- /dev/null +++ b/scripts_decompiled/006510_battle.lua @@ -0,0 +1,416 @@ +REGISTER_GOAL(GOAL_BlackIron_Knight6510_Battle, "BlackIron_Knight6510Battle") +local NormalR_min = 0 +local NormalR_max = 2.3 +local LargeR_min = 0 +local LargeR_max = 2.6 +local Whand_jyaku_min = 0 +local Whand_jyaku_max = 2 +local Whand_kyou_min = 0 +local Whand_kyou_max = 2.5 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 1.5 +local Backstep_AtkW_min = 0 +local Backstep_AtkW_max = 1.5 +local Rolling_Atk_min = 3.5 +local Rolling_Atk_max = 4.5 +local Rolling_AtkW_min = 4 +local Rolling_AtkW_max = 5 +local PushR_min = 0 +local PushR_max = 1 +REGISTER_GOAL_NO_UPDATE(GOAL_BlackIron_Knight6510_Battle, 1) +function BlackIron_Knight6510Battle_Activate(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local playerDist = ai:GetDist(TARGET_LOCALPLAYER) + local isFindTarget = ai:IsSearchTarget(TARGET_ENE_0) + local eventNo = ai:GetEventRequest(0) + local myThinkId = ai:GetNpcThinkParamID() + local PointFrontWall = 0 + if myThinkId == 6510 then + PointFrontOfWall = 1502997 + elseif myThinkId == 6511 then + PointFrontOfWall = 1412997 + end + if eventNo == 10 then + ai:SetEventMoveTarget(PointFrontOfWall) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 1, POINT_EVENT, 3, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 1, POINT_EVENT, 0.1, TARGET_SELF, true, -1) + elseif playerDist <= 0.1 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_LOCALPLAYER, 1, TARGET_LOCALPLAYER, true, -1) + elseif fate <= 85 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 1.5, TARGET_LOCALPLAYER, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(20, 25), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_Wait, 2, TARGET_LOCALPLAYER, 0, 0, 0) + end + elseif playerDist <= 0.4 then + if fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_LOCALPLAYER, 1, TARGET_LOCALPLAYER, true, -1) + elseif fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 1.5, TARGET_LOCALPLAYER, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(20, 25), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_Wait, 2, TARGET_LOCALPLAYER, 0, 0, 0) + end + elseif 20 <= playerDist or 10 <= targetDist or isFindTarget == false then + local walk = true + if 2.2 <= playerDist then + walk = false + end + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, TARGET_LOCALPLAYER, 1.2, TARGET_SELF, walk, -1) + else + BlackIron_Knight6510_Battle(ai, goal) + end + return +end + +function BlackIron_Knight6510_Battle(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local BothHandOff = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local RYOUTE_odds = 1 + local KATATE_odds = 1 + if ai:IsTargetGuard(TARGET_ENE_0) == true then + RYOUTE_odds = 10 + end + if 8 <= targetDist then + actPerArr[1] = 35 * KATATE_odds + actPerArr[2] = 35 * KATATE_odds + actPerArr[7] = 5 * KATATE_odds + actPerArr[9] = 35 * RYOUTE_odds + actPerArr[10] = 35 * RYOUTE_odds + actPerArr[15] = 5 * RYOUTE_odds + actPerArr[20] = 25 * RYOUTE_odds + elseif 3.5 <= targetDist then + actPerArr[1] = 30 * KATATE_odds + actPerArr[2] = 30 * KATATE_odds + actPerArr[7] = 5 * KATATE_odds + actPerArr[9] = 30 * RYOUTE_odds + actPerArr[10] = 30 * RYOUTE_odds + actPerArr[15] = 5 * RYOUTE_odds + actPerArr[20] = 35 * RYOUTE_odds + elseif 1.5 <= targetDist then + actPerArr[1] = 32 * KATATE_odds + actPerArr[2] = 33 * KATATE_odds + actPerArr[9] = 32 * RYOUTE_odds + actPerArr[10] = 33 * RYOUTE_odds + actPerArr[17] = 30 * RYOUTE_odds + actPerArr[20] = 35 * RYOUTE_odds + elseif 1 <= targetDist then + actPerArr[1] = 18 * KATATE_odds + actPerArr[2] = 17 * KATATE_odds + actPerArr[5] = 15 * KATATE_odds + actPerArr[9] = 10 * RYOUTE_odds + actPerArr[10] = 10 * RYOUTE_odds + actPerArr[13] = 13 * KATATE_odds + actPerArr[17] = 30 * RYOUTE_odds + else + actPerArr[1] = 17 * KATATE_odds + actPerArr[2] = 18 * KATATE_odds + actPerArr[5] = 15 * KATATE_odds + actPerArr[9] = 17 * RYOUTE_odds + actPerArr[10] = 18 * RYOUTE_odds + actPerArr[13] = 15 * KATATE_odds + actPerArr[17] = 20 * RYOUTE_odds + actPerArr[20] = 30 * RYOUTE_odds + end + actFuncArr[1] = REGIST_FUNC(ai, goal, BlackIron_Knight6510_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, BlackIron_Knight6510_Act02) + actFuncArr[5] = REGIST_FUNC(ai, goal, BlackIron_Knight6510_Act05) + actFuncArr[7] = REGIST_FUNC(ai, goal, BlackIron_Knight6510_Act07) + actFuncArr[9] = REGIST_FUNC(ai, goal, BlackIron_Knight6510_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, BlackIron_Knight6510_Act10) + actFuncArr[13] = REGIST_FUNC(ai, goal, BlackIron_Knight6510_Act13) + actFuncArr[15] = REGIST_FUNC(ai, goal, BlackIron_Knight6510_Act15) + actFuncArr[17] = REGIST_FUNC(ai, goal, BlackIron_Knight6510_Act17) + actFuncArr[20] = REGIST_FUNC(ai, goal, BlackIron_Knight6510_Act20) + local atkAfterFunc = REGIST_FUNC(ai, goal, BlackIron_Knight6510_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function BlackIron_Knight6510_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function BlackIron_Knight6510_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_Atk_max +function BlackIron_Knight6510_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = Backstep_Atk_max + local DashDist = Backstep_Atk_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Rolling_Atk_max +function BlackIron_Knight6510_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = Rolling_Atk_max + local DashDist = Rolling_Atk_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Whand_jyaku_max +function BlackIron_Knight6510_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Whand_jyaku_max + local DashDist = Whand_jyaku_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Whand_kyou_max +function BlackIron_Knight6510_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Whand_kyou_max + local DashDist = Whand_kyou_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_AtkW_max +function BlackIron_Knight6510_Act13(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Backstep_AtkW_max + local DashDist = Backstep_AtkW_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Rolling_AtkW_max +function BlackIron_Knight6510_Act15(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Rolling_AtkW_max + local DashDist = Rolling_AtkW_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function BlackIron_Knight6510_Act17(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalL, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function BlackIron_Knight6510_Act20(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(2, 2.5), TARGET_SELF, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, 4) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function BlackIron_Knight6510_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 100 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + end + return +end + +function BlackIron_Knight6510Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function BlackIron_Knight6510Battle_Terminate(ai, goal) + return +end + +NormalR_min = LargeR_max +function BlackIron_Knight6510Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 10 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, combRunDist, TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 80 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 10 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, combRunDist, TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_GuardBreak) then + local distGuardBreak_Act = 2 + local oddsGuardBreak_Act = 100 + if targetDist <= distGuardBreak_Act and fate <= oddsGuardBreak_Act then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 10 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, combRunDist, TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + end + return true + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + elseif ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/006510_logic.lua b/scripts_decompiled/006510_logic.lua new file mode 100644 index 0000000..318bef9 --- /dev/null +++ b/scripts_decompiled/006510_logic.lua @@ -0,0 +1,11 @@ +REGISTER_LOGIC_FUNC(LOGIC_ID_BlackIron_Knight6510, "BlackIron_Knight6510_Logic", "BlackIron_Knight6510_Interupt") +function BlackIron_Knight6510_Logic(ai) + ai:AddTopGoal(GOAL_BlackIron_Knight6510_Battle, -1, 0, 0, 0, 0) + return +end + +function BlackIron_Knight6510_Interupt(ai, goal) + return +end + +return diff --git a/scripts_decompiled/006511_battle.lua b/scripts_decompiled/006511_battle.lua new file mode 100644 index 0000000..1d14784 --- /dev/null +++ b/scripts_decompiled/006511_battle.lua @@ -0,0 +1,370 @@ +REGISTER_GOAL(GOAL_BlackIron_Knight_Enemy6511_Battle, "BlackIron_Knight_Enemy6511Battle") +local NormalR_min = 0 +local NormalR_max = 2.3 +local LargeR_min = 0 +local LargeR_max = 2.6 +local Whand_jyaku_min = 0 +local Whand_jyaku_max = 2 +local Whand_kyou_min = 0 +local Whand_kyou_max = 2.5 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 1.5 +local Backstep_AtkW_min = 0 +local Backstep_AtkW_max = 1.5 +local Rolling_Atk_min = 3.5 +local Rolling_Atk_max = 4.5 +local Rolling_AtkW_min = 4 +local Rolling_AtkW_max = 5 +local PushR_min = 0 +local PushR_max = 1 +REGISTER_GOAL_NO_UPDATE(GOAL_BlackIron_Knight_Enemy6511_Battle, 1) +function BlackIron_Knight_Enemy6511Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local BothHandOff = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local RYOUTE_odds = 1 + local KATATE_odds = 1 + if ai:IsTargetGuard(TARGET_ENE_0) == true then + RYOUTE_odds = 10 + end + if 8 <= targetDist then + actPerArr[1] = 35 * KATATE_odds + actPerArr[2] = 35 * KATATE_odds + actPerArr[7] = 5 * KATATE_odds + actPerArr[9] = 35 * RYOUTE_odds + actPerArr[10] = 35 * RYOUTE_odds + actPerArr[15] = 5 * RYOUTE_odds + actPerArr[20] = 25 * RYOUTE_odds + elseif 3.5 <= targetDist then + actPerArr[1] = 30 * KATATE_odds + actPerArr[2] = 30 * KATATE_odds + actPerArr[7] = 5 * KATATE_odds + actPerArr[9] = 30 * RYOUTE_odds + actPerArr[10] = 30 * RYOUTE_odds + actPerArr[15] = 5 * RYOUTE_odds + actPerArr[20] = 35 * RYOUTE_odds + elseif 1.5 <= targetDist then + actPerArr[1] = 32 * KATATE_odds + actPerArr[2] = 33 * KATATE_odds + actPerArr[9] = 32 * RYOUTE_odds + actPerArr[10] = 33 * RYOUTE_odds + actPerArr[17] = 30 * RYOUTE_odds + actPerArr[20] = 35 * RYOUTE_odds + elseif 1 <= targetDist then + actPerArr[1] = 18 * KATATE_odds + actPerArr[2] = 17 * KATATE_odds + actPerArr[5] = 15 * KATATE_odds + actPerArr[9] = 10 * RYOUTE_odds + actPerArr[10] = 10 * RYOUTE_odds + actPerArr[13] = 13 * KATATE_odds + actPerArr[17] = 30 * RYOUTE_odds + else + actPerArr[1] = 17 * KATATE_odds + actPerArr[2] = 18 * KATATE_odds + actPerArr[5] = 15 * KATATE_odds + actPerArr[9] = 17 * RYOUTE_odds + actPerArr[10] = 18 * RYOUTE_odds + actPerArr[13] = 15 * KATATE_odds + actPerArr[17] = 20 * RYOUTE_odds + actPerArr[20] = 30 * RYOUTE_odds + end + actFuncArr[1] = REGIST_FUNC(ai, goal, BlackIron_Knight_Enemy6511_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, BlackIron_Knight_Enemy6511_Act02) + actFuncArr[5] = REGIST_FUNC(ai, goal, BlackIron_Knight_Enemy6511_Act05) + actFuncArr[7] = REGIST_FUNC(ai, goal, BlackIron_Knight_Enemy6511_Act07) + actFuncArr[9] = REGIST_FUNC(ai, goal, BlackIron_Knight_Enemy6511_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, BlackIron_Knight_Enemy6511_Act10) + actFuncArr[13] = REGIST_FUNC(ai, goal, BlackIron_Knight_Enemy6511_Act13) + actFuncArr[15] = REGIST_FUNC(ai, goal, BlackIron_Knight_Enemy6511_Act15) + actFuncArr[17] = REGIST_FUNC(ai, goal, BlackIron_Knight_Enemy6511_Act17) + actFuncArr[20] = REGIST_FUNC(ai, goal, BlackIron_Knight_Enemy6511_Act20) + local atkAfterFunc = REGIST_FUNC(ai, goal, BlackIron_Knight_Enemy6511_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function BlackIron_Knight_Enemy6511_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function BlackIron_Knight_Enemy6511_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_Atk_max +function BlackIron_Knight_Enemy6511_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = Backstep_Atk_max + local DashDist = Backstep_Atk_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Rolling_Atk_max +function BlackIron_Knight_Enemy6511_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = Rolling_Atk_max + local DashDist = Rolling_Atk_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Whand_jyaku_max +function BlackIron_Knight_Enemy6511_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Whand_jyaku_max + local DashDist = Whand_jyaku_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Whand_kyou_max +function BlackIron_Knight_Enemy6511_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Whand_kyou_max + local DashDist = Whand_kyou_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_AtkW_max +function BlackIron_Knight_Enemy6511_Act13(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Backstep_AtkW_max + local DashDist = Backstep_AtkW_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Rolling_AtkW_max +function BlackIron_Knight_Enemy6511_Act15(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Rolling_AtkW_max + local DashDist = Rolling_AtkW_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function BlackIron_Knight_Enemy6511_Act17(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalL, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function BlackIron_Knight_Enemy6511_Act20(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(2, 2.5), TARGET_SELF, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, 4) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function BlackIron_Knight_Enemy6511_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 100 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + end + return +end + +function BlackIron_Knight_Enemy6511Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function BlackIron_Knight_Enemy6511Battle_Terminate(ai, goal) + return +end + +NormalR_min = LargeR_max +function BlackIron_Knight_Enemy6511Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 10 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, combRunDist, TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 80 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 10 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, combRunDist, TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_GuardBreak) then + local distGuardBreak_Act = 2 + local oddsGuardBreak_Act = 100 + if targetDist <= distGuardBreak_Act and fate <= oddsGuardBreak_Act then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 10 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, combRunDist, TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + end + return true + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + elseif ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/006520_battle.lua b/scripts_decompiled/006520_battle.lua new file mode 100644 index 0000000..d6fd7ef --- /dev/null +++ b/scripts_decompiled/006520_battle.lua @@ -0,0 +1,394 @@ +REGISTER_GOAL(GOAL_Witch6520_Battle, "Witch6520Battle") +local LargeR_min = 0 +local LargeR_max = 1.5 +local PushR_min = 0 +local PushR_max = 1 +local Magic_min = 7 +local Magic_max = 15 +local Magic2_min = 7 +local Magic2_max = 15 +local Magic3_min = 8 +local Magic3_max = 16 +local Magic4_min = 10 +local Magic4_max = 18 +REGISTER_GOAL_NO_UPDATE(GOAL_Witch6520_Battle, 1) +function Witch6520Battle_Activate(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local playerDist = ai:GetDist(TARGET_LOCALPLAYER) + local isFindTarget = ai:IsSearchTarget(TARGET_ENE_0) + local eventNo = ai:GetEventRequest(0) + local myThinkId = ai:GetNpcThinkParamID() + local selfmp = ai:GetMp(TARGET_SELF) + local PointFrontWall = 0 + local MoveArea1 = 0 + local MoveArea2 = 0 + if myThinkId == 6520 then + PointFrontOfWall = 1602010 + elseif myThinkId == 6521 then + PointFrontOfWall = 1202894 + MoveArea1 = 1202891 + MoveArea2 = 1202892 + end + if eventNo == 10 then + ai:SetEventMoveTarget(PointFrontOfWall) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 1, POINT_EVENT, 3, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 1, POINT_EVENT, 0.1, TARGET_SELF, true, -1) + elseif playerDist <= 0.1 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_LOCALPLAYER, 1, TARGET_LOCALPLAYER, true, -1) + elseif fate <= 85 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 1.5, TARGET_LOCALPLAYER, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(20, 25), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_Wait, 2, TARGET_LOCALPLAYER, 0, 0, 0) + end + elseif playerDist <= 0.4 then + if fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_LOCALPLAYER, 1, TARGET_LOCALPLAYER, true, -1) + elseif fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 1.5, TARGET_LOCALPLAYER, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(20, 25), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_Wait, 2, TARGET_LOCALPLAYER, 0, 0, 0) + end + elseif MoveArea1 ~= 0 and not ai:IsInsideTargetRegion(TARGET_LOCALPLAYER, MoveArea1) and not ai:IsInsideTargetRegion(TARGET_LOCALPLAYER, MoveArea2) then + if 10 <= targetDist or isFindTarget == false then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, POINT_INITIAL, 1, TARGET_SELF, true, 4) + goal:AddSubGoal(GOAL_COMMON_Wait, 2, TARGET_SELF, 0, 0, 0) + else + Witch6520_Battle(ai, goal) + end + elseif 20 <= playerDist or 10 <= targetDist or isFindTarget == false then + local walk = true + if 2.2 <= playerDist then + walk = false + end + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, TARGET_LOCALPLAYER, 1.2, TARGET_SELF, walk, -1) + else + Witch6520_Battle(ai, goal) + end + return +end + +function Witch6520_Battle(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local BothHandOff = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local RYOUTE_odds = 1 + local KATATE_odds = 1 + local MagicValue1 = 100 + local Magic1Limit = ai:GetNumber(0) + if 20 <= Magic1Limit then + MagicValue1 = 1 + end + local MagicValue2 = 100 + local Magic2Limit = ai:GetNumber(1) + if 20 <= Magic2Limit then + MagicValue2 = 1 + end + local MagicValue3 = 100 + local Magic3Limit = ai:GetNumber(2) + if 10 <= Magic3Limit then + MagicValue3 = 1 + end + local MagicValue4 = 0 + local Magic4Limit = ai:GetNumber(3) + if MagicValue1 == 1 and MagicValue1 == 2 and MagicValue1 == 3 then + local MagicValue4 = 1 + end + if 5 <= Magic4Limit then + MagicValue4 = 0 + end + local GuardTaiou = 0 + if ai:IsTargetGuard(TARGET_ENE_0) == true then + GuardTaiou = 1 + end + local Buturi = 0 + if ai:HasSpecialEffectId(TARGET_ENE_0, 5444) then + Buturi = 10000 + end + if ai:HasSpecialEffectId(TARGET_SELF, 1500) then + actPerArr[1] = 85 + actPerArr[18] = 5 + actPerArr[19] = 5 + actPerArr[20] = 5 + elseif 1.5 <= targetDist then + actPerArr[2] = 0 + Buturi + actPerArr[15] = 30 + actPerArr[16] = 10 * MagicValue4 + actPerArr[18] = 10 * MagicValue1 + actPerArr[19] = 10 * MagicValue2 + actPerArr[20] = 10 * MagicValue3 + else + actPerArr[2] = 30 + actPerArr[15] = 30 + actPerArr[16] = 10 * MagicValue4 + actPerArr[17] = 5 * GuardTaiou + actPerArr[18] = 10 * MagicValue1 + actPerArr[19] = 10 * MagicValue2 + actPerArr[20] = 10 * MagicValue3 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Witch6520_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Witch6520_Act02) + actFuncArr[15] = REGIST_FUNC(ai, goal, Witch6520_Act15) + actFuncArr[16] = REGIST_FUNC(ai, goal, Witch6520_Act16) + actFuncArr[17] = REGIST_FUNC(ai, goal, Witch6520_Act17) + actFuncArr[18] = REGIST_FUNC(ai, goal, Witch6520_Act18) + actFuncArr[19] = REGIST_FUNC(ai, goal, Witch6520_Act19) + actFuncArr[20] = REGIST_FUNC(ai, goal, Witch6520_Act20) + local atkAfterFunc = REGIST_FUNC(ai, goal, Witch6520_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +function Witch6520_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_Wait, 10, TARGET_ENE_0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +LargeR_min = LargeR_max +function Witch6520_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 1, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Witch6520_Act15(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if 7 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(2, 2.5), TARGET_SELF, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, 4) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +LargeR_min = Magic4_min +function Witch6520_Act16(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic4Limit = ai:GetNumber(3) + CommonNPC_ChangeWepR1(ai, goal) + ai:ChangeEquipMagic(3) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, Magic4_min, TARGET_ENE_0, false, -1) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 30, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_Wait, 10, TARGET_ENE_0) + ai:SetNumber(1, Magic4Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +LargeR_min = PushR_max +function Witch6520_Act17(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +LargeR_min = Magic_max +LargeR_min = Magic_min +function Witch6520_Act18(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic1Limit = ai:GetNumber(0) + CommonNPC_ChangeWepR1(ai, goal) + ai:ChangeEquipMagic(0) + if Magic_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2.5, TARGET_ENE_0, Magic_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 1.5, 90) + elseif targetDist <= Magic_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, Magic_min, TARGET_ENE_0, false, -1) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 1.5, 90) + end + ai:SetNumber(0, Magic1Limit + 1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +LargeR_min = Magic2_max +LargeR_min = Magic2_min +function Witch6520_Act19(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic2Limit = ai:GetNumber(1) + CommonNPC_ChangeWepR1(ai, goal) + ai:ChangeEquipMagic(1) + if Magic2_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2.5, TARGET_ENE_0, Magic2_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 1.5, 90) + elseif targetDist <= Magic2_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, Magic2_min, TARGET_ENE_0, false, -1) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 1.5, 90) + end + ai:SetNumber(1, Magic2Limit + 1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +LargeR_min = Magic3_max +LargeR_min = Magic3_min +function Witch6520_Act20(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic3Limit = ai:GetNumber(2) + CommonNPC_ChangeWepR1(ai, goal) + ai:ChangeEquipMagic(2) + if Magic3_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2.5, TARGET_ENE_0, Magic3_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 1.5, 90) + elseif targetDist <= Magic3_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, Magic3_min, TARGET_ENE_0, false, -1) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 1.5, 90) + end + ai:SetNumber(2, Magic3Limit + 1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Witch6520_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 80 then + if fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + end + return +end + +function Witch6520Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Witch6520Battle_Terminate(ai, goal) + return +end + +function Witch6520Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 10 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 10 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 10 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/006520_logic.lua b/scripts_decompiled/006520_logic.lua new file mode 100644 index 0000000..01488c5 --- /dev/null +++ b/scripts_decompiled/006520_logic.lua @@ -0,0 +1,11 @@ +REGISTER_LOGIC_FUNC(LOGIC_ID_Witch6520, "Witch6520_Logic", "Witch6520_Interupt") +function Witch6520_Logic(ai) + ai:AddTopGoal(GOAL_Witch6520_Battle, -1, 0, 0, 0, 0) + return +end + +function Witch6520_Interupt(ai, goal) + return +end + +return diff --git a/scripts_decompiled/006530_battle.lua b/scripts_decompiled/006530_battle.lua new file mode 100644 index 0000000..be609a5 --- /dev/null +++ b/scripts_decompiled/006530_battle.lua @@ -0,0 +1,430 @@ +REGISTER_GOAL(GOAL_PondAunt6530_Battle, "PondAunt6530Battle") +local NormalR_min = 0 +local NormalR_max = 1.6 +local LargeR_min = 0 +local LargeR_max = 3 +local Whand_jyaku_min = 0 +local Whand_jyaku_max = 1.6 +local Whand_kyou_min = 0 +local Whand_kyou_max = 1 +local PushR_min = 0 +local PushR_max = 1.1 +local Magic_min = 5 +local Magic_max = 10 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 1 +local Rolling_Atk_min = 4 +local Rolling_Atk_max = 5 +REGISTER_GOAL_NO_UPDATE(GOAL_PondAunt6530_Battle, 1) +function PondAunt6530Battle_Activate(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local playerDist = ai:GetDist(TARGET_LOCALPLAYER) + local isFindTarget = ai:IsSearchTarget(TARGET_ENE_0) + local eventNo = ai:GetEventRequest(0) + local myThinkId = ai:GetNpcThinkParamID() + local selfmp = ai:GetMp(TARGET_SELF) + local PointFrontWall = 0 + if myThinkId == 6530 then + PointFrontOfWall = 1402997 + end + if eventNo == 10 then + ai:SetEventMoveTarget(PointFrontOfWall) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 1, POINT_EVENT, 3, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 1, POINT_EVENT, 0.1, TARGET_SELF, true, -1) + elseif playerDist <= 0.1 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_LOCALPLAYER, 1, TARGET_LOCALPLAYER, true, -1) + elseif fate <= 85 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 1.5, TARGET_LOCALPLAYER, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(20, 25), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_Wait, 2, TARGET_LOCALPLAYER, 0, 0, 0) + end + elseif playerDist <= 0.4 then + if fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_LOCALPLAYER, 1, TARGET_LOCALPLAYER, true, -1) + elseif fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 1.5, TARGET_LOCALPLAYER, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(20, 25), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_Wait, 2, TARGET_LOCALPLAYER, 0, 0, 0) + end + elseif 20 <= playerDist or 10 <= targetDist or isFindTarget == false then + local walk = true + if 2.2 <= playerDist then + walk = false + end + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, TARGET_LOCALPLAYER, 1.2, TARGET_SELF, walk, -1) + else + PondAunt6530_Battle(ai, goal) + end + return +end + +function PondAunt6530_Battle(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local BothHandOff = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local MagicValue = 1 + local Magic1Limit = ai:GetNumber(0) + if 5 <= Magic1Limit then + MagicValue = 0 + end + if ai:IsTargetGuard(TARGET_ENE_0) == false and ai:IsBothHandMode(TARGET_SELF) and BothHandOff <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + if 8 <= targetDist then + actPerArr[1] = 10 + actPerArr[3] = 15 + actPerArr[7] = 20 + actPerArr[9] = 50 + actPerArr[10] = 5 + elseif 5 <= targetDist then + actPerArr[1] = 15 + actPerArr[3] = 15 + actPerArr[7] = 15 + actPerArr[9] = 50 + actPerArr[10] = 5 + elseif 2.9 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 10 + actPerArr[3] = 25 + actPerArr[9] = 50 + actPerArr[4] = 15 + else + actPerArr[1] = 10 + actPerArr[3] = 20 + actPerArr[4] = 15 + actPerArr[9] = 50 + actPerArr[10] = 5 + end + elseif 1 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 10 + actPerArr[3] = 20 + actPerArr[4] = 10 + actPerArr[6] = 10 + actPerArr[9] = 50 + else + actPerArr[1] = 15 + actPerArr[3] = 20 + actPerArr[6] = 15 + actPerArr[9] = 50 + actPerArr[10] = 5 + end + elseif ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 10 + actPerArr[3] = 20 + actPerArr[4] = 10 + actPerArr[6] = 10 + actPerArr[9] = 50 + else + actPerArr[1] = 15 + actPerArr[3] = 20 + actPerArr[6] = 10 + actPerArr[9] = 50 + actPerArr[10] = 5 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, PondAunt6530_Act01) + actFuncArr[3] = REGIST_FUNC(ai, goal, PondAunt6530_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, PondAunt6530_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, PondAunt6530_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, PondAunt6530_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, PondAunt6530_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, PondAunt6530_Act08) + actFuncArr[9] = REGIST_FUNC(ai, goal, PondAunt6530_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, PondAunt6530_Act10) + local atkAfterFunc = REGIST_FUNC(ai, goal, PondAunt6530_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function PondAunt6530_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + if ai:IsTargetGuard(TARGET_ENE_0) == true and not ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function PondAunt6530_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + if ai:IsTargetGuard(TARGET_ENE_0) == true and not ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function PondAunt6530_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 50 + return GetWellSpace_Odds +end + +NormalR_min = Magic_max +NormalR_min = Magic_min +function PondAunt6530_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic1Limit = ai:GetNumber(0) + CommonNPC_ChangeWepR2(ai, goal) + if Magic_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2.5, TARGET_ENE_0, Magic_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + elseif targetDist <= Magic_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, Magic_min, TARGET_ENE_0, false, -1) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + ai:SetNumber(0, Magic1Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_Atk_max +function PondAunt6530_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + if ai:IsTargetGuard(TARGET_ENE_0) == true and not ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + local AppDist = Backstep_Atk_max + local DashDist = Backstep_Atk_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Rolling_Atk_max +function PondAunt6530_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + if ai:IsTargetGuard(TARGET_ENE_0) == true and not ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + local AppDist = Rolling_Atk_max + local DashDist = Rolling_Atk_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function PondAunt6530_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(2, 2.5), TARGET_SELF, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, 4) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function PondAunt6530_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + goal:AddSubGoal(GOAL_COMMON_TurnAround, 3, TARGET_ENE_0, AI_DIR_TYPE_B, 10, false, true, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function PondAunt6530_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function PondAunt6530_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 5 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate2 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepL, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 2) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepR, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 2) + end + elseif fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate <= 15 then + if fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 6, TARGET_ENE_0, ai:GetRandam_Float(1.5, 3), TARGET_ENE_0, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + end + return +end + +function PondAunt6530Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function PondAunt6530Battle_Terminate(ai, goal) + return +end + +NormalR_min = LargeR_max +function PondAunt6530Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local myThinkId = ai:GetNpcThinkParamID() + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 10 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 80 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + if myThinkId == 6530 then + local combRunDist = 5 + local combRunPer = 80 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_TurnAround, 3, TARGET_ENE_0, AI_DIR_TYPE_B, 10, false, true, 4) + end + end + else + local combRunDist = 3 + local combRunPer = 10 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, 4) + end + end + end + end + if ai:IsInterupt(INTERUPT_GuardBreak) then + local distGuardBreak_Act = 2 + local oddsGuardBreak_Act = 80 + if targetDist <= distGuardBreak_Act and fate <= oddsGuardBreak_Act then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 10 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + else + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/006530_logic.lua b/scripts_decompiled/006530_logic.lua new file mode 100644 index 0000000..8097a3e --- /dev/null +++ b/scripts_decompiled/006530_logic.lua @@ -0,0 +1,11 @@ +REGISTER_LOGIC_FUNC(LOGIC_ID_PondAunt6530, "PondAunt6530_Logic", "PondAunt6530_Interupt") +function PondAunt6530_Logic(ai) + ai:AddTopGoal(GOAL_PondAunt6530_Battle, -1, 0, 0, 0, 0) + return +end + +function PondAunt6530_Interupt(ai, goal) + return +end + +return diff --git a/scripts_decompiled/006531_battle.lua b/scripts_decompiled/006531_battle.lua new file mode 100644 index 0000000..1949119 --- /dev/null +++ b/scripts_decompiled/006531_battle.lua @@ -0,0 +1,365 @@ +REGISTER_GOAL(GOAL_PondAunt_Enemy6531_Battle, "PondAunt_Enemy6531Battle") +local NormalR_min = 0 +local NormalR_max = 1.6 +local LargeR_min = 0 +local LargeR_max = 3 +local Whand_jyaku_min = 0 +local Whand_jyaku_max = 1.6 +local Whand_kyou_min = 0 +local Whand_kyou_max = 1 +local PushR_min = 0 +local PushR_max = 1.1 +local Magic_min = 5 +local Magic_max = 10 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 1 +local Rolling_Atk_min = 4 +local Rolling_Atk_max = 5 +REGISTER_GOAL_NO_UPDATE(GOAL_PondAunt_Enemy6531_Battle, 1) +function PondAunt_Enemy6531Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local BothHandOff = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local MagicValue = 1 + local Magic1Limit = ai:GetNumber(0) + if 5 <= Magic1Limit then + MagicValue = 0 + end + if ai:IsTargetGuard(TARGET_ENE_0) == false and ai:IsBothHandMode(TARGET_SELF) and BothHandOff <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + if 8 <= targetDist then + actPerArr[1] = 10 + actPerArr[3] = 35 + actPerArr[7] = 50 + actPerArr[10] = 5 + elseif 5 <= targetDist then + actPerArr[1] = 15 + actPerArr[3] = 40 + actPerArr[7] = 40 + actPerArr[10] = 5 + elseif 2.9 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 35 + actPerArr[3] = 50 + actPerArr[4] = 15 + else + actPerArr[1] = 30 + actPerArr[3] = 50 + actPerArr[4] = 15 + actPerArr[10] = 5 + end + elseif 1 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 18 + actPerArr[3] = 42 + actPerArr[4] = 10 + actPerArr[6] = 20 + actPerArr[9] = 10 + else + actPerArr[1] = 20 + actPerArr[3] = 45 + actPerArr[6] = 20 + actPerArr[9] = 10 + actPerArr[10] = 5 + end + elseif ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 15 + actPerArr[3] = 40 + actPerArr[4] = 15 + actPerArr[6] = 20 + actPerArr[9] = 10 + else + actPerArr[1] = 25 + actPerArr[3] = 40 + actPerArr[6] = 20 + actPerArr[9] = 10 + actPerArr[10] = 5 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, PondAunt_Enemy6531_Act01) + actFuncArr[3] = REGIST_FUNC(ai, goal, PondAunt_Enemy6531_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, PondAunt_Enemy6531_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, PondAunt_Enemy6531_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, PondAunt_Enemy6531_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, PondAunt_Enemy6531_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, PondAunt_Enemy6531_Act08) + actFuncArr[9] = REGIST_FUNC(ai, goal, PondAunt_Enemy6531_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, PondAunt_Enemy6531_Act10) + local atkAfterFunc = REGIST_FUNC(ai, goal, PondAunt_Enemy6531_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function PondAunt_Enemy6531_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + if ai:IsTargetGuard(TARGET_ENE_0) == true and not ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function PondAunt_Enemy6531_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + if ai:IsTargetGuard(TARGET_ENE_0) == true and not ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function PondAunt_Enemy6531_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 50 + return GetWellSpace_Odds +end + +NormalR_min = Magic_max +NormalR_min = Magic_min +function PondAunt_Enemy6531_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic1Limit = ai:GetNumber(0) + CommonNPC_ChangeWepR2(ai, goal) + if Magic_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2.5, TARGET_ENE_0, Magic_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + elseif targetDist <= Magic_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, Magic_min, TARGET_ENE_0, false, -1) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + ai:SetNumber(0, Magic1Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_Atk_max +function PondAunt_Enemy6531_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + if ai:IsTargetGuard(TARGET_ENE_0) == true and not ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + local AppDist = Backstep_Atk_max + local DashDist = Backstep_Atk_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Rolling_Atk_max +function PondAunt_Enemy6531_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + if ai:IsTargetGuard(TARGET_ENE_0) == true and not ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + local AppDist = Rolling_Atk_max + local DashDist = Rolling_Atk_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function PondAunt_Enemy6531_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(2, 2.5), TARGET_SELF, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, 4) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function PondAunt_Enemy6531_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function PondAunt_Enemy6531_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function PondAunt_Enemy6531_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 5 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate2 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepL, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 2) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepR, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 2) + end + elseif fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate <= 15 then + if fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 6, TARGET_ENE_0, ai:GetRandam_Float(1.5, 3), TARGET_ENE_0, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + end + return +end + +function PondAunt_Enemy6531Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function PondAunt_Enemy6531Battle_Terminate(ai, goal) + return +end + +NormalR_min = LargeR_max +function PondAunt_Enemy6531Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 10 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 80 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 10 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + end + end + if ai:IsInterupt(INTERUPT_GuardBreak) then + local distGuardBreak_Act = 2 + local oddsGuardBreak_Act = 100 + if targetDist <= distGuardBreak_Act and fate <= oddsGuardBreak_Act then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 10 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + else + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/006540_battle.lua b/scripts_decompiled/006540_battle.lua new file mode 100644 index 0000000..28b4f33 --- /dev/null +++ b/scripts_decompiled/006540_battle.lua @@ -0,0 +1,426 @@ +REGISTER_GOAL(GOAL_SunKnight6540_Battle, "SunKnight6540Battle") +local NormalR_min = 0 +local NormalR_max = 2 +local Guard_NormalR_min = 0 +local Guard_NormalR_max = 1.5 +local LargeR_min = 0 +local LargeR_max = 2.9 +local Whand_jyaku_min = 0 +local Whand_jyaku_max = 2.1 +local Whand_kyou_min = 0 +local Whand_kyou_max = 2.1 +local PushR_min = 0 +local PushR_max = 1.1 +local Magic_min = 5 +local Magic_max = 10 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 2.8 +local Rolling_Atk_min = 4 +local Rolling_Atk_max = 5 +REGISTER_GOAL_NO_UPDATE(GOAL_SunKnight6540_Battle, 1) +function SunKnight6540Battle_Activate(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local playerDist = ai:GetDist(TARGET_LOCALPLAYER) + local isFindTarget = ai:IsSearchTarget(TARGET_ENE_0) + local eventNo = ai:GetEventRequest(0) + local myThinkId = ai:GetNpcThinkParamID() + local PointFrontWall = 0 + local MoveArea1 = 0 + local MoveArea2 = 0 + if myThinkId == 6540 then + PointFrontOfWall = 1012997 + elseif myThinkId == 6541 then + PointFrontOfWall = 1002997 + elseif myThinkId == 6542 then + PointFrontOfWall = 1412897 + elseif myThinkId == 6543 then + PointFrontOfWall = 1512997 + MoveArea1 = 1512995 + MoveArea2 = 1512995 + elseif myThinkId == 6544 then + PointFrontOfWall = 1802997 + end + if eventNo == 10 then + ai:SetEventMoveTarget(PointFrontOfWall) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 1, POINT_EVENT, 3, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 1, POINT_EVENT, 0.1, TARGET_SELF, true, -1) + elseif eventNo == 9 then + ai:SetEventMoveTarget(1512897) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 1, POINT_EVENT, 3, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 1, POINT_EVENT, 0.1, TARGET_SELF, true, -1) + elseif eventNo == 8 then + ai:SetEventMoveTarget(1512770) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 1, POINT_EVENT, 3, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Wait, 2, TARGET_LOCALPLAYER, 0, 0, 0) + elseif playerDist <= 0.1 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_LOCALPLAYER, 1, TARGET_LOCALPLAYER, true, -1) + elseif fate <= 85 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 1.5, TARGET_LOCALPLAYER, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(20, 25), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_Wait, 2, TARGET_LOCALPLAYER, 0, 0, 0) + end + elseif playerDist <= 0.4 then + if fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_LOCALPLAYER, 1, TARGET_LOCALPLAYER, true, -1) + elseif fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 1.5, TARGET_LOCALPLAYER, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(20, 25), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_Wait, 2, TARGET_LOCALPLAYER, 0, 0, 0) + end + elseif MoveArea1 ~= 0 and not ai:IsInsideTargetRegion(TARGET_LOCALPLAYER, MoveArea1) and not ai:IsInsideTargetRegion(TARGET_LOCALPLAYER, MoveArea2) then + if 10 <= targetDist or isFindTarget == false then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, POINT_INITIAL, 1, TARGET_SELF, true, 4) + goal:AddSubGoal(GOAL_COMMON_Wait, 2, TARGET_SELF, 0, 0, 0) + else + SunKnight6540_Battle(ai, goal) + end + elseif 20 <= playerDist or 10 <= targetDist or isFindTarget == false then + local walk = true + if 2.2 <= playerDist then + walk = false + end + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, TARGET_LOCALPLAYER, 1.2, TARGET_SELF, walk, -1) + else + SunKnight6540_Battle(ai, goal) + end + return +end + +function SunKnight6540_Battle(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local BothHandOff = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local MagicValue = 1 + local Magic1Limit = ai:GetNumber(0) + if 5 <= Magic1Limit then + MagicValue = 0 + end + if ai:IsTargetGuard(TARGET_ENE_0) == false and ai:IsBothHandMode(TARGET_SELF) and BothHandOff <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + if 8 <= targetDist then + actPerArr[1] = 5 + actPerArr[3] = 5 + actPerArr[5] = 45 * MagicValue + actPerArr[7] = 40 + actPerArr[10] = 5 + elseif 5 <= targetDist then + actPerArr[1] = 15 + actPerArr[3] = 15 + actPerArr[5] = 35 * MagicValue + actPerArr[7] = 30 + actPerArr[10] = 5 + elseif 2.9 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 25 + actPerArr[3] = 25 + actPerArr[5] = 50 * MagicValue + else + actPerArr[1] = 30 + actPerArr[3] = 30 + actPerArr[5] = 35 * MagicValue + actPerArr[10] = 5 + end + elseif 1 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 28 + actPerArr[3] = 27 + actPerArr[4] = 10 + actPerArr[6] = 25 + actPerArr[9] = 10 + else + actPerArr[1] = 30 + actPerArr[3] = 30 + actPerArr[6] = 25 + actPerArr[9] = 10 + actPerArr[10] = 5 + end + elseif ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 25 + actPerArr[3] = 25 + actPerArr[4] = 20 + actPerArr[6] = 20 + actPerArr[9] = 10 + else + actPerArr[1] = 30 + actPerArr[3] = 30 + actPerArr[6] = 25 + actPerArr[9] = 10 + actPerArr[10] = 5 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, SunKnight6540_Act01) + actFuncArr[3] = REGIST_FUNC(ai, goal, SunKnight6540_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, SunKnight6540_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, SunKnight6540_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, SunKnight6540_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, SunKnight6540_Act07) + actFuncArr[9] = REGIST_FUNC(ai, goal, SunKnight6540_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, SunKnight6540_Act10) + local atkAfterFunc = REGIST_FUNC(ai, goal, SunKnight6540_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function SunKnight6540_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + if ai:IsTargetGuard(TARGET_ENE_0) == true and not ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function SunKnight6540_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + if ai:IsTargetGuard(TARGET_ENE_0) == true and not ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function SunKnight6540_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Magic_max +NormalR_min = Magic_min +function SunKnight6540_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic1Limit = ai:GetNumber(0) + CommonNPC_ChangeWepR2(ai, goal) + if Magic_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2.5, TARGET_ENE_0, Magic_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + elseif targetDist <= Magic_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, Magic_min, TARGET_ENE_0, false, -1) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + ai:SetNumber(0, Magic1Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_Atk_max +function SunKnight6540_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + if ai:IsTargetGuard(TARGET_ENE_0) == true and not ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + local AppDist = Backstep_Atk_max + local DashDist = Backstep_Atk_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Rolling_Atk_max +function SunKnight6540_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + if ai:IsTargetGuard(TARGET_ENE_0) == true and not ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + local AppDist = Rolling_Atk_max + local DashDist = Rolling_Atk_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function SunKnight6540_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function SunKnight6540_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function SunKnight6540_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 5 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate2 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepL, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 2) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepR, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 2) + end + elseif fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 6, TARGET_ENE_0, ai:GetRandam_Float(1.5, 3), TARGET_ENE_0, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + return +end + +function SunKnight6540Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function SunKnight6540Battle_Terminate(ai, goal) + return +end + +NormalR_min = LargeR_max +function SunKnight6540Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 10 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 80 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 10 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + end + end + if ai:IsInterupt(INTERUPT_GuardBreak) then + local distGuardBreak_Act = 2 + local oddsGuardBreak_Act = 100 + if targetDist <= distGuardBreak_Act and fate <= oddsGuardBreak_Act then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 10 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + else + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/006540_logic.lua b/scripts_decompiled/006540_logic.lua new file mode 100644 index 0000000..719f75f --- /dev/null +++ b/scripts_decompiled/006540_logic.lua @@ -0,0 +1,11 @@ +REGISTER_LOGIC_FUNC(LOGIC_ID_SunKnight6540, "sunKnight6540_Logic", "sunKnight6540_Interupt") +function sunKnight6540_Logic(ai) + ai:AddTopGoal(GOAL_SunKnight6540_Battle, -1, 0, 0, 0, 0) + return +end + +function sunKnight6540_Interupt(ai, goal) + return +end + +return diff --git a/scripts_decompiled/006550_battle.lua b/scripts_decompiled/006550_battle.lua new file mode 100644 index 0000000..1874bdd --- /dev/null +++ b/scripts_decompiled/006550_battle.lua @@ -0,0 +1,401 @@ +REGISTER_GOAL(GOAL_TempleKnight6550_Battle, "TempleKnight6550Battle") +local NormalR_min = 0 +local NormalR_max = 2.5 +local LargeR_min = 0 +local LargeR_max = 2.5 +local Whand_jyaku_min = 0 +local Whand_jyaku_max = 2 +local Whand_kyou_min = 0 +local Whand_kyou_max = 2 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 1.5 +local Backstep_AtkW_min = 0 +local Backstep_AtkW_max = 2 +local PushR_min = 0 +local PushR_max = 1 +local Magic_min = 8 +local Magic_max = 8 +local Magic2_min = 0 +local Magic2_max = 2 +REGISTER_GOAL_NO_UPDATE(GOAL_TempleKnight6550_Battle, 1) +function TempleKnight6550Battle_Activate(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local playerDist = ai:GetDist(TARGET_LOCALPLAYER) + local isFindTarget = ai:IsSearchTarget(TARGET_ENE_0) + local eventNo = ai:GetEventRequest(0) + local myThinkId = ai:GetNpcThinkParamID() + local selfmp = ai:GetMp(TARGET_SELF) + local PointFrontWall = 0 + local MoveArea1 = 0 + local MoveArea2 = 0 + if myThinkId == 6550 then + PointFrontOfWall = 1302997 + MoveArea1 = 1302995 + MoveArea2 = 1302995 + end + if eventNo == 10 then + ai:SetEventMoveTarget(PointFrontOfWall) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 1, POINT_EVENT, 3, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 1, POINT_EVENT, 0.1, TARGET_SELF, true, -1) + elseif playerDist <= 0.1 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_LOCALPLAYER, 1, TARGET_LOCALPLAYER, true, -1) + elseif fate <= 85 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 1.5, TARGET_LOCALPLAYER, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(20, 25), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_Wait, 2, TARGET_LOCALPLAYER, 0, 0, 0) + end + elseif playerDist <= 0.4 then + if fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_LOCALPLAYER, 1, TARGET_LOCALPLAYER, true, -1) + elseif fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 1.5, TARGET_LOCALPLAYER, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(20, 25), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_Wait, 2, TARGET_LOCALPLAYER, 0, 0, 0) + end + elseif MoveArea1 ~= 0 and not ai:IsInsideTargetRegion(TARGET_LOCALPLAYER, MoveArea1) and not ai:IsInsideTargetRegion(TARGET_LOCALPLAYER, MoveArea2) then + if 10 <= targetDist or isFindTarget == false then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, POINT_INITIAL, 1, TARGET_SELF, true, 4) + goal:AddSubGoal(GOAL_COMMON_Wait, 2, TARGET_SELF, 0, 0, 0) + else + TempleKnight6550_Battle(ai, goal) + end + elseif 20 <= playerDist or 10 <= targetDist or isFindTarget == false then + local walk = true + if 2.2 <= playerDist then + walk = false + end + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, TARGET_LOCALPLAYER, 1.2, TARGET_SELF, walk, -1) + else + TempleKnight6550_Battle(ai, goal) + end + return +end + +function TempleKnight6550_Battle(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local BothHandOff = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local RYOUTE_odds = 1 + local KATATE_odds = 1 + local MagicValue1 = 1 + local Magic1Limit = ai:GetNumber(0) + if 5 <= Magic1Limit then + MagicValue1 = 0 + end + local MagicValue2 = 1 + local Magic2Limit = ai:GetNumber(1) + if 5 <= Magic2Limit then + MagicValue2 = 0 + end + local GuardTaiou = 0 + if ai:IsTargetGuard(TARGET_ENE_0) == true then + GuardTaiou = 1 + end + local hprate = ai:GetHpRate(TARGET_SELF) + local Kaifuku = 0 + if hprate <= 0.5 then + Kaifuku = 1 + end + if 4 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[9] = 60 + actPerArr[18] = 1000 * MagicValue1 * Kaifuku + actPerArr[20] = 40 + elseif 1 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[9] = 60 + actPerArr[17] = 20 * GuardTaiou + actPerArr[18] = 1000 * MagicValue1 * Kaifuku + actPerArr[19] = 25 * MagicValue2 + actPerArr[20] = 20 + else + actPerArr[1] = 20 + actPerArr[2] = 20 + actPerArr[5] = 20 + actPerArr[9] = 20 + actPerArr[13] = 10 + actPerArr[17] = 20 * GuardTaiou + actPerArr[18] = 1000 * MagicValue1 * Kaifuku + actPerArr[19] = 20 * MagicValue2 + actPerArr[20] = 40 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, TempleKnight_Enemy6551_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, TempleKnight_Enemy6551_Act02) + actFuncArr[5] = REGIST_FUNC(ai, goal, TempleKnight_Enemy6551_Act05) + actFuncArr[9] = REGIST_FUNC(ai, goal, TempleKnight_Enemy6551_Act09) + actFuncArr[13] = REGIST_FUNC(ai, goal, TempleKnight_Enemy6551_Act13) + actFuncArr[14] = REGIST_FUNC(ai, goal, TempleKnight_Enemy6551_Act14) + actFuncArr[17] = REGIST_FUNC(ai, goal, TempleKnight_Enemy6551_Act17) + actFuncArr[18] = REGIST_FUNC(ai, goal, TempleKnight_Enemy6551_Act18) + actFuncArr[19] = REGIST_FUNC(ai, goal, TempleKnight_Enemy6551_Act19) + actFuncArr[20] = REGIST_FUNC(ai, goal, TempleKnight_Enemy6551_Act20) + local atkAfterFunc = REGIST_FUNC(ai, goal, TempleKnight_Enemy6551_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function TempleKnight_Enemy6551_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function TempleKnight_Enemy6551_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_Atk_max +function TempleKnight_Enemy6551_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = Backstep_Atk_max + local DashDist = Backstep_Atk_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Whand_jyaku_max +function TempleKnight_Enemy6551_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Whand_jyaku_max + local DashDist = Whand_jyaku_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_AtkW_max +function TempleKnight_Enemy6551_Act13(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Backstep_AtkW_max + local DashDist = Backstep_AtkW_max + 5 + local Odds_Guard = 0 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function TempleKnight_Enemy6551_Act17(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 0 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Magic_max +NormalR_min = Magic_min +function TempleKnight_Enemy6551_Act18(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic1Limit = ai:GetNumber(0) + CommonNPC_ChangeWepR2(ai, goal) + ai:ChangeEquipMagic(0) + if Magic_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 7, TARGET_ENE_0, Magic_min, TARGET_ENE_0, false, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 0, -1) + end + ai:SetNumber(0, Magic1Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR_min = Magic2_max +function TempleKnight_Enemy6551_Act19(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic2Limit = ai:GetNumber(1) + CommonNPC_ChangeWepR2(ai, goal) + ai:ChangeEquipMagic(1) + local AppDist = Magic2_max + local DashDist = Magic2_max + 5 + local Odds_Guard = 0 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 1.5, 90) + ai:SetNumber(1, Magic2Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function TempleKnight_Enemy6551_Act20(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(2, 2.5), TARGET_SELF, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, 4) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function TempleKnight_Enemy6551_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 0 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate2 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepL, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 2) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepR, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 2) + end + elseif fate <= 0 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate <= 80 then + if fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 6, TARGET_ENE_0, ai:GetRandam_Float(1.5, 3), TARGET_ENE_0, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + end + return +end + +function TempleKnight_Enemy6551Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function TempleKnight_Enemy6551Battle_Terminate(ai, goal) + return +end + +NormalR_min = LargeR_max +function TempleKnight_Enemy6551Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 40 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, combRunDist, TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 50 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, combRunDist, TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + goal:ClearSubGoal() + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + elseif ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 75 + if fate <= shootIntPer then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + else + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + return true + else + return true + end + else + return false + end +end + +return diff --git a/scripts_decompiled/006550_logic.lua b/scripts_decompiled/006550_logic.lua new file mode 100644 index 0000000..beee3ef --- /dev/null +++ b/scripts_decompiled/006550_logic.lua @@ -0,0 +1,11 @@ +REGISTER_LOGIC_FUNC(LOGIC_ID_TempleKnight6550, "TempleKnight6550_Logic", "TempleKnight6550_Interupt") +function TempleKnight6550_Logic(ai) + ai:AddTopGoal(GOAL_TempleKnight6550_Battle, -1, 0, 0, 0, 0) + return +end + +function TempleKnight6550_Interupt(ai, goal) + return +end + +return diff --git a/scripts_decompiled/006551_battle.lua b/scripts_decompiled/006551_battle.lua new file mode 100644 index 0000000..29b82b0 --- /dev/null +++ b/scripts_decompiled/006551_battle.lua @@ -0,0 +1,345 @@ +REGISTER_GOAL(GOAL_TempleKnight_Enemy6551_Battle, "TempleKnight_Enemy6551Battle") +local NormalR_min = 0 +local NormalR_max = 2.5 +local LargeR_min = 0 +local LargeR_max = 2.5 +local Whand_jyaku_min = 0 +local Whand_jyaku_max = 2 +local Whand_kyou_min = 0 +local Whand_kyou_max = 2 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 1.5 +local Backstep_AtkW_min = 0 +local Backstep_AtkW_max = 2 +local PushR_min = 0 +local PushR_max = 1 +local Magic_min = 8 +local Magic_max = 8 +local Magic2_min = 0 +local Magic2_max = 2 +REGISTER_GOAL_NO_UPDATE(GOAL_TempleKnight_Enemy6551_Battle, 1) +function TempleKnight_Enemy6551Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local BothHandOff = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local RYOUTE_odds = 1 + local KATATE_odds = 1 + local MagicValue1 = 1 + local Magic1Limit = ai:GetNumber(0) + if 5 <= Magic1Limit then + MagicValue1 = 0 + end + local MagicValue2 = 1 + local Magic2Limit = ai:GetNumber(1) + if 5 <= Magic2Limit then + MagicValue2 = 0 + end + local GuardTaiou = 0 + if ai:IsTargetGuard(TARGET_ENE_0) == true then + GuardTaiou = 1 + end + local hprate = ai:GetHpRate(TARGET_SELF) + local Kaifuku = 0 + if hprate <= 0.5 then + Kaifuku = 1 + end + if 4 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[9] = 60 + actPerArr[18] = 1000 * MagicValue1 * Kaifuku + actPerArr[20] = 40 + elseif 1 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[9] = 60 + actPerArr[17] = 20 * GuardTaiou + actPerArr[18] = 1000 * MagicValue1 * Kaifuku + actPerArr[19] = 25 * MagicValue2 + actPerArr[20] = 20 + else + actPerArr[1] = 20 + actPerArr[2] = 20 + actPerArr[5] = 20 + actPerArr[9] = 20 + actPerArr[13] = 10 + actPerArr[17] = 20 * GuardTaiou + actPerArr[18] = 1000 * MagicValue1 * Kaifuku + actPerArr[19] = 20 * MagicValue2 + actPerArr[20] = 40 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, TempleKnight_Enemy6551_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, TempleKnight_Enemy6551_Act02) + actFuncArr[5] = REGIST_FUNC(ai, goal, TempleKnight_Enemy6551_Act05) + actFuncArr[9] = REGIST_FUNC(ai, goal, TempleKnight_Enemy6551_Act09) + actFuncArr[13] = REGIST_FUNC(ai, goal, TempleKnight_Enemy6551_Act13) + actFuncArr[14] = REGIST_FUNC(ai, goal, TempleKnight_Enemy6551_Act14) + actFuncArr[17] = REGIST_FUNC(ai, goal, TempleKnight_Enemy6551_Act17) + actFuncArr[18] = REGIST_FUNC(ai, goal, TempleKnight_Enemy6551_Act18) + actFuncArr[19] = REGIST_FUNC(ai, goal, TempleKnight_Enemy6551_Act19) + actFuncArr[20] = REGIST_FUNC(ai, goal, TempleKnight_Enemy6551_Act20) + local atkAfterFunc = REGIST_FUNC(ai, goal, TempleKnight_Enemy6551_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function TempleKnight_Enemy6551_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function TempleKnight_Enemy6551_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_Atk_max +function TempleKnight_Enemy6551_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = Backstep_Atk_max + local DashDist = Backstep_Atk_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Whand_jyaku_max +function TempleKnight_Enemy6551_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Whand_jyaku_max + local DashDist = Whand_jyaku_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_AtkW_max +function TempleKnight_Enemy6551_Act13(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Backstep_AtkW_max + local DashDist = Backstep_AtkW_max + 5 + local Odds_Guard = 0 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function TempleKnight_Enemy6551_Act17(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 0 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Magic_max +NormalR_min = Magic_min +function TempleKnight_Enemy6551_Act18(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic1Limit = ai:GetNumber(0) + CommonNPC_ChangeWepR2(ai, goal) + ai:ChangeEquipMagic(0) + if Magic_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 7, TARGET_ENE_0, Magic_min, TARGET_ENE_0, false, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 0, -1) + end + ai:SetNumber(0, Magic1Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR_min = Magic2_max +function TempleKnight_Enemy6551_Act19(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic2Limit = ai:GetNumber(1) + CommonNPC_ChangeWepR2(ai, goal) + ai:ChangeEquipMagic(1) + local AppDist = Magic2_max + local DashDist = Magic2_max + 5 + local Odds_Guard = 0 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 1.5, 90) + ai:SetNumber(1, Magic2Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function TempleKnight_Enemy6551_Act20(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(2, 2.5), TARGET_SELF, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, 4) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function TempleKnight_Enemy6551_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 0 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate2 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepL, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 2) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepR, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 2) + end + elseif fate <= 0 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate <= 80 then + if fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 6, TARGET_ENE_0, ai:GetRandam_Float(1.5, 3), TARGET_ENE_0, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + end + return +end + +function TempleKnight_Enemy6551Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function TempleKnight_Enemy6551Battle_Terminate(ai, goal) + return +end + +NormalR_min = LargeR_max +function TempleKnight_Enemy6551Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 40 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, combRunDist, TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 50 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, combRunDist, TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + goal:ClearSubGoal() + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + elseif ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 75 + if fate <= shootIntPer then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + else + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + return true + else + return true + end + else + return false + end +end + +return diff --git a/scripts_decompiled/006560_battle.lua b/scripts_decompiled/006560_battle.lua new file mode 100644 index 0000000..64b7ef2 --- /dev/null +++ b/scripts_decompiled/006560_battle.lua @@ -0,0 +1,419 @@ +REGISTER_GOAL(GOAL_StingKnight6560_Battle, "StingKnight6560Battle") +local NormalR_min = 0 +local NormalR_max = 1.5 +local LargeR_min = 0 +local LargeR_max = 2.5 +local Whand_jyaku_min = 0 +local Whand_jyaku_max = 1.7 +local Whand_kyou_min = 0 +local Whand_kyou_max = 2.3 +local PushR_min = 0 +local PushR_max = 0.9 +local Magic_min = 5 +local Magic_max = 10 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 1.5 +local Rolling_Atk_min = 3.5 +local Rolling_Atk_max = 4.5 +REGISTER_GOAL_NO_UPDATE(GOAL_StingKnight6560_Battle, 1) +function StingKnight6560Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local BothHandOff = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local MagicValue = 1 + local Magic1Limit = ai:GetNumber(0) + if 5 <= Magic1Limit then + MagicValue = 0 + end + if ai:IsTargetGuard(TARGET_ENE_0) == false and ai:IsBothHandMode(TARGET_SELF) and BothHandOff <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + if 8 <= targetDist then + actPerArr[1] = 15 + actPerArr[3] = 15 + actPerArr[7] = 65 + actPerArr[10] = 5 + elseif 3.5 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 25 + actPerArr[3] = 25 + actPerArr[4] = 50 + else + actPerArr[1] = 45 + actPerArr[3] = 50 + actPerArr[10] = 5 + end + elseif 1.5 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 13 + actPerArr[3] = 17 + actPerArr[4] = 30 + actPerArr[6] = 20 + actPerArr[9] = 10 + else + actPerArr[1] = 30 + actPerArr[3] = 30 + actPerArr[6] = 25 + actPerArr[9] = 10 + actPerArr[10] = 5 + end + elseif ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 15 + actPerArr[3] = 20 + actPerArr[4] = 35 + actPerArr[6] = 20 + actPerArr[9] = 10 + else + actPerArr[1] = 30 + actPerArr[3] = 30 + actPerArr[6] = 25 + actPerArr[9] = 10 + actPerArr[10] = 5 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, StingKnight6560_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, StingKnight6560_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, StingKnight6560_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, StingKnight6560_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, StingKnight6560_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, StingKnight6560_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, StingKnight6560_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, StingKnight6560_Act08) + actFuncArr[9] = REGIST_FUNC(ai, goal, StingKnight6560_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, StingKnight6560_Act10) + local atkAfterFunc = REGIST_FUNC(ai, goal, StingKnight6560_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function StingKnight6560_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + if ai:IsTargetGuard(TARGET_ENE_0) == true and not ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function StingKnight6560_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + if ai:IsTargetGuard(TARGET_ENE_0) == true and not ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + local AppDist = Guard_NormalR_max + local DashDist = Guard_NormalR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function StingKnight6560_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + if ai:IsTargetGuard(TARGET_ENE_0) == true and not ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + end + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function StingKnight6560_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if ai:IsBothHandMode(TARGET_SELF) == true then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalL, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Magic_max +NormalR_min = Magic_min +function StingKnight6560_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic1Limit = ai:GetNumber(0) + CommonNPC_ChangeWepR2(ai, goal) + if Magic_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2.5, TARGET_ENE_0, Magic_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + elseif targetDist <= Magic_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, Magic_min, TARGET_ENE_0, false, -1) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + ai:SetNumber(0, Magic1Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_Atk_max +function StingKnight6560_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + if ai:IsTargetGuard(TARGET_ENE_0) == true and not ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + local AppDist = Backstep_Atk_max + local DashDist = Backstep_Atk_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Rolling_Atk_max +function StingKnight6560_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + if ai:IsTargetGuard(TARGET_ENE_0) == true and not ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + local AppDist = Rolling_Atk_max + local DashDist = Rolling_Atk_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function StingKnight6560_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(2, 2.5), TARGET_SELF, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, 4) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function StingKnight6560_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function StingKnight6560_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_SwitchWep, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function StingKnight6560_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 5 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate2 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepL, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepR, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + elseif fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate <= 15 then + if fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 6, TARGET_ENE_0, ai:GetRandam_Float(1.5, 3), TARGET_ENE_0, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + end + return +end + +function StingKnight6560Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function StingKnight6560Battle_Terminate(ai, goal) + return +end + +NormalR_min = LargeR_max +function StingKnight6560Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 10 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + elseif fate2 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepL, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepR, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + end + end + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 80 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 10 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + elseif fate2 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepL, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepR, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + end + end + if ai:IsInterupt(INTERUPT_GuardBreak) then + local distGuardBreak_Act = 2 + local oddsGuardBreak_Act = 100 + if targetDist <= distGuardBreak_Act and fate <= oddsGuardBreak_Act then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 10 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + elseif fate2 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepL, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepR, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + if fate <= 50 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + elseif fate2 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepL, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepR, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + else + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/006570_battle.lua b/scripts_decompiled/006570_battle.lua new file mode 100644 index 0000000..4e20086 --- /dev/null +++ b/scripts_decompiled/006570_battle.lua @@ -0,0 +1,403 @@ +REGISTER_GOAL(GOAL_YellowMantle6570_Battle, "YellowMantle6570Battle") +local NormalR_min = 0 +local NormalR_max = 2.6 +local LargeR_min = 0 +local LargeR_max = 2.5 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 1.8 +local PushR_min = 0 +local PushR_max = 1 +local Magic_min = 7 +local Magic_max = 7 +local Magic2_min = 4 +local Magic2_max = 4 +local Magic3_min = 5 +local Magic3_max = 5 +REGISTER_GOAL_NO_UPDATE(GOAL_YellowMantle6570_Battle, 1) +function YellowMantle6570Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local BothHandOff = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local RYOUTE_odds = 1 + local KATATE_odds = 1 + if ai:IsTargetGuard(TARGET_ENE_0) == true then + RYOUTE_odds = 10 + end + local MagicValue1 = 1 + local Magic1Limit = ai:GetNumber(0) + if 6 <= Magic1Limit then + MagicValue1 = 0 + end + local MagicValue2 = 1 + local Magic2Limit = ai:GetNumber(1) + if 5 <= Magic2Limit then + MagicValue2 = 0 + end + local MagicValue3 = 1 + local Magic3Limit = ai:GetNumber(2) + if 8 <= Magic3Limit then + MagicValue3 = 0 + end + local GuardTaiou = 0 + if ai:IsTargetGuard(TARGET_ENE_0) == true then + GuardTaiou = 1 + end + if 2.5 <= targetDist then + actPerArr[1] = 5 + actPerArr[2] = 5 + actPerArr[18] = 30 * MagicValue1 + actPerArr[19] = 30 * MagicValue2 + actPerArr[20] = 30 * MagicValue3 + elseif 1 <= targetDist then + actPerArr[1] = 9 + actPerArr[2] = 9 + actPerArr[18] = 29 * MagicValue1 + actPerArr[19] = 27 * MagicValue2 + actPerArr[20] = 26 * MagicValue3 + else + actPerArr[1] = 10 + actPerArr[2] = 10 + actPerArr[5] = 10 + actPerArr[17] = 10 * GuardTaiou + actPerArr[18] = 25 * MagicValue1 + actPerArr[19] = 25 * MagicValue2 + actPerArr[20] = 20 * MagicValue3 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, YellowMantle6570_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, YellowMantle6570_Act02) + actFuncArr[5] = REGIST_FUNC(ai, goal, YellowMantle6570_Act05) + actFuncArr[17] = REGIST_FUNC(ai, goal, YellowMantle6570_Act17) + actFuncArr[18] = REGIST_FUNC(ai, goal, YellowMantle6570_Act18) + actFuncArr[19] = REGIST_FUNC(ai, goal, YellowMantle6570_Act19) + actFuncArr[20] = REGIST_FUNC(ai, goal, YellowMantle6570_Act20) + local atkAfterFunc = REGIST_FUNC(ai, goal, YellowMantle6570_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function YellowMantle6570_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 0 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function YellowMantle6570_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_Atk_max +function YellowMantle6570_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = Backstep_Atk_max + local DashDist = Backstep_Atk_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function YellowMantle6570_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = Rolling_Atk_max + local DashDist = Rolling_Atk_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function YellowMantle6570_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Whand_jyaku_max + local DashDist = Whand_jyaku_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function YellowMantle6570_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Whand_kyou_max + local DashDist = Whand_kyou_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function YellowMantle6570_Act13(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Backstep_AtkW_max + local DashDist = Backstep_AtkW_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function YellowMantle6570_Act15(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Rolling_AtkW_max + local DashDist = Rolling_AtkW_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function YellowMantle6570_Act17(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR_min = Magic_max +NormalR_min = Magic_min +function YellowMantle6570_Act18(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic1Limit = ai:GetNumber(0) + CommonNPC_ChangeWepR1(ai, goal) + ai:ChangeEquipMagic(0) + if Magic_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2.5, TARGET_ENE_0, Magic_max, TARGET_SELF, false, -1) + elseif targetDist <= Magic_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, Magic_min, TARGET_ENE_0, false, -1) + end + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicL, TARGET_ENE_0, DIST_None, 1.5, 90) + ai:SetNumber(0, Magic1Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR_min = Magic2_max +NormalR_min = Magic2_min +function YellowMantle6570_Act19(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic2Limit = ai:GetNumber(1) + CommonNPC_ChangeWepR1(ai, goal) + ai:ChangeEquipMagic(1) + if Magic2_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2.5, TARGET_ENE_0, Magic2_max, TARGET_SELF, false, -1) + elseif targetDist <= Magic2_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, Magic2_min, TARGET_ENE_0, false, -1) + end + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicL, TARGET_ENE_0, DIST_None, 1.5, 90) + ai:SetNumber(1, Magic2Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR_min = Magic3_max +NormalR_min = Magic3_min +function YellowMantle6570_Act20(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic3Limit = ai:GetNumber(2) + CommonNPC_ChangeWepR1(ai, goal) + ai:ChangeEquipMagic(2) + if Magic3_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2.5, TARGET_ENE_0, Magic3_max, TARGET_SELF, false, -1) + elseif targetDist <= Magic3_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, Magic3_min, TARGET_ENE_0, false, -1) + end + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicL, TARGET_ENE_0, DIST_None, 1.5, 90) + ai:SetNumber(2, Magic3Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function YellowMantle6570_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + end + return +end + +function YellowMantle6570Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function YellowMantle6570Battle_Terminate(ai, goal) + return +end + +function YellowMantle6570Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 10 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 10 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 10 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/006580_battle.lua b/scripts_decompiled/006580_battle.lua new file mode 100644 index 0000000..fb7617d --- /dev/null +++ b/scripts_decompiled/006580_battle.lua @@ -0,0 +1,329 @@ +REGISTER_GOAL(GOAL_Habel6580_Battle, "Habel6580Battle") +local NormalR_min = 0 +local NormalR_max = 3.3 +local LargeR_min = 0 +local LargeR_max = 3 +local Whand_jyaku_min = 0 +local Whand_jyaku_max = 3 +local Whand_kyou_min = 0 +local Whand_kyou_max = 3.1 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 2.1 +local Backstep_AtkW_min = 0 +local Backstep_AtkW_max = 1.3 +local Rolling_Atk_min = 3.5 +local Rolling_Atk_max = 4.5 +local Rolling_AtkW_min = 4 +local Rolling_AtkW_max = 5 +local PushR_min = 0 +local PushR_max = 1 +REGISTER_GOAL_NO_UPDATE(GOAL_Habel6580_Battle, 1) +function Habel6580Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local BothHandOff = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + ai:AddObserveRegion(0, TARGET_ENE_0, 1012799) + local RYOUTE_odds = 1 + local KATATE_odds = 1 + if ai:IsTargetGuard(TARGET_ENE_0) == true then + RYOUTE_odds = 10 + end + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1012799) then + if 3.5 <= targetDist then + actPerArr[1] = 32 * KATATE_odds + actPerArr[2] = 53 * KATATE_odds + actPerArr[9] = 32 * RYOUTE_odds + actPerArr[10] = 53 * RYOUTE_odds + actPerArr[20] = 15 * RYOUTE_odds + elseif 2.1 <= targetDist then + actPerArr[1] = 27 * KATATE_odds + actPerArr[2] = 48 * KATATE_odds + actPerArr[9] = 27 * RYOUTE_odds + actPerArr[10] = 48 * RYOUTE_odds + actPerArr[17] = 10 * RYOUTE_odds + actPerArr[20] = 15 * RYOUTE_odds + else + actPerArr[1] = 17 * KATATE_odds + actPerArr[2] = 38 * KATATE_odds + actPerArr[5] = 20 * KATATE_odds + actPerArr[9] = 17 * RYOUTE_odds + actPerArr[10] = 38 * RYOUTE_odds + actPerArr[13] = 20 * KATATE_odds + actPerArr[17] = 10 * RYOUTE_odds + actPerArr[20] = 15 * RYOUTE_odds + end + else + actPerArr[6] = 100 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Habel6580_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Habel6580_Act02) + actFuncArr[5] = REGIST_FUNC(ai, goal, Habel6580_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, Habel6580_Act06) + actFuncArr[9] = REGIST_FUNC(ai, goal, Habel6580_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, Habel6580_Act10) + actFuncArr[13] = REGIST_FUNC(ai, goal, Habel6580_Act13) + actFuncArr[17] = REGIST_FUNC(ai, goal, Habel6580_Act17) + actFuncArr[20] = REGIST_FUNC(ai, goal, Habel6580_Act20) + local atkAfterFunc = REGIST_FUNC(ai, goal, Habel6580_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function Habel6580_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function Habel6580_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_Atk_max +function Habel6580_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = Backstep_Atk_max + local DashDist = Backstep_Atk_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Habel6580_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 1, POINT_INITIAL, 0.1, TARGET_ENE_0, false, -1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR_min = Whand_jyaku_max +function Habel6580_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Whand_jyaku_max + local DashDist = Whand_jyaku_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Whand_kyou_max +function Habel6580_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Whand_kyou_max + local DashDist = Whand_kyou_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_AtkW_max +function Habel6580_Act13(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Backstep_AtkW_max + local DashDist = Backstep_AtkW_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function Habel6580_Act17(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalL, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Habel6580_Act20(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(2, 2.5), TARGET_SELF, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, 4) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Habel6580_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 100 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + end + return +end + +function Habel6580Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Habel6580Battle_Terminate(ai, goal) + return +end + +NormalR_min = LargeR_max +function Habel6580Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if not ai:IsInterupt(INTERUPT_Inside_ObserveArea) then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, POINT_INITIAL, 0.1, TARGET_ENE_0, True, -1) + return true + elseif ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 10 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, combRunDist, TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 80 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 10 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, combRunDist, TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_GuardBreak) then + local distGuardBreak_Act = 2 + local oddsGuardBreak_Act = 100 + if targetDist <= distGuardBreak_Act and fate <= oddsGuardBreak_Act then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 10 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, combRunDist, TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + end + return true + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + elseif ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + else + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/006590_battle.lua b/scripts_decompiled/006590_battle.lua new file mode 100644 index 0000000..b15a623 --- /dev/null +++ b/scripts_decompiled/006590_battle.lua @@ -0,0 +1,377 @@ +REGISTER_GOAL(GOAL_HeldKnight_laughtrec6590_Battle, "HeldKnight_laughtrec6590Battle") +local NormalR_min = 0 +local NormalR_max = 1.2 +local LargeR_min = 0 +local LargeR_max = 1.7 +local PushR_min = 0 +local PushR_max = 1 +local Magic_min = 8 +local Magic_max = 8 +local Magic2_min = 8 +local Magic2_max = 8 +local NPC_ATK_Parry_min = 0 +local NPC_ATK_Parry_max = 0.8 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 1 +local Rolling_Atk_min = 3 +local Rolling_Atk_max = 4 +REGISTER_GOAL_NO_UPDATE(GOAL_HeldKnight_laughtrec6590_Battle, 1) +function HeldKnight_laughtrec6590Battle_Activate(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local playerDist = ai:GetDist(TARGET_LOCALPLAYER) + local isFindTarget = ai:IsSearchTarget(TARGET_ENE_0) + local eventNo = ai:GetEventRequest(0) + local myThinkId = ai:GetNpcThinkParamID() + local PointFrontWall = 0 + if myThinkId == 6590 then + PointFrontOfWall = 1012997 + elseif myThinkId == 6591 then + PointFrontOfWall = 1002997 + end + if eventNo == 10 then + ai:SetEventMoveTarget(PointFrontOfWall) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 1, POINT_EVENT, 3, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 1, POINT_EVENT, 0.1, TARGET_SELF, true, -1) + elseif playerDist <= 0.1 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_LOCALPLAYER, 1, TARGET_LOCALPLAYER, true, -1) + elseif fate <= 85 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 1.5, TARGET_LOCALPLAYER, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(20, 25), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_Wait, 2, TARGET_LOCALPLAYER, 0, 0, 0) + end + elseif playerDist <= 0.4 then + if fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_LOCALPLAYER, 1, TARGET_LOCALPLAYER, true, -1) + elseif fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 1.5, TARGET_LOCALPLAYER, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(20, 25), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_Wait, 2, TARGET_LOCALPLAYER, 0, 0, 0) + end + elseif 20 <= playerDist or 10 <= targetDist or isFindTarget == false then + local walk = true + if 2.2 <= playerDist then + walk = false + end + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, TARGET_LOCALPLAYER, 1.2, TARGET_SELF, walk, -1) + else + HeldKnight_laughtrec6590_Battle(ai, goal) + end + return +end + +function HeldKnight_laughtrec6590_Battle(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local NormalR_Dist = 2 + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local MagicValue1 = 1 + local Magic1Limit = ai:GetNumber(0) + if 5 <= Magic1Limit or ai:HasSpecialEffectId(TARGET_SELF, 610) then + MagicValue1 = 0 + end + local MagicValue2 = 1 + local Magic2Limit = ai:GetNumber(1) + if 5 <= Magic2Limit or not not ai:HasSpecialEffectId(TARGET_SELF, 1800) or ai:HasSpecialEffectId(TARGET_SELF, 610) then + MagicValue2 = 0 + end + local MagicValue3 = 1 + local Magic3Limit = ai:GetNumber(2) + if 5 <= Magic3Limit or not not ai:HasSpecialEffectId(TARGET_SELF, 1800) or ai:HasSpecialEffectId(TARGET_SELF, 610) then + MagicValue3 = 0 + end + local hprate = ai:GetHpRate(TARGET_SELF) + local Kaifuku = 0 + if hprate <= 0.5 then + Kaifuku = 1 + end + if 8 <= targetDist then + actPerArr[1] = 15 + actPerArr[3] = 15 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 70 + actPerArr[7] = 0 + elseif 3 <= targetDist then + actPerArr[1] = 20 + actPerArr[3] = 20 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 60 + actPerArr[7] = 0 + elseif 1 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 10 + actPerArr[3] = 20 + actPerArr[4] = 20 + actPerArr[5] = 0 + actPerArr[6] = 0 + actPerArr[7] = 50 + else + actPerArr[1] = 20 + actPerArr[3] = 30 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 0 + actPerArr[7] = 50 + end + elseif ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 0 + actPerArr[3] = 15 + actPerArr[4] = 15 + actPerArr[5] = 20 + actPerArr[6] = 0 + actPerArr[7] = 50 + else + actPerArr[1] = 15 + actPerArr[3] = 15 + actPerArr[4] = 0 + actPerArr[5] = 20 + actPerArr[6] = 0 + actPerArr[7] = 50 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, HeldKnight_laughtrec6590_Act01) + actFuncArr[3] = REGIST_FUNC(ai, goal, HeldKnight_laughtrec6590_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, HeldKnight_laughtrec6590_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, HeldKnight_laughtrec6590_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, HeldKnight_laughtrec6590_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, HeldKnight_laughtrec6590_Act07) + local atkAfterFunc = REGIST_FUNC(ai, goal, HeldKnight_laughtrec6590_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function HeldKnight_laughtrec6590_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 0 + CommonNPC_ChangeWepL1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalL, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function HeldKnight_laughtrec6590_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 0 + CommonNPC_ChangeWepL1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + end + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function HeldKnight_laughtrec6590_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 0 + CommonNPC_ChangeWepL1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = NormalR_max +function HeldKnight_laughtrec6590_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 0 + CommonNPC_ChangeWepL1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Rolling_Atk_max +function HeldKnight_laughtrec6590_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Rolling_Atk_max + local DashDist = Rolling_Atk_max + 5 + local Odds_Guard = 0 + CommonNPC_ChangeWepL1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function HeldKnight_laughtrec6590_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepL2(ai, goal) + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(2, 2.5), TARGET_SELF, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, 4) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function HeldKnight_laughtrec6590_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 5 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate2 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepL, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 2) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepR, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 2) + end + elseif fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate <= 60 then + CommonNPC_ChangeWepL2(ai, goal) + if fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 6, TARGET_ENE_0, ai:GetRandam_Float(1.5, 3), TARGET_ENE_0, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + end + return +end + +function HeldKnight_laughtrec6590Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function HeldKnight_laughtrec6590Battle_Terminate(ai, goal) + return +end + +function HeldKnight_laughtrec6590Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local ParryDist = 3 + local ParryAng = 60 + local ParryThrowDist = 4 + local ParryThrowAng = 60 + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 80 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 40 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 10 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_ParryTiming) then + if targetDist <= ParryDist and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, ParryAng) and ai:IsTargetGuard(TARGET_SELF) == true then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_Parry, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + elseif ai:IsInterupt(INTERUPT_SuccessParry) and targetDist <= ParryThrowDist and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, ParryThrowAng) then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, TARGET_ENE_0, 1, TARGET_SELF, false, -1) + local life = ai:GetRandam_Float(0.3, 0.6) + goal:AddSubGoal(GOAL_COMMON_Wait, life, TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + return false +end + +return diff --git a/scripts_decompiled/006590_logic.lua b/scripts_decompiled/006590_logic.lua new file mode 100644 index 0000000..3690eb7 --- /dev/null +++ b/scripts_decompiled/006590_logic.lua @@ -0,0 +1,11 @@ +REGISTER_LOGIC_FUNC(LOGIC_ID_HeldKnight_laughtrec6590, "HeldKnight_laughtrec6590_Logic", "HeldKnight_laughtrec6590_Interupt") +function HeldKnight_laughtrec6590_Logic(ai) + ai:AddTopGoal(GOAL_HeldKnight_laughtrec6590_Battle, -1, 0, 0, 0, 0) + return +end + +function HeldKnight_laughtrec6590_Interupt(ai, goal) + return +end + +return diff --git a/scripts_decompiled/006600_battle.lua b/scripts_decompiled/006600_battle.lua new file mode 100644 index 0000000..98bd105 --- /dev/null +++ b/scripts_decompiled/006600_battle.lua @@ -0,0 +1,400 @@ +REGISTER_GOAL(GOAL_Licarl6600_Battle, "Licarl6600Battle") +local NormalR_min = 0 +local NormalR_max = 1.1 +local Bow_min = 8 +local Bow_max = 20 +local LargeR_min = 0 +local LargeR_max = 2 +local PushR_min = 0 +local PushR_max = 1 +local NPC_ATK_Parry_min = 0 +local NPC_ATK_Parry_max = 0.8 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 1.5 +local Rolling_Atk_min = 3.5 +local Rolling_Atk_max = 4.5 +REGISTER_GOAL_NO_UPDATE(GOAL_Licarl6600_Battle, 1) +function Licarl6600Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local targetDistY = ai:GetDistYSigned(TARGET_ENE_0) + local Jyaku = 1 + if targetDistY <= -0.4 then + Jyaku = 0 + end + if R_Wep == WEP_CATE_Bow then + if 10 <= targetDist then + actPerArr[2] = 100 + elseif 2.8 <= targetDist then + actPerArr[2] = 10 + actPerArr[9] = 90 + else + actPerArr[1] = 20 * Jyaku + actPerArr[3] = 35 + actPerArr[4] = 0 + actPerArr[5] = 20 * Jyaku + actPerArr[6] = 15 + actPerArr[7] = 0 + actPerArr[8] = 0 + actPerArr[9] = 10 + end + elseif 7.5 <= targetDist then + actPerArr[2] = 100 + elseif 5.2 <= targetDist then + actPerArr[1] = 15 * Jyaku + actPerArr[3] = 25 + actPerArr[4] = 15 + actPerArr[5] = 0 + actPerArr[6] = 15 + actPerArr[7] = 0 + actPerArr[8] = 0 + actPerArr[9] = 20 + elseif 2.8 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 0 * Jyaku + actPerArr[3] = 0 + actPerArr[4] = 10 + actPerArr[5] = 0 + actPerArr[7] = 10 + actPerArr[11] = 80 + else + actPerArr[1] = 20 * Jyaku + actPerArr[3] = 20 + actPerArr[4] = 20 + actPerArr[5] = 20 * Jyaku + actPerArr[7] = 20 + actPerArr[9] = 0 + actPerArr[11] = 0 + end + elseif 1 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 0 * Jyaku + actPerArr[3] = 25 + actPerArr[4] = 25 + actPerArr[5] = 0 + actPerArr[7] = 10 + actPerArr[9] = 0 + actPerArr[11] = 40 + else + actPerArr[1] = 30 * Jyaku + actPerArr[3] = 30 + actPerArr[4] = 10 + actPerArr[5] = 20 * Jyaku + actPerArr[7] = 10 + actPerArr[9] = 0 + actPerArr[11] = 0 + end + elseif ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 0 * Jyaku + actPerArr[3] = 25 + actPerArr[4] = 25 + actPerArr[5] = 0 + actPerArr[7] = 10 + actPerArr[8] = 10 + actPerArr[9] = 0 + actPerArr[11] = 30 + else + actPerArr[1] = 30 * Jyaku + actPerArr[3] = 30 + actPerArr[4] = 10 + actPerArr[5] = 10 * Jyaku + actPerArr[7] = 20 + actPerArr[8] = 10 + actPerArr[9] = 0 + actPerArr[11] = 0 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Licarl6600_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Licarl6600_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, Licarl6600_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, Licarl6600_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, Licarl6600_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, Licarl6600_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, Licarl6600_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, Licarl6600_Act08) + actFuncArr[9] = REGIST_FUNC(ai, goal, Licarl6600_Act09) + actFuncArr[11] = REGIST_FUNC(ai, goal, Licarl6600_Act11) + local atkAfterFunc = REGIST_FUNC(ai, goal, Licarl6600_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function Licarl6600_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Licarl6600_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + CommonNPC_ChangeWepR2(ai, goal) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Far, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function Licarl6600_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + end + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function Licarl6600_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 0 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = NormalR_max +function Licarl6600_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Rolling_Atk_max +function Licarl6600_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = Rolling_Atk_max + local DashDist = Rolling_Atk_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Licarl6600_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + CommonNPC_ChangeWepR1(ai, goal) + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(2, 2.5), TARGET_SELF, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, 4) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Licarl6600_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Licarl6600_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local FirstAttID = NPC_ATK_NormalR + local ComAttID = NPC_ATK_NormalR + local ShootNum = ai:GetRandam_Int(1, 3) + CommonNPC_ChangeWepR2(ai, goal) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, 10, TARGET_ENE_0, false, 4) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Far, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function Licarl6600_Act11(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, LargeR_max, TARGET_SELF, false, 4) + goal:AddSubGoal(GOAL_COMMON_TurnAround, 3, TARGET_ENE_0, AI_DIR_TYPE_B, 10, false, true, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_Atk_max +function Licarl6600_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 15 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, Backstep_Atk_max, TARGET_SELF, false, -1) + elseif fate <= 55 then + if fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 6, TARGET_ENE_0, ai:GetRandam_Float(1.5, 3), TARGET_ENE_0, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + end + return +end + +function Licarl6600Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Licarl6600Battle_Terminate(ai, goal) + return +end + +function Licarl6600Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local ParryDist = 2 + local ParryAng = 60 + local ParryThrowDist = 4 + local ParryThrowAng = 60 + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 40 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 40 + if targetDist < combRunDist then + if fate <= combRunPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + end + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 30 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_ParryTiming) then + if targetDist <= ParryDist and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, ParryAng) and ai:IsTargetGuard(TARGET_SELF) == true then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_Parry, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + elseif ai:IsInterupt(INTERUPT_SuccessParry) and targetDist <= ParryThrowDist and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, ParryThrowAng) then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, TARGET_ENE_0, 1, TARGET_SELF, false, -1) + local life = ai:GetRandam_Float(0.3, 0.6) + goal:AddSubGoal(GOAL_COMMON_Wait, life, TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 0.6, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + return false +end + +return diff --git a/scripts_decompiled/006610_battle.lua b/scripts_decompiled/006610_battle.lua new file mode 100644 index 0000000..3fee0c9 --- /dev/null +++ b/scripts_decompiled/006610_battle.lua @@ -0,0 +1,377 @@ +REGISTER_GOAL(GOAL_CrystalKnight6610_Battle, "CrystalKnight6610Battle") +local NormalR_min = 0 +local NormalR_max = 1.6 +local Guard_NormalR_min = 0 +local Guard_NormalR_max = 1.5 +local LargeR_min = 0 +local LargeR_max = 2.4 +local PushR_min = 0 +local PushR_max = 1 +local Magic_min = 8 +local Magic_max = 8 +local NPC_ATK_Parry_min = 0 +local NPC_ATK_Parry_max = 0.8 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 1.5 +local Rolling_Atk_min = 3.5 +local Rolling_Atk_max = 4.5 +REGISTER_GOAL_NO_UPDATE(GOAL_CrystalKnight6610_Battle, 1) +function CrystalKnight6610Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if 8 <= targetDist then + actPerArr[1] = 10 + actPerArr[3] = 20 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 70 + actPerArr[7] = 0 + actPerArr[8] = 0 + elseif 4.5 <= targetDist then + actPerArr[1] = 20 + actPerArr[3] = 20 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 60 + actPerArr[7] = 0 + actPerArr[8] = 0 + elseif 2.8 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 0 + actPerArr[2] = 30 + actPerArr[3] = 20 + actPerArr[4] = 10 + actPerArr[5] = 0 + actPerArr[6] = 0 + actPerArr[7] = 40 + actPerArr[8] = 0 + else + actPerArr[1] = 20 + actPerArr[2] = 0 + actPerArr[3] = 30 + actPerArr[4] = 0 + actPerArr[5] = 20 + actPerArr[6] = 0 + actPerArr[7] = 30 + actPerArr[8] = 0 + end + elseif 1 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 0 + actPerArr[2] = 30 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 10 + actPerArr[6] = 0 + actPerArr[7] = 50 + actPerArr[8] = 10 + else + actPerArr[1] = 22 + actPerArr[2] = 0 + actPerArr[3] = 22 + actPerArr[4] = 0 + actPerArr[5] = 16 + actPerArr[6] = 0 + actPerArr[7] = 30 + actPerArr[8] = 10 + end + elseif ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 0 + actPerArr[2] = 18 + actPerArr[3] = 0 + actPerArr[4] = 12 + actPerArr[5] = 0 + actPerArr[6] = 0 + actPerArr[7] = 60 + actPerArr[8] = 10 + else + actPerArr[1] = 20 + actPerArr[2] = 0 + actPerArr[3] = 20 + actPerArr[4] = 0 + actPerArr[5] = 20 + actPerArr[6] = 0 + actPerArr[7] = 30 + actPerArr[8] = 10 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, CrystalKnight6610_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, CrystalKnight6610_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, CrystalKnight6610_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, CrystalKnight6610_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, CrystalKnight6610_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, CrystalKnight6610_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, CrystalKnight6610_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, CrystalKnight6610_Act08) + actFuncArr[9] = REGIST_FUNC(ai, goal, CrystalKnight6610_Act09) + local atkAfterFunc = REGIST_FUNC(ai, goal, CrystalKnight6610_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function CrystalKnight6610_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 100 + CommonNPC_ChangeWepL1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function CrystalKnight6610_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, LargeR_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_TurnAround, 2, TARGET_ENE_0, AI_DIR_TYPE_B, 10, false, true, 4) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function CrystalKnight6610_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + CommonNPC_ChangeWepL1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + end + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function CrystalKnight6610_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 100 + CommonNPC_ChangeWepL1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = NormalR_max +function CrystalKnight6610_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 100 + CommonNPC_ChangeWepL1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Rolling_Atk_max +function CrystalKnight6610_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Rolling_Atk_max + local DashDist = Rolling_Atk_max + 5 + local Odds_Guard = 100 + CommonNPC_ChangeWepL1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function CrystalKnight6610_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepL1(ai, goal) + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(2, 2.5), TARGET_SELF, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, 4) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function CrystalKnight6610_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + CommonNPC_ChangeWepL1(ai, goal) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR_min = Magic_min +function CrystalKnight6610_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic1Limit = ai:GetNumber(2) + CommonNPC_ChangeWepL2(ai, goal) + if targetDist <= Magic_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, Magic_min, TARGET_ENE_0, false, -1) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicL, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicL, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + ai:SetTimer(1, 62) + ai:SetNumber(2, Magic1Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function CrystalKnight6610_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 5 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate2 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepL, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 2) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepR, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 2) + end + elseif fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate <= 60 then + if fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 6, TARGET_ENE_0, ai:GetRandam_Float(1.5, 3), TARGET_ENE_0, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + end + return +end + +function CrystalKnight6610Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function CrystalKnight6610Battle_Terminate(ai, goal) + return +end + +function CrystalKnight6610Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local ParryDist = 3 + local ParryAng = 60 + local ParryThrowDist = 4 + local ParryThrowAng = 60 + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 80 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 40 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 10 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_ParryTiming) then + if targetDist <= ParryDist and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, ParryAng) and ai:IsTargetGuard(TARGET_SELF) == true then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_Parry, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + elseif ai:IsInterupt(INTERUPT_SuccessParry) and targetDist <= ParryThrowDist and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, ParryThrowAng) then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, TARGET_ENE_0, 1, TARGET_SELF, false, -1) + local life = ai:GetRandam_Float(0.3, 0.6) + goal:AddSubGoal(GOAL_COMMON_Wait, life, TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + return false +end + +return diff --git a/scripts_decompiled/006620_battle.lua b/scripts_decompiled/006620_battle.lua new file mode 100644 index 0000000..2017902 --- /dev/null +++ b/scripts_decompiled/006620_battle.lua @@ -0,0 +1,199 @@ +REGISTER_GOAL(GOAL_Sister_of_Kuragu6620_Battle, "Sister_of_Kuragu6620Battle") +local PushR_min = 0 +local PushR_max = 1 +local NormalR2_min = 0 +local NormalR2_max = 1 +local LargeR2_min = 0 +local LargeR2_max = 1.1 +local Backstep_Atk2_min = 0 +local Backstep_Atk2_max = 1 +local Magic_min = 7 +local Magic_max = 7 +local Magic2_min = 4 +local Magic2_max = 4 +local Magic3_min = 5 +local Magic3_max = 5 +REGISTER_GOAL_NO_UPDATE(GOAL_Sister_of_Kuragu6620_Battle, 1) +function Sister_of_Kuragu6620Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local BothHandOff = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if 4 <= targetDist then + actPerArr[18] = 30 + actPerArr[19] = 50 + actPerArr[20] = 20 + elseif 1 <= targetDist then + actPerArr[18] = 35 + actPerArr[19] = 30 + actPerArr[20] = 35 + else + actPerArr[18] = 30 + actPerArr[19] = 30 + actPerArr[20] = 40 + end + actFuncArr[18] = REGIST_FUNC(ai, goal, Sister_of_Kuragu6620_Act18) + actFuncArr[19] = REGIST_FUNC(ai, goal, Sister_of_Kuragu6620_Act19) + actFuncArr[20] = REGIST_FUNC(ai, goal, Sister_of_Kuragu6620_Act20) + local atkAfterFunc = REGIST_FUNC(ai, goal, Sister_of_Kuragu6620_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +PushR_min = Magic_max +PushR_min = Magic_min +function Sister_of_Kuragu6620_Act18(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic1Limit = ai:GetNumber(0) + CommonNPC_ChangeWepR1(ai, goal) + ai:ChangeEquipMagic(0) + if Magic_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2.5, TARGET_ENE_0, Magic_max, TARGET_SELF, false, -1) + elseif targetDist <= Magic_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, Magic_min, TARGET_ENE_0, false, -1) + end + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 1.5, 90) + ai:SetNumber(0, Magic1Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +PushR_min = Magic2_max +PushR_min = Magic2_min +function Sister_of_Kuragu6620_Act19(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic2Limit = ai:GetNumber(1) + CommonNPC_ChangeWepR1(ai, goal) + ai:ChangeEquipMagic(1) + if Magic2_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2.5, TARGET_ENE_0, Magic2_max, TARGET_SELF, false, -1) + elseif targetDist <= Magic2_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, Magic2_min, TARGET_ENE_0, false, -1) + end + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 1.5, 90) + ai:SetNumber(1, Magic2Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +PushR_min = Magic3_max +PushR_min = Magic3_min +function Sister_of_Kuragu6620_Act20(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic3Limit = ai:GetNumber(2) + CommonNPC_ChangeWepR1(ai, goal) + ai:ChangeEquipMagic(2) + if Magic3_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2.5, TARGET_ENE_0, Magic3_max, TARGET_SELF, false, -1) + elseif targetDist <= Magic3_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, Magic3_min, TARGET_ENE_0, false, -1) + end + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 1.5, 90) + ai:SetNumber(2, Magic3Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Sister_of_Kuragu6620_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + end + return +end + +function Sister_of_Kuragu6620Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Sister_of_Kuragu6620Battle_Terminate(ai, goal) + return +end + +function Sister_of_Kuragu6620Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 10 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 10 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 10 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/006640_battle.lua b/scripts_decompiled/006640_battle.lua new file mode 100644 index 0000000..a10fea7 --- /dev/null +++ b/scripts_decompiled/006640_battle.lua @@ -0,0 +1,328 @@ +REGISTER_GOAL(GOAL_DarkMoon_Juu6640_Battle, "DarkMoon_Juu6640Battle") +local NormalR_min = 0 +local NormalR_max = 2.6 +local LargeR_min = 0 +local LargeR_max = 3 +local Whand_jyaku_min = 0 +local Whand_jyaku_max = 2.3 +local Whand_kyou_min = 0 +local Whand_kyou_max = 3 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 1.5 +local Backstep_AtkW_min = 0 +local Backstep_AtkW_max = 1.5 +local PushR_min = 0 +local PushR_max = 1 +REGISTER_GOAL_NO_UPDATE(GOAL_DarkMoon_Juu6640_Battle, 1) +function DarkMoon_Juu6640Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local BothHandOff = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local RYOUTE_odds = 1 + local KATATE_odds = 1 + if ai:IsTargetGuard(TARGET_ENE_0) == true then + RYOUTE_odds = 10 + end + if 8 <= targetDist then + actPerArr[1] = 35 * KATATE_odds + actPerArr[2] = 35 * KATATE_odds + actPerArr[9] = 35 * RYOUTE_odds + actPerArr[10] = 35 * RYOUTE_odds + actPerArr[20] = 30 * RYOUTE_odds + elseif 3.5 <= targetDist then + actPerArr[1] = 30 * KATATE_odds + actPerArr[2] = 30 * KATATE_odds + actPerArr[9] = 30 * RYOUTE_odds + actPerArr[10] = 30 * RYOUTE_odds + actPerArr[20] = 40 * RYOUTE_odds + elseif 1.5 <= targetDist then + actPerArr[1] = 32 * KATATE_odds + actPerArr[2] = 33 * KATATE_odds + actPerArr[9] = 32 * RYOUTE_odds + actPerArr[10] = 33 * RYOUTE_odds + actPerArr[17] = 30 * RYOUTE_odds + actPerArr[20] = 35 * RYOUTE_odds + elseif 1 <= targetDist then + actPerArr[1] = 18 * KATATE_odds + actPerArr[2] = 17 * KATATE_odds + actPerArr[5] = 15 * KATATE_odds + actPerArr[9] = 10 * RYOUTE_odds + actPerArr[10] = 10 * RYOUTE_odds + actPerArr[13] = 13 * KATATE_odds + actPerArr[17] = 30 * RYOUTE_odds + else + actPerArr[1] = 17 * KATATE_odds + actPerArr[2] = 18 * KATATE_odds + actPerArr[5] = 15 * KATATE_odds + actPerArr[9] = 17 * RYOUTE_odds + actPerArr[10] = 18 * RYOUTE_odds + actPerArr[13] = 15 * KATATE_odds + actPerArr[17] = 20 * RYOUTE_odds + actPerArr[20] = 30 * RYOUTE_odds + end + actFuncArr[1] = REGIST_FUNC(ai, goal, DarkMoon_Juu6640_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, DarkMoon_Juu6640_Act02) + actFuncArr[5] = REGIST_FUNC(ai, goal, DarkMoon_Juu6640_Act05) + actFuncArr[9] = REGIST_FUNC(ai, goal, DarkMoon_Juu6640_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, DarkMoon_Juu6640_Act10) + actFuncArr[13] = REGIST_FUNC(ai, goal, DarkMoon_Juu6640_Act13) + actFuncArr[17] = REGIST_FUNC(ai, goal, DarkMoon_Juu6640_Act17) + actFuncArr[20] = REGIST_FUNC(ai, goal, DarkMoon_Juu6640_Act20) + local atkAfterFunc = REGIST_FUNC(ai, goal, DarkMoon_Juu6640_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function DarkMoon_Juu6640_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function DarkMoon_Juu6640_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_Atk_max +function DarkMoon_Juu6640_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = Backstep_Atk_max + local DashDist = Backstep_Atk_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Whand_jyaku_max +function DarkMoon_Juu6640_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Whand_jyaku_max + local DashDist = Whand_jyaku_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Whand_kyou_max +function DarkMoon_Juu6640_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Whand_kyou_max + local DashDist = Whand_kyou_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_AtkW_max +function DarkMoon_Juu6640_Act13(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Backstep_AtkW_max + local DashDist = Backstep_AtkW_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function DarkMoon_Juu6640_Act17(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalL, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function DarkMoon_Juu6640_Act20(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(2, 2.5), TARGET_SELF, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, 4) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function DarkMoon_Juu6640_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 100 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + end + return +end + +function DarkMoon_Juu6640Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function DarkMoon_Juu6640Battle_Terminate(ai, goal) + return +end + +NormalR_min = LargeR_max +function DarkMoon_Juu6640Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 10 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, combRunDist, TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 80 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 10 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, combRunDist, TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_GuardBreak) then + local distGuardBreak_Act = 2 + local oddsGuardBreak_Act = 100 + if targetDist <= distGuardBreak_Act and fate <= oddsGuardBreak_Act then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 10 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, combRunDist, TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + end + return true + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + elseif ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/006650_battle.lua b/scripts_decompiled/006650_battle.lua new file mode 100644 index 0000000..6c5b644 --- /dev/null +++ b/scripts_decompiled/006650_battle.lua @@ -0,0 +1,345 @@ +REGISTER_GOAL(GOAL_DarkMoon_Kei6650_Battle, "DarkMoon_Kei6650Battle") +local NormalR_min = 0 +local NormalR_max = 2.1 +local LargeR_min = 0 +local LargeR_max = 2.4 +local PushR_min = 0 +local PushR_max = 1 +local NPC_ATK_Parry_min = 0 +local NPC_ATK_Parry_max = 0.8 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 1 +local Rolling_Atk_min = 3.5 +local Rolling_Atk_max = 4.5 +REGISTER_GOAL_NO_UPDATE(GOAL_DarkMoon_Kei6650_Battle, 1) +function DarkMoon_Kei6650Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if 8 <= targetDist then + actPerArr[1] = 10 + actPerArr[3] = 20 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 70 + actPerArr[7] = 0 + actPerArr[8] = 0 + elseif 4.5 <= targetDist then + actPerArr[1] = 20 + actPerArr[3] = 20 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 60 + actPerArr[7] = 0 + actPerArr[8] = 0 + elseif 2.1 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 0 + actPerArr[2] = 30 + actPerArr[3] = 20 + actPerArr[4] = 10 + actPerArr[5] = 0 + actPerArr[6] = 0 + actPerArr[7] = 40 + actPerArr[8] = 0 + else + actPerArr[1] = 20 + actPerArr[2] = 0 + actPerArr[3] = 30 + actPerArr[4] = 0 + actPerArr[5] = 20 + actPerArr[6] = 0 + actPerArr[7] = 30 + actPerArr[8] = 0 + end + elseif 1 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 0 + actPerArr[2] = 30 + actPerArr[3] = 0 + actPerArr[4] = 15 + actPerArr[5] = 10 + actPerArr[6] = 0 + actPerArr[7] = 35 + actPerArr[8] = 10 + else + actPerArr[1] = 22 + actPerArr[2] = 0 + actPerArr[3] = 22 + actPerArr[4] = 0 + actPerArr[5] = 16 + actPerArr[6] = 0 + actPerArr[7] = 30 + actPerArr[8] = 10 + end + elseif ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 0 + actPerArr[2] = 18 + actPerArr[3] = 0 + actPerArr[4] = 22 + actPerArr[5] = 0 + actPerArr[6] = 0 + actPerArr[7] = 50 + actPerArr[8] = 10 + else + actPerArr[1] = 15 + actPerArr[2] = 0 + actPerArr[3] = 15 + actPerArr[4] = 0 + actPerArr[5] = 20 + actPerArr[6] = 0 + actPerArr[7] = 40 + actPerArr[8] = 10 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, DarkMoon_Kei6650_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, DarkMoon_Kei6650_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, DarkMoon_Kei6650_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, DarkMoon_Kei6650_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, DarkMoon_Kei6650_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, DarkMoon_Kei6650_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, DarkMoon_Kei6650_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, DarkMoon_Kei6650_Act08) + local atkAfterFunc = REGIST_FUNC(ai, goal, DarkMoon_Kei6650_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function DarkMoon_Kei6650_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 100 + CommonNPC_ChangeWepL1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function DarkMoon_Kei6650_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, LargeR_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_TurnAround, 2, TARGET_ENE_0, AI_DIR_TYPE_B, 10, false, true, 4) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function DarkMoon_Kei6650_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + CommonNPC_ChangeWepL1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + end + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function DarkMoon_Kei6650_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 100 + CommonNPC_ChangeWepL1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = NormalR_max +function DarkMoon_Kei6650_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 100 + CommonNPC_ChangeWepL1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Rolling_Atk_max +function DarkMoon_Kei6650_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Rolling_Atk_max + local DashDist = Rolling_Atk_max + 5 + local Odds_Guard = 100 + CommonNPC_ChangeWepL1(ai, goal) + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function DarkMoon_Kei6650_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepL1(ai, goal) + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(2, 2.5), TARGET_SELF, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, 4) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function DarkMoon_Kei6650_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + CommonNPC_ChangeWepL1(ai, goal) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function DarkMoon_Kei6650_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate <= 85 then + if fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 6, TARGET_ENE_0, ai:GetRandam_Float(1.5, 3), TARGET_ENE_0, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + end + return +end + +function DarkMoon_Kei6650Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function DarkMoon_Kei6650Battle_Terminate(ai, goal) + return +end + +function DarkMoon_Kei6650Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local ParryDist = 3 + local ParryAng = 60 + local ParryThrowDist = 4 + local ParryThrowAng = 60 + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 80 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 40 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 10 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_ParryTiming) then + if targetDist <= ParryDist and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, ParryAng) and ai:IsTargetGuard(TARGET_SELF) == true then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_Parry, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + elseif ai:IsInterupt(INTERUPT_SuccessParry) and targetDist <= ParryThrowDist and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, ParryThrowAng) then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, TARGET_ENE_0, 1, TARGET_SELF, false, -1) + local life = ai:GetRandam_Float(0.3, 0.6) + goal:AddSubGoal(GOAL_COMMON_Wait, life, TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + return false +end + +return diff --git a/scripts_decompiled/006740_battle.lua b/scripts_decompiled/006740_battle.lua new file mode 100644 index 0000000..dfa5631 --- /dev/null +++ b/scripts_decompiled/006740_battle.lua @@ -0,0 +1,923 @@ +REGISTER_GOAL(GOAL_Kiaran6740_Battle, "Kiaran6740Battle") +local NormalR_min = 0 +local NormalR_max = 1.2 +local LargeR_min = 0 +local LargeR_max = 1.8 +local NormalL_min = 0 +local NormalL_max = 2 +local LargeL_min = 0 +local LargeL_max = 1.6 +local PushR_min = 0 +local PushR_max = 1 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 1.5 +local Rolling_Atk_min = 3 +local Rolling_Atk_max = 5 +local UseItem_min = 3 +local UseItem_max = 10 +REGISTER_GOAL_NO_UPDATE(GOAL_Kiaran6740_Battle, 1) +function OnIf_6740(ai, goal, codeNo) + if codeNo == 0 then + Kiaran6740_ActAfter(ai, goal) + end + return +end + +function Kiaran6740Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + CommonNPC_ChangeWepR2(ai, goal) + CommonNPC_ChangeWepL2(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if 8 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[2] = 10 + actPerArr[3] = 5 + actPerArr[8] = 0 + actPerArr[9] = 5 + actPerArr[10] = 10 + actPerArr[11] = 10 + actPerArr[13] = 10 + actPerArr[14] = 0 + actPerArr[15] = 0 + actPerArr[16] = 30 + actPerArr[17] = 0 + actPerArr[20] = 20 + else + actPerArr[1] = 10 + actPerArr[2] = 10 + actPerArr[3] = 10 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 30 + actPerArr[7] = 0 + actPerArr[8] = 0 + actPerArr[9] = 10 + actPerArr[10] = 10 + actPerArr[20] = 20 + end + elseif 5 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[2] = 5 + actPerArr[3] = 5 + actPerArr[8] = 0 + actPerArr[9] = 10 + actPerArr[10] = 10 + actPerArr[11] = 10 + actPerArr[13] = 5 + actPerArr[14] = 0 + actPerArr[15] = 0 + actPerArr[16] = 25 + actPerArr[17] = 0 + actPerArr[20] = 30 + else + actPerArr[1] = 10 + actPerArr[2] = 10 + actPerArr[3] = 10 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 20 + actPerArr[7] = 0 + actPerArr[8] = 0 + actPerArr[9] = 10 + actPerArr[10] = 10 + actPerArr[20] = 30 + end + elseif 2.8 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[2] = 10 + actPerArr[3] = 10 + actPerArr[8] = 5 + actPerArr[9] = 0 + actPerArr[10] = 10 + actPerArr[11] = 10 + actPerArr[13] = 10 + actPerArr[14] = 0 + actPerArr[15] = 10 + actPerArr[16] = 10 + actPerArr[17] = 5 + actPerArr[20] = 20 + else + actPerArr[1] = 10 + actPerArr[2] = 15 + actPerArr[3] = 10 + actPerArr[4] = 0 + actPerArr[5] = 10 + actPerArr[6] = 10 + actPerArr[7] = 5 + actPerArr[8] = 5 + actPerArr[9] = 5 + actPerArr[10] = 10 + actPerArr[11] = 5 + actPerArr[13] = 5 + actPerArr[20] = 10 + end + elseif 1 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[2] = 10 + actPerArr[3] = 10 + actPerArr[8] = 5 + actPerArr[9] = 0 + actPerArr[10] = 5 + actPerArr[11] = 15 + actPerArr[13] = 15 + actPerArr[14] = 15 + actPerArr[15] = 5 + actPerArr[16] = 5 + actPerArr[17] = 10 + actPerArr[20] = 0 + else + actPerArr[1] = 5 + actPerArr[2] = 15 + actPerArr[3] = 10 + actPerArr[4] = 10 + actPerArr[5] = 10 + actPerArr[6] = 10 + actPerArr[7] = 10 + actPerArr[8] = 10 + actPerArr[9] = 0 + actPerArr[10] = 10 + actPerArr[20] = 0 + end + elseif ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[2] = 10 + actPerArr[3] = 10 + actPerArr[8] = 5 + actPerArr[9] = 0 + actPerArr[10] = 10 + actPerArr[11] = 10 + actPerArr[13] = 15 + actPerArr[14] = 15 + actPerArr[15] = 20 + actPerArr[16] = 0 + actPerArr[17] = 5 + actPerArr[20] = 0 + else + actPerArr[1] = 10 + actPerArr[2] = 15 + actPerArr[3] = 15 + actPerArr[4] = 15 + actPerArr[5] = 10 + actPerArr[6] = 5 + actPerArr[7] = 10 + actPerArr[8] = 10 + actPerArr[9] = 0 + actPerArr[10] = 10 + actPerArr[20] = 0 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Kiaran6740_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Kiaran6740_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, Kiaran6740_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, Kiaran6740_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, Kiaran6740_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, Kiaran6740_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, Kiaran6740_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, Kiaran6740_Act08) + actFuncArr[9] = REGIST_FUNC(ai, goal, Kiaran6740_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, Kiaran6740_Act10) + actFuncArr[11] = REGIST_FUNC(ai, goal, Kiaran6740_Act11) + actFuncArr[13] = REGIST_FUNC(ai, goal, Kiaran6740_Act13) + actFuncArr[14] = REGIST_FUNC(ai, goal, Kiaran6740_Act14) + actFuncArr[15] = REGIST_FUNC(ai, goal, Kiaran6740_Act15) + actFuncArr[16] = REGIST_FUNC(ai, goal, Kiaran6740_Act16) + actFuncArr[17] = REGIST_FUNC(ai, goal, Kiaran6740_Act17) + actFuncArr[20] = REGIST_FUNC(ai, goal, Kiaran6740_Act20) + local atkAfterFunc = REGIST_FUNC(ai, goal, Kiaran6740_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function Kiaran6740_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if targetDist <= 2 and ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + end + CommonNPC_SwitchOneHandMode(ai, goal) + local AppDist = NormalR_max + local DashDist = NormalR_max + 2 + local AttDist = NormalR_max + 0.5 + local Odds_Guard = 0 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate2 > 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 0.4, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(60, 60), true, true, -1) + end + if fate <= 15 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 1.5, 90) + elseif fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, AttDist, 90, 90) + elseif fate <= 55 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 90, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, AttDist, 90, 90) + elseif fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NomalL, TARGET_ENE_0, AttDist, 90, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalL, TARGET_ENE_0, AttDist, 90, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, AttDist, 90, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = NormalL_max +function Kiaran6740_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if targetDist <= 2 and ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + end + CommonNPC_SwitchOneHandMode(ai, goal) + local AppDist = NormalL_max + local DashDist = NormalL_max + 2 + local AttDist = NormalL_max + 0.5 + local Odds_Guard = 0 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate2 > 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 0.3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(60, 60), true, true, -1) + end + if fate <= 25 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalL, TARGET_ENE_0, AttDist, 1.5, 90) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalL, TARGET_ENE_0, AttDist, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, AttDist, 90, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalL, TARGET_ENE_0, AttDist, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_Parry, TARGET_ENE_0, AttDist, 90, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, AttDist, 90, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeL_max +function Kiaran6740_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if targetDist <= 2 and ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + end + CommonNPC_SwitchOneHandMode(ai, goal) + local AppDist = LargeL_max + local DashDist = LargeL_max + 2 + local AttDist = LargeL_max + 0.5 + local Odds_Guard = 0 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate2 > 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 0.3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(60, 60), true, true, -1) + end + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_Parry, TARGET_ENE_0, AttDist, 1.5, 90) + elseif fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_Parry, TARGET_ENE_0, AttDist, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, AttDist, 90, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_Parry, TARGET_ENE_0, AttDist, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_Parry, TARGET_ENE_0, AttDist, 90, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function Kiaran6740_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if targetDist <= 2 and ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + end + CommonNPC_SwitchOneHandMode(ai, goal) + local AppDist = PushR_max + local DashDist = PushR_max + 2 + local AttDist = PushR_max + 0.5 + local Odds_Guard = 0 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, AttDist, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 90, 90) + elseif fate <= 65 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, AttDist, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, AttDist, 90, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, AttDist, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalL, TARGET_ENE_0, AttDist, 90, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = NormalR_max +NormalR_min = UseItem_min +function Kiaran6740_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if targetDist <= 2 and ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + end + CommonNPC_SwitchOneHandMode(ai, goal) + local AppDist = NormalR_max + local DashDist = NormalR_max + 2 + local AttDist = NormalR_max + 0.5 + local Odds_Guard = 0 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 90, 90) + elseif fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 90, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalL, TARGET_ENE_0, AttDist, 90, 90) + elseif fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 90, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_Parry, TARGET_ENE_0, AttDist, 90, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + if UseItem_min <= targetDist then + if not ai:HasSpecialEffectId(TARGET_ENE_0, 3151) and ai:GetNumber(1) <= 99 then + ai:ChangeEquipItem(1) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_Item, TARGET_ENE_0, DIST_None, 1.5, 90) + ai:SetNumber(0, ai:GetNumber(1) + 1) + elseif ai:GetNumber(0) <= 99 then + ai:ChangeEquipItem(0) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_Item, TARGET_ENE_0, DIST_None, 1.5, 90) + ai:SetNumber(0, ai:GetNumber(0) + 1) + end + end + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Rolling_Atk_max +function Kiaran6740_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if targetDist <= 2 and ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + end + CommonNPC_SwitchOneHandMode(ai, goal) + local AppDist = Rolling_Atk_max + local DashDist = Rolling_Atk_max + 2 + local AttDist = Rolling_Atk_max + 0.5 + local Odds_Guard = 0 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 35 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 90, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, AttDist, 90, 90) + elseif fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalL, TARGET_ENE_0, AttDist, 90, 90) + elseif fate <= 65 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_Parry, TARGET_ENE_0, AttDist, 90, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 90, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 90, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, AttDist, 90, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = NormalR_max +NormalR_min = UseItem_min +function Kiaran6740_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if targetDist <= 2 and ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + end + CommonNPC_SwitchOneHandMode(ai, goal) + local AppDist = NormalR_max + local DashDist = NormalR_max + 2 + local AttDist = NormalR_max + 0.5 + local Odds_Guard = 0 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate2 > 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 0.3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(60, 60), true, true, -1) + end + if fate <= 15 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 90, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 90, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, AttDist, 90, 90) + elseif fate <= 15 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 90, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 90, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalL, TARGET_ENE_0, AttDist, 90, 90) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 90, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 90, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_Parry, TARGET_ENE_0, AttDist, 90, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 90, 90) + if ai:GetNumber(0) <= 99 and UseItem_min <= targetDist then + ai:ChangeEquipItem(0) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_Item, TARGET_ENE_0, DIST_None, 90, 90) + ai:SetNumber(0, ai:GetNumber(0) + 1) + end + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Kiaran6740_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Kiaran6740_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if 6 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 6, TARGET_ENE_0, ai:GetRandam_Float(5, 6), TARGET_SELF, false, -1) + elseif targetDist <= 4 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 6, TARGET_ENE_0, ai:GetRandam_Float(5, 6), TARGET_ENE_0, true, -1) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(2.5, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, -1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function Kiaran6740_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if targetDist <= 2 and ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + end + CommonNPC_SwitchOneHandMode(ai, goal) + local AppDist = LargeR_max + local DashDist = LargeR_max + 2 + local AttDist = LargeR_max + 0.5 + local Odds_Guard = 0 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate2 > 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 0.3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(60, 60), true, true, -1) + end + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, AttDist, 1.5, 90) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR_min = NormalR_max +function Kiaran6740_Act11(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if targetDist <= 2 and not ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + end + CommonNPC_SwitchBothHandMode(ai, goal) + local AppDist = NormalR_max + local DashDist = NormalR_max + 2 + local AttDist = NormalR_max + 0.5 + local Odds_Guard = 0 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate2 > 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 0.3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(60, 60), true, true, -1) + end + if fate <= 25 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 1.5, 90) + elseif fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, AttDist, 90, 90) + elseif fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 90, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 90, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, AttDist, 90, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeL_max +function Kiaran6740_Act13(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if targetDist <= 2 and not ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + end + CommonNPC_SwitchBothHandMode(ai, goal) + local AppDist = LargeL_max + local DashDist = LargeL_max + 2 + local AttDist = LargeL_max + 0.5 + local Odds_Guard = 0 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate2 > 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 0.3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(60, 60), true, true, -1) + end + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, AttDist, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function Kiaran6740_Act14(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if targetDist <= 2 and not ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + end + CommonNPC_SwitchBothHandMode(ai, goal) + local AppDist = PushR_max + local DashDist = PushR_max + 2 + local AttDist = PushR_max + 0.5 + local Odds_Guard = 0 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, AttDist, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 90, 90) + elseif fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, AttDist, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, AttDist, 90, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, AttDist, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 90, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, AttDist, 90, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = NormalR_max +NormalR_min = UseItem_min +function Kiaran6740_Act15(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if targetDist <= 2 and not ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + end + CommonNPC_SwitchBothHandMode(ai, goal) + local AppDist = NormalR_max + local DashDist = NormalR_max + 2 + local AttDist = NormalR_max + 0.5 + local Odds_Guard = 0 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 90, 90) + elseif fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 90, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 90, 90) + elseif fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 90, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, AttDist, 90, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + if UseItem_min <= targetDist then + if not ai:HasSpecialEffectId(TARGET_ENE_0, 3151) and ai:GetNumber(1) <= 99 then + ai:ChangeEquipItem(1) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_Item, TARGET_ENE_0, DIST_None, 1.5, 90) + ai:SetNumber(0, ai:GetNumber(1) + 1) + elseif ai:GetNumber(0) <= 99 then + ai:ChangeEquipItem(0) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_Item, TARGET_ENE_0, DIST_None, 1.5, 90) + ai:SetNumber(0, ai:GetNumber(0) + 1) + end + end + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Rolling_Atk_max +function Kiaran6740_Act16(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if targetDist <= 2 and not ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + end + CommonNPC_SwitchBothHandMode(ai, goal) + local AppDist = Rolling_Atk_max + local DashDist = Rolling_Atk_max + 2 + local AttDist = Rolling_Atk_max + 0.5 + local Odds_Guard = 0 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 90, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, AttDist, 90, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 90, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 90, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, AttDist, 90, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = NormalR_max +NormalR_min = UseItem_min +function Kiaran6740_Act17(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if targetDist <= 2 and not ai:IsBothHandMode(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + end + CommonNPC_SwitchBothHandMode(ai, goal) + local AppDist = NormalR_max + local DashDist = NormalR_max + 2 + local AttDist = NormalR_max + 0.5 + local Odds_Guard = 0 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate2 > 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 0.3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(60, 60), true, true, -1) + end + if fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 90, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 90, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, AttDist, 90, 90) + elseif fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 90, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 90, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 90, 90) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 90, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, AttDist, 90, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, AttDist, 90, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + if UseItem_min <= targetDist then + if not ai:HasSpecialEffectId(TARGET_ENE_0, 3151) and ai:GetNumber(1) <= 99 then + ai:ChangeEquipItem(1) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_Item, TARGET_ENE_0, DIST_None, 1.5, 90) + ai:SetNumber(0, ai:GetNumber(1) + 1) + elseif ai:GetNumber(0) <= 99 then + ai:ChangeEquipItem(0) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_Item, TARGET_ENE_0, DIST_None, 1.5, 90) + ai:SetNumber(0, ai:GetNumber(0) + 1) + end + end + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = UseItem_max +function Kiaran6740_Act20(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local AppDist = UseItem_max + local DashDist = UseItem_max + 2 + local AttDist = UseItem_max + 0.5 + local Odds_Guard = 0 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if targetDist <= 5 then + if fate <= 35 then + if ai:GetNumber(0) <= 99 then + ai:ChangeEquipItem(0) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_Item, TARGET_ENE_0, DIST_None, 1.5, 90) + ai:SetNumber(0, ai:GetNumber(0) + 1) + end + elseif ai:GetNumber(1) <= 99 then + ai:ChangeEquipItem(1) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_Item, TARGET_ENE_0, DIST_None, 1.5, 90) + ai:SetNumber(1, ai:GetNumber(1) + 1) + end + elseif 10 > targetDist then + if fate <= 20 then + if ai:GetNumber(0) <= 99 then + ai:ChangeEquipItem(0) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_Item, TARGET_ENE_0, DIST_None, 1.5, 90) + ai:SetNumber(0, ai:GetNumber(0) + 1) + end + elseif ai:GetNumber(1) <= 99 then + ai:ChangeEquipItem(1) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_Item, TARGET_ENE_0, DIST_None, 1.5, 90) + ai:SetNumber(1, ai:GetNumber(1) + 1) + end + end + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Kiaran6740_ActAfter(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if targetDist <= 1.5 then + if fate <= 65 then + if fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate2 <= 85 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepL, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 2) + if fate3 <= 30 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + end + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepR, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 2) + if fate3 <= 30 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + end + end + elseif fate <= 100 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + end + elseif targetDist <= 2.5 then + if fate <= 70 then + if fate2 <= 20 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate2 <= 60 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepL, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 2) + if fate3 <= 30 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + end + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepR, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 2) + if fate3 <= 30 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + end + end + elseif fate <= 100 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + end + elseif targetDist <= 4 then + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Float(1.5, 2.5), TARGET_ENE_0, 10, TARGET_ENE_0, true, -1) + elseif fate <= 90 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, -1) + end + elseif fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Float(1, 2), TARGET_ENE_0, 10, TARGET_ENE_0, true, -1) + elseif fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(1.5, 2.5), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, -1) + end + return +end + +function Kiaran6740_ActAfter_AdjustSpace(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_If, 10, 2) + return +end + +function Kiaran6740Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Kiaran6740Battle_Terminate(ai, goal) + return +end + +NormalR_min = UseItem_max +NormalR_min = LargeR_max +function Kiaran6740Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 65 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if fate2 <= 15 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 65 + if targetDist < combRunDist then + if fate <= combRunPer then + goal:ClearSubGoal() + if fate2 <= 40 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + end + return true + end + end + local distUseItem_Act = 10 + local oddsUseItem_Act = 100 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + local AppDist = UseItem_max + local DashDist = UseItem_max + 2 + local AttDist = UseItem_max + 0.5 + local Odds_Guard = 0 + goal:ClearSubGoal() + if targetDist <= 4.5 then + CommonNPC_SwitchBothHandMode(ai, goal) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, 1.5, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, AttDist, 1.5, 90) + elseif targetDist <= 10 then + if ai:HasSpecialEffectId(TARGET_ENE_0, 3151) then + if ai:GetNumber(0) <= 99 then + ai:ChangeEquipItem(0) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_Item, TARGET_ENE_0, DIST_None, 1.5, 90) + ai:SetNumber(0, ai:GetNumber(0) + 1) + end + elseif ai:GetNumber(1) <= 99 then + ai:ChangeEquipItem(1) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_Item, TARGET_ENE_0, DIST_None, 1.5, 90) + ai:SetNumber(1, ai:GetNumber(1) + 1) + end + end + return true + elseif ai:IsInterupt(INTERUPT_GuardBreak) then + local distGuardBreak_Act = 2 + local oddsGuardBreak_Act = 100 + if targetDist <= distGuardBreak_Act and fate <= oddsGuardBreak_Act then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 50 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local AttDist = LargeR_max + 0.5 + local distResNear = 2.8 + local distResFar = 8 + local oddsResNear = 50 + local oddsResFar = 90 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:ClearSubGoal() + if fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpinComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, AttDist, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + elseif ResBehavID == 2 then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/006801_battle.lua b/scripts_decompiled/006801_battle.lua new file mode 100644 index 0000000..78fa908 --- /dev/null +++ b/scripts_decompiled/006801_battle.lua @@ -0,0 +1,368 @@ +REGISTER_GOAL(GOAL_BanditA6801_Battle, "BanditA6801Battle") +local NormalR_min = 0 +local NormalR_max = 1.5 +local LargeR_min = 0 +local LargeR_max = 1.7 +local Whand_jyaku_min = 0 +local Whand_jyaku_max = 1.5 +local Whand_kyou_min = 0 +local Whand_kyou_max = 1.7 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 1.4 +local Backstep_AtkW_min = 0 +local Backstep_AtkW_max = 1.7 +local Rolling_Atk_min = 3.5 +local Rolling_Atk_max = 4.5 +local Rolling_AtkW_min = 3.5 +local Rolling_AtkW_max = 4.5 +local PushR_min = 0 +local PushR_max = 1 +REGISTER_GOAL_NO_UPDATE(GOAL_BanditA6801_Battle, 1) +function BanditA6801Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local BothHandOff = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local RYOUTE_odds = 1 + local KATATE_odds = 1 + if ai:IsTargetGuard(TARGET_ENE_0) == true then + RYOUTE_odds = 10 + end + if 8 <= targetDist then + actPerArr[1] = 10 * KATATE_odds + actPerArr[2] = 20 * KATATE_odds + actPerArr[7] = 20 * KATATE_odds + actPerArr[9] = 10 * RYOUTE_odds + actPerArr[10] = 20 * RYOUTE_odds + actPerArr[15] = 20 * RYOUTE_odds + elseif 4 <= targetDist then + actPerArr[1] = 15 * KATATE_odds + actPerArr[2] = 15 * KATATE_odds + actPerArr[7] = 20 * KATATE_odds + actPerArr[9] = 10 * RYOUTE_odds + actPerArr[10] = 20 * RYOUTE_odds + actPerArr[15] = 20 * RYOUTE_odds + elseif 2.1 <= targetDist then + actPerArr[1] = 25 * KATATE_odds + actPerArr[2] = 25 * KATATE_odds + actPerArr[9] = 25 * RYOUTE_odds + actPerArr[10] = 25 * RYOUTE_odds + elseif 1 <= targetDist then + actPerArr[1] = 18 * KATATE_odds + actPerArr[2] = 17 * KATATE_odds + actPerArr[5] = 15 * KATATE_odds + actPerArr[9] = 10 * RYOUTE_odds + actPerArr[10] = 10 * RYOUTE_odds + actPerArr[13] = 13 * KATATE_odds + actPerArr[17] = 30 * RYOUTE_odds + else + actPerArr[1] = 15 * KATATE_odds + actPerArr[2] = 15 * KATATE_odds + actPerArr[5] = 10 * KATATE_odds + actPerArr[17] = 20 * RYOUTE_odds + actPerArr[20] = 10 * KATATE_odds + end + actFuncArr[1] = REGIST_FUNC(ai, goal, BanditA6801_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, BanditA6801_Act02) + actFuncArr[5] = REGIST_FUNC(ai, goal, BanditA6801_Act05) + actFuncArr[7] = REGIST_FUNC(ai, goal, BanditA6801_Act07) + actFuncArr[9] = REGIST_FUNC(ai, goal, BanditA6801_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, BanditA6801_Act10) + actFuncArr[13] = REGIST_FUNC(ai, goal, BanditA6801_Act13) + actFuncArr[14] = REGIST_FUNC(ai, goal, BanditA6801_Act14) + actFuncArr[15] = REGIST_FUNC(ai, goal, BanditA6801_Act15) + actFuncArr[17] = REGIST_FUNC(ai, goal, BanditA6801_Act17) + actFuncArr[20] = REGIST_FUNC(ai, goal, BanditA6801_Act20) + local atkAfterFunc = REGIST_FUNC(ai, goal, BanditA6801_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function BanditA6801_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function BanditA6801_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_Atk_max +function BanditA6801_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = Backstep_Atk_max + local DashDist = Backstep_Atk_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Rolling_Atk_max +function BanditA6801_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = Rolling_Atk_max + local DashDist = Rolling_Atk_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Whand_jyaku_max +function BanditA6801_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Whand_jyaku_max + local DashDist = Whand_jyaku_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Whand_kyou_max +function BanditA6801_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Whand_kyou_max + local DashDist = Whand_kyou_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_AtkW_max +function BanditA6801_Act13(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Backstep_AtkW_max + local DashDist = Backstep_AtkW_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Rolling_AtkW_max +function BanditA6801_Act15(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Rolling_AtkW_max + local DashDist = Rolling_AtkW_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function BanditA6801_Act17(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function BanditA6801_Act20(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function BanditA6801_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 5 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate2 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepL, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 2) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepR, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 2) + end + elseif fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 6, TARGET_ENE_0, ai:GetRandam_Float(1.5, 3), TARGET_ENE_0, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + return +end + +function BanditA6801Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function BanditA6801Battle_Terminate(ai, goal) + return +end + +NormalR_min = LargeR_max +function BanditA6801Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 10 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 80 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 10 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + end + end + if ai:IsInterupt(INTERUPT_GuardBreak) then + local distGuardBreak_Act = 2 + local oddsGuardBreak_Act = 100 + if targetDist <= distGuardBreak_Act and fate <= oddsGuardBreak_Act then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 10 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + else + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/006802_battle.lua b/scripts_decompiled/006802_battle.lua new file mode 100644 index 0000000..547c306 --- /dev/null +++ b/scripts_decompiled/006802_battle.lua @@ -0,0 +1,357 @@ +REGISTER_GOAL(GOAL_BanditB6802_Battle, "BanditB6802Battle") +local NormalR_min = 0 +local NormalR_max = 2.1 +local LargeR_min = 0 +local LargeR_max = 3.2 +local Whand_jyaku_min = 0 +local Whand_jyaku_max = 2.4 +local Whand_kyou_min = 0 +local Whand_kyou_max = 1.9 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 1.1 +local Backstep_AtkW_min = 0 +local Backstep_AtkW_max = 1 +local Rolling_Atk_min = 3.5 +local Rolling_Atk_max = 4.5 +local Rolling_AtkW_min = 4 +local Rolling_AtkW_max = 5 +local PushR_min = 0 +local PushR_max = 1 +REGISTER_GOAL_NO_UPDATE(GOAL_BanditB6802_Battle, 1) +function BanditB6802Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local BothHandOff = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local RYOUTE_odds = 1 + local KATATE_odds = 1 + if ai:IsTargetGuard(TARGET_ENE_0) == true then + RYOUTE_odds = 10 + end + if 8 <= targetDist then + actPerArr[1] = 20 * KATATE_odds + actPerArr[2] = 30 * KATATE_odds + actPerArr[7] = 10 * KATATE_odds + actPerArr[9] = 20 * RYOUTE_odds + actPerArr[10] = 30 * RYOUTE_odds + actPerArr[15] = 10 * RYOUTE_odds + elseif 4 <= targetDist then + actPerArr[1] = 25 * KATATE_odds + actPerArr[2] = 25 * KATATE_odds + actPerArr[7] = 10 * KATATE_odds + actPerArr[9] = 25 * RYOUTE_odds + actPerArr[10] = 25 * RYOUTE_odds + actPerArr[15] = 10 * RYOUTE_odds + elseif 2.1 <= targetDist then + actPerArr[1] = 25 * KATATE_odds + actPerArr[2] = 25 * KATATE_odds + actPerArr[9] = 25 * RYOUTE_odds + actPerArr[10] = 25 * RYOUTE_odds + elseif 1 <= targetDist then + actPerArr[1] = 18 * KATATE_odds + actPerArr[2] = 17 * KATATE_odds + actPerArr[5] = 15 * KATATE_odds + actPerArr[9] = 10 * RYOUTE_odds + actPerArr[10] = 10 * RYOUTE_odds + actPerArr[13] = 13 * KATATE_odds + actPerArr[17] = 30 * RYOUTE_odds + else + actPerArr[1] = 20 * KATATE_odds + actPerArr[2] = 20 * KATATE_odds + actPerArr[5] = 10 * KATATE_odds + actPerArr[17] = 20 * RYOUTE_odds + end + actFuncArr[1] = REGIST_FUNC(ai, goal, BanditB6802_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, BanditB6802_Act02) + actFuncArr[5] = REGIST_FUNC(ai, goal, BanditB6802_Act05) + actFuncArr[7] = REGIST_FUNC(ai, goal, BanditB6802_Act07) + actFuncArr[9] = REGIST_FUNC(ai, goal, BanditB6802_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, BanditB6802_Act10) + actFuncArr[13] = REGIST_FUNC(ai, goal, BanditB6802_Act13) + actFuncArr[15] = REGIST_FUNC(ai, goal, BanditB6802_Act15) + actFuncArr[17] = REGIST_FUNC(ai, goal, BanditB6802_Act17) + local atkAfterFunc = REGIST_FUNC(ai, goal, BanditB6802_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function BanditB6802_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function BanditB6802_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_Atk_max +function BanditB6802_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = Backstep_Atk_max + local DashDist = Backstep_Atk_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Rolling_Atk_max +function BanditB6802_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = Rolling_Atk_max + local DashDist = Rolling_Atk_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Whand_jyaku_max +function BanditB6802_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Whand_jyaku_max + local DashDist = Whand_jyaku_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Whand_kyou_max +function BanditB6802_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Whand_kyou_max + local DashDist = Whand_kyou_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_AtkW_max +function BanditB6802_Act13(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Backstep_AtkW_max + local DashDist = Backstep_AtkW_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Rolling_AtkW_max +function BanditB6802_Act15(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + NPC_RYOUTE_Switch(ai, goal) + local AppDist = Rolling_AtkW_max + local DashDist = Rolling_AtkW_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function BanditB6802_Act17(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function BanditB6802_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 5 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate2 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepL, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 2) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepR, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 2) + end + elseif fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 6, TARGET_ENE_0, ai:GetRandam_Float(1.5, 3), TARGET_ENE_0, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + return +end + +function BanditB6802Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function BanditB6802Battle_Terminate(ai, goal) + return +end + +NormalR_min = LargeR_max +function BanditB6802Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 10 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 80 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 10 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + end + end + if ai:IsInterupt(INTERUPT_GuardBreak) then + local distGuardBreak_Act = 2 + local oddsGuardBreak_Act = 100 + if targetDist <= distGuardBreak_Act and fate <= oddsGuardBreak_Act then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 10 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + else + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/006803_battle.lua b/scripts_decompiled/006803_battle.lua new file mode 100644 index 0000000..4b5ceac --- /dev/null +++ b/scripts_decompiled/006803_battle.lua @@ -0,0 +1,394 @@ +REGISTER_GOAL(GOAL_BanditC6803_Battle, "BanditC6803Battle") +local NormalR_min = 0 +local NormalR_max = 1.5 +local Bow_min = 8 +local Bow_max = 20 +local LargeR_min = 0 +local LargeR_max = 2.3 +local PushR_min = 0 +local PushR_max = 1 +local NPC_ATK_Parry_min = 0 +local NPC_ATK_Parry_max = 0.8 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 2.2 +local Rolling_Atk_min = 3.2 +local Rolling_Atk_max = 5.2 +REGISTER_GOAL_NO_UPDATE(GOAL_BanditC6803_Battle, 1) +function BanditC6803Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + if R_Wep == WEP_CATE_Bow then + if 10 <= targetDist then + actPerArr[2] = 100 + elseif 5.2 <= targetDist then + actPerArr[2] = 10 + actPerArr[9] = 90 + else + actPerArr[10] = 100 + end + elseif 7.5 <= targetDist then + actPerArr[2] = 100 + elseif 5.2 <= targetDist then + actPerArr[1] = 10 + actPerArr[3] = 15 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 15 + actPerArr[7] = 0 + actPerArr[8] = 0 + actPerArr[9] = 50 + elseif 2.8 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 0 + actPerArr[3] = 0 + actPerArr[4] = 10 + actPerArr[5] = 0 + actPerArr[7] = 10 + actPerArr[11] = 80 + else + actPerArr[1] = 10 + actPerArr[3] = 10 + actPerArr[4] = 0 + actPerArr[5] = 10 + actPerArr[7] = 10 + actPerArr[9] = 40 + actPerArr[11] = 0 + end + elseif 1 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 0 + actPerArr[3] = 0 + actPerArr[4] = 10 + actPerArr[5] = 0 + actPerArr[7] = 10 + actPerArr[9] = 40 + actPerArr[11] = 40 + else + actPerArr[1] = 20 + actPerArr[3] = 20 + actPerArr[4] = 0 + actPerArr[5] = 10 + actPerArr[7] = 10 + actPerArr[9] = 40 + actPerArr[11] = 0 + end + elseif ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 0 + actPerArr[3] = 0 + actPerArr[4] = 10 + actPerArr[5] = 0 + actPerArr[7] = 10 + actPerArr[8] = 10 + actPerArr[9] = 40 + actPerArr[11] = 30 + else + actPerArr[1] = 20 + actPerArr[3] = 20 + actPerArr[4] = 0 + actPerArr[5] = 10 + actPerArr[7] = 10 + actPerArr[8] = 10 + actPerArr[9] = 40 + actPerArr[11] = 0 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, BanditC6803_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, BanditC6803_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, BanditC6803_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, BanditC6803_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, BanditC6803_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, BanditC6803_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, BanditC6803_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, BanditC6803_Act08) + actFuncArr[9] = REGIST_FUNC(ai, goal, BanditC6803_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, BanditC6803_Act10) + actFuncArr[11] = REGIST_FUNC(ai, goal, BanditC6803_Act11) + local atkAfterFunc = REGIST_FUNC(ai, goal, BanditC6803_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function BanditC6803_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + if R_Wep == WEP_CATE_Bow then + CommonNPC_ChangeWepR2(ai, goal) + end + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 75 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function BanditC6803_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + if R_Wep ~= WEP_CATE_Bow then + CommonNPC_ChangeWepR1(ai, goal) + end + goal:AddSubGoal(GOAL_COMMON_Attack, 5, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Far, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function BanditC6803_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + if R_Wep == WEP_CATE_Bow then + CommonNPC_ChangeWepR2(ai, goal) + end + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 75 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + end + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function BanditC6803_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 75 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = NormalR_max +function BanditC6803_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + if R_Wep == WEP_CATE_Bow then + CommonNPC_ChangeWepR2(ai, goal) + end + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 75 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Rolling_Atk_max +function BanditC6803_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + if R_Wep == WEP_CATE_Bow then + CommonNPC_ChangeWepR2(ai, goal) + end + local AppDist = Rolling_Atk_max + local DashDist = Rolling_Atk_max + 5 + local Odds_Guard = 75 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function BanditC6803_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(2, 2.5), TARGET_SELF, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, 4) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function BanditC6803_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function BanditC6803_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local FirstAttID = NPC_ATK_NormalR + local ComAttID = NPC_ATK_NormalR + local ShootNum = ai:GetRandam_Int(1, 3) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, 10, TARGET_ENE_0, false, 4) + if R_Wep ~= WEP_CATE_Bow then + CommonNPC_ChangeWepR1(ai, goal) + end + goal:AddSubGoal(GOAL_COMMON_Attack, 5, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Far, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function BanditC6803_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + CommonNPC_ChangeWepR2(ai, goal) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR_min = NormalR_max +function BanditC6803_Act11(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, NormalR_max, TARGET_SELF, false, 4) + goal:AddSubGoal(GOAL_COMMON_TurnAround, 3, TARGET_ENE_0, AI_DIR_TYPE_B, 10, false, true, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_Atk_max +function BanditC6803_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 15 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, Backstep_Atk_max, TARGET_SELF, false, -1) + elseif fate <= 55 then + if fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 6, TARGET_ENE_0, ai:GetRandam_Float(1.5, 3), TARGET_ENE_0, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + end + return +end + +function BanditC6803Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function BanditC6803Battle_Terminate(ai, goal) + return +end + +function BanditC6803Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 40 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + return true + end + end + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 40 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 40 + if targetDist < combRunDist then + if fate <= combRunPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + end + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 30 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/006804_battle.lua b/scripts_decompiled/006804_battle.lua new file mode 100644 index 0000000..d087ceb --- /dev/null +++ b/scripts_decompiled/006804_battle.lua @@ -0,0 +1,321 @@ +REGISTER_GOAL(GOAL_BanditD6804_Battle, "BanditD6804Battle") +local PushR_min = 0 +local PushR_max = 1 +local NormalR2_min = 0 +local NormalR2_max = 1.7 +local LargeR2_min = 0 +local LargeR2_max = 2.6 +local Backstep_Atk2_min = 0 +local Backstep_Atk2_max = 1 +local Guard_NormalR_min = 0 +local Guard_NormalR_max = 0.9 +local Magic_min = 5 +local Magic_max = 15 +local Magic2_min = 5 +local Magic2_max = 15 +REGISTER_GOAL_NO_UPDATE(GOAL_BanditD6804_Battle, 1) +function BanditD6804Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local BothHandOff = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local RYOUTE_odds = 1 + local KATATE_odds = 1 + if ai:IsTargetGuard(TARGET_ENE_0) == true then + RYOUTE_odds = 10 + end + local MagicValue1 = 1 + local Magic1Limit = ai:GetNumber(0) + if 20 <= Magic1Limit then + MagicValue1 = 0 + end + local MagicValue2 = 1 + local Magic2Limit = ai:GetNumber(1) + if 20 <= Magic2Limit then + MagicValue2 = 0 + end + local GuardTaiou = 0 + if ai:IsTargetGuard(TARGET_ENE_0) == true then + GuardTaiou = 1 + end + if 8 <= targetDist then + actPerArr[3] = 5 + actPerArr[4] = 5 + actPerArr[6] = 0 + actPerArr[17] = 0 * GuardTaiou + actPerArr[18] = 45 * MagicValue1 + actPerArr[19] = 45 * MagicValue2 + actPerArr[20] = 0 + elseif 4 <= targetDist then + actPerArr[3] = 10 + actPerArr[4] = 10 + actPerArr[6] = 0 + actPerArr[17] = 0 * GuardTaiou + actPerArr[18] = 35 * MagicValue1 + actPerArr[19] = 35 * MagicValue2 + actPerArr[20] = 20 * GuardTaiou + elseif 2.6 <= targetDist then + actPerArr[3] = 15 + actPerArr[4] = 15 + actPerArr[6] = 0 + actPerArr[17] = 10 * GuardTaiou + actPerArr[18] = 25 * MagicValue1 + actPerArr[19] = 25 * MagicValue2 + actPerArr[20] = 10 * GuardTaiou + elseif 1 <= targetDist then + actPerArr[3] = 15 + actPerArr[4] = 15 + actPerArr[6] = 0 + actPerArr[17] = 15 * GuardTaiou + actPerArr[18] = 20 * MagicValue1 + actPerArr[19] = 20 * MagicValue2 + actPerArr[20] = 15 * GuardTaiou + else + actPerArr[3] = 25 + actPerArr[4] = 25 + actPerArr[6] = 0 + actPerArr[17] = 15 * GuardTaiou + actPerArr[18] = 10 * MagicValue1 + actPerArr[19] = 10 * MagicValue2 + actPerArr[20] = 15 * GuardTaiou + end + actFuncArr[3] = REGIST_FUNC(ai, goal, BanditD6804_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, BanditD6804_Act04) + actFuncArr[6] = REGIST_FUNC(ai, goal, BanditD6804_Act06) + actFuncArr[17] = REGIST_FUNC(ai, goal, BanditD6804_Act17) + actFuncArr[18] = REGIST_FUNC(ai, goal, BanditD6804_Act18) + actFuncArr[19] = REGIST_FUNC(ai, goal, BanditD6804_Act19) + actFuncArr[20] = REGIST_FUNC(ai, goal, BanditD6804_Act20) + local atkAfterFunc = REGIST_FUNC(ai, goal, BanditD6804_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +PushR_min = NormalR2_max +function BanditD6804_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR2(ai, goal) + local AppDist = NormalR2_max + local DashDist = NormalR2_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +PushR_min = LargeR2_max +function BanditD6804_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR2(ai, goal) + local AppDist = LargeR2_max + local DashDist = LargeR2_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +PushR_min = Backstep_Atk2_max +function BanditD6804_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR2(ai, goal) + local AppDist = Backstep_Atk2_max + local DashDist = Backstep_Atk2_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +PushR_min = PushR_max +function BanditD6804_Act17(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +PushR_min = Magic_max +PushR_min = Magic_min +function BanditD6804_Act18(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic1Limit = ai:GetNumber(0) + CommonNPC_ChangeWepR1(ai, goal) + ai:ChangeEquipMagic(0) + if Magic_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2.5, TARGET_ENE_0, Magic_max, TARGET_SELF, false, 4) + elseif targetDist <= Magic_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, Magic_min, TARGET_ENE_0, false, 4) + end + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 1.5, 90) + ai:SetNumber(0, Magic1Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +PushR_min = Magic_max +PushR_min = Magic2_max +PushR_min = Magic_min +PushR_min = Magic2_min +function BanditD6804_Act19(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic2Limit = ai:GetNumber(1) + CommonNPC_ChangeWepR1(ai, goal) + ai:ChangeEquipMagic(1) + if Magic_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2.5, TARGET_ENE_0, Magic2_max, TARGET_SELF, false, 4) + elseif targetDist <= Magic_min then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, Magic2_min, TARGET_ENE_0, false, 4) + end + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 1.5, 90) + ai:SetNumber(1, Magic2Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function BanditD6804_Act20(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(2, 2.5), TARGET_SELF, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, 4) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function BanditD6804_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + end + return +end + +function BanditD6804Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function BanditD6804Battle_Terminate(ai, goal) + return +end + +function BanditD6804Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 10 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 10 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 10 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/006805_battle.lua b/scripts_decompiled/006805_battle.lua new file mode 100644 index 0000000..1a2644a --- /dev/null +++ b/scripts_decompiled/006805_battle.lua @@ -0,0 +1,301 @@ +REGISTER_GOAL(GOAL_BanditE6805_Battle, "BanditE6805Battle") +local NormalR_min = 0 +local NormalR_max = 1.6 +local LargeR_min = 0 +local LargeR_max = 2.1 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 1 +local PushR_min = 0 +local PushR_max = 1 +local Magic_min = 8 +local Magic_max = 8 +local Magic2_min = 0 +local Magic2_max = 1.7 +REGISTER_GOAL_NO_UPDATE(GOAL_BanditE6805_Battle, 1) +function BanditE6805Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local BothHandOff = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local RYOUTE_odds = 1 + local KATATE_odds = 1 + local MagicValue1 = 1 + local Magic1Limit = ai:GetNumber(0) + if 5 <= Magic1Limit then + MagicValue1 = 0 + end + local GuardTaiou = 0 + if ai:IsTargetGuard(TARGET_ENE_0) == true then + GuardTaiou = 1 + end + local hprate = ai:GetHpRate(TARGET_SELF) + local Kaifuku = 0 + if hprate <= 0.7 or ai:ChkNearLowHpFriend(0.7, 2.9) then + Kaifuku = 1 + end + if 4 <= targetDist then + actPerArr[1] = 35 + actPerArr[2] = 35 + actPerArr[18] = 1000 * MagicValue1 * Kaifuku + actPerArr[19] = 50 * GuardTaiou + actPerArr[20] = 30 + elseif 1 <= targetDist then + actPerArr[1] = 30 + actPerArr[2] = 30 + actPerArr[17] = 20 * GuardTaiou + actPerArr[18] = 1000 * MagicValue1 * Kaifuku + actPerArr[19] = 50 * GuardTaiou + actPerArr[20] = 40 + else + actPerArr[1] = 20 + actPerArr[2] = 20 + actPerArr[5] = 20 + actPerArr[17] = 20 * GuardTaiou + actPerArr[18] = 1000 * MagicValue1 * Kaifuku + actPerArr[19] = 50 * GuardTaiou + actPerArr[20] = 40 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, BanditE6805_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, BanditE6805_Act02) + actFuncArr[5] = REGIST_FUNC(ai, goal, BanditE6805_Act05) + actFuncArr[17] = REGIST_FUNC(ai, goal, BanditE6805_Act17) + actFuncArr[18] = REGIST_FUNC(ai, goal, BanditE6805_Act18) + actFuncArr[19] = REGIST_FUNC(ai, goal, BanditE6805_Act19) + actFuncArr[20] = REGIST_FUNC(ai, goal, BanditE6805_Act20) + local atkAfterFunc = REGIST_FUNC(ai, goal, BanditE6805_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function BanditE6805_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function BanditE6805_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_Atk_max +function BanditE6805_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = Backstep_Atk_max + local DashDist = Backstep_Atk_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function BanditE6805_Act17(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Magic_min +function BanditE6805_Act18(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local R_Wep = ai:GetWepCateRight(TARGET_SELF) + local Magic1Limit = ai:GetNumber(0) + local hprate = ai:GetHpRate(TARGET_SELF) + CommonNPC_ChangeWepR2(ai, goal) + ai:ChangeEquipMagic(0) + if ai:ChkNearLowHpFriend(0.7, 2.9) then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 7, TARGET_ENE_0, Magic_min, TARGET_ENE_0, false, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_MagicR, TARGET_ENE_0, DIST_None, 0, -1) + end + ai:SetNumber(0, Magic1Limit + 1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function BanditE6805_Act19(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_TurnAround, 2, TARGET_ENE_0, AI_DIR_TYPE_B, 10, false, true, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function BanditE6805_Act20(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(2, 2.5), TARGET_SELF, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(1.5, 2), TARGET_ENE_0, true, 4) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function BanditE6805_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 80 then + if fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 6, TARGET_ENE_0, ai:GetRandam_Float(1.5, 3), TARGET_ENE_0, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + end + return +end + +function BanditE6805Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function BanditE6805Battle_Terminate(ai, goal) + return +end + +NormalR_min = LargeR_max +function BanditE6805Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 40 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, combRunDist, TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 80 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 50 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, combRunDist, TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_GuardBreak) then + local distGuardBreak_Act = 2 + local oddsGuardBreak_Act = 60 + if targetDist <= distGuardBreak_Act and fate <= oddsGuardBreak_Act then + goal:ClearSubGoal() + CommonNPC_ChangeWepR1(ai, goal) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + goal:ClearSubGoal() + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + elseif ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 75 + if fate <= shootIntPer then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 4) + else + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + return true + else + return true + end + else + return false + end +end + +return diff --git a/scripts_decompiled/006806_battle.lua b/scripts_decompiled/006806_battle.lua new file mode 100644 index 0000000..1d5542d --- /dev/null +++ b/scripts_decompiled/006806_battle.lua @@ -0,0 +1,299 @@ +REGISTER_GOAL(GOAL_BanditF6806_Battle, "BanditF6806Battle") +local NormalR_min = 0 +local NormalR_max = 1.2 +local LargeR_min = 0 +local LargeR_max = 2 +local Backstep_Atk_min = 0 +local Backstep_Atk_max = 0.8 +local Rolling_Atk_min = 3.5 +local Rolling_Atk_max = 4.5 +local PushR_min = 0 +local PushR_max = 1 +REGISTER_GOAL_NO_UPDATE(GOAL_BanditF6806_Battle, 1) +function BanditF6806Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local BothHandOff = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + ai:AddObserveArea(0, TARGET_ENE_0, TARGET_SELF, AI_DIR_TYPE_B, 40, 4) + local RYOUTE_odds = 1 + local KATATE_odds = 1 + local GuardTaiou = 0 + if ai:IsTargetGuard(TARGET_ENE_0) == true then + GuardTaiou = 1 + end + if 8 <= targetDist then + actPerArr[1] = 10 + actPerArr[2] = 10 + actPerArr[7] = 30 + actPerArr[19] = 50 + elseif 3.5 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 20 + actPerArr[7] = 20 + actPerArr[19] = 40 + elseif 0.8 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 20 + actPerArr[17] = 20 * GuardTaiou + actPerArr[18] = 20 + actPerArr[19] = 40 + else + actPerArr[1] = 15 + actPerArr[2] = 15 + actPerArr[5] = 15 + actPerArr[17] = 20 * GuardTaiou + actPerArr[18] = 15 + actPerArr[19] = 40 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, BanditF6806_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, BanditF6806_Act02) + actFuncArr[5] = REGIST_FUNC(ai, goal, BanditF6806_Act05) + actFuncArr[17] = REGIST_FUNC(ai, goal, BanditF6806_Act17) + actFuncArr[18] = REGIST_FUNC(ai, goal, BanditF6806_Act18) + actFuncArr[19] = REGIST_FUNC(ai, goal, BanditF6806_Act19) + local atkAfterFunc = REGIST_FUNC(ai, goal, BanditF6806_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +NormalR_min = NormalR_max +function BanditF6806_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = NormalR_max + local DashDist = NormalR_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = LargeR_max +function BanditF6806_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = LargeR_max + local DashDist = LargeR_max + 5 + local Odds_Guard = 50 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Backstep_Atk_max +function BanditF6806_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = Backstep_Atk_max + local DashDist = Backstep_Atk_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 6, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = Rolling_Atk_max +function BanditF6806_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + NPC_KATATE_Switch(ai, goal) + CommonNPC_ChangeWepR1(ai, goal) + local AppDist = Rolling_Atk_max + local DashDist = Rolling_Atk_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_StepF, TARGET_ENE_0, 3, 1.5, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +NormalR_min = PushR_max +function BanditF6806_Act17(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = PushR_max + local DashDist = PushR_max + 5 + local Odds_Guard = 100 + NPC_Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_PushR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function BanditF6806_Act18(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function BanditF6806_Act19(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + CommonNPC_ChangeWepR1(ai, goal) + goal:AddSubGoal(GOAL_COMMON_TurnAround, 3, TARGET_ENE_0, AI_DIR_TYPE_B, 10, false, true, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function BanditF6806_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if fate <= 5 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate2 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepL, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 2) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepR, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 2) + end + elseif fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_BackstepB, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate <= 15 then + if fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 6, TARGET_ENE_0, ai:GetRandam_Float(1.5, 3), TARGET_ENE_0, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 4) + end + end + return +end + +function BanditF6806Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function BanditF6806Battle_Terminate(ai, goal) + return +end + +function BanditF6806Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 50 + local MoveDist = 3 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + return true + end + end + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 100 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0, -1) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 50 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, combRunDist, TARGET_ENE_0, false, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + end + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 50 + if fate <= shootIntPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) then + local ResDist = 3 + local ResPer = 30 + if targetDist < ResDist then + if fate <= ResPer then + goal:ClearSubGoal() + if fate2 <= ResPer then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + else + ai:Replaning() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + ai:Replaning() + return true + end + end + if ai:IsInterupt(INTERUPT_Inside_ObserveArea) and ai:IsFinishTimer(0) == true then + ai:SetTimer(0, 4) + goal:ClearSubGoal() + CommonNPC_ChangeWepR1(ai, goal) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, 0.6, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 10) + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/006910_battle.lua b/scripts_decompiled/006910_battle.lua new file mode 100644 index 0000000..8436824 --- /dev/null +++ b/scripts_decompiled/006910_battle.lua @@ -0,0 +1,149 @@ +REGISTER_GOAL(GOAL_FUSHI6910_Battle, "FUSHI6910Battle") +REGISTER_GOAL_NO_UPDATE(GOAL_FUSHI6910_Battle, 1) +function FUSHI6910Battle_Activate(ai, goal) + local hprate = ai:GetHpRate(TARGET_SELF) + FUSHI6910_Battle_Sword(ai, goal) + return +end + +function FUSHI6910_Gitai_Move(ai, goal) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, 2, TARGET_SELF, false, -1) + return +end + +function FUSHI6910_Battle_Sword(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local NormalR_Dist = 2 + local NR_fate = ai:GetRandam_Int(1, 100) + if NormalR_Dist <= targetDist then + if NR_fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, NormalR_Dist, TARGET_SELF, false, 4) + FUSHI6910_Battle_Kougeki_Noato(ai, goal) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, NormalR_Dist, TARGET_SELF, false, -1) + FUSHI6910_Battle_Kougeki_Noato(ai, goal) + end + else + FUSHI6910_Battle_NormalR_Comb(ai, goal) + FUSHI6910_Battle_Kougeki_Noato(ai, goal) + end + return +end + +function FUSHI6910_Battle_NormalR_Comb(ai, goal) + local NR_fate = ai:GetRandam_Int(1, 100) + local NR_fate2 = ai:GetRandam_Int(1, 100) + local NR_fate3 = ai:GetRandam_Int(1, 100) + if NR_fate <= 80 then + CommonNPC_SwitchOneHandMode(ai, goal) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + if NR_fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + if NR_fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + else + CommonNPC_SwitchBothHandMode(ai, goal) + if NR_fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + if NR_fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Middle, 1.5, 90) + end + end + return +end + +function FUSHI6910_Battle_Kougeki_Noato(ai, goal) + local KN_fate = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if KN_fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Int(4, 6), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(25, 45), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, MoveDist, TARGET_ENE_0, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, MoveDist, TARGET_ENE_0, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Int(4, 6), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(25, 50), true, true, -1) + end + return +end + +function FUSHI6910Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function FUSHI6910Battle_Terminate(ai, goal) + return +end + +function FUSHI6910Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_MissSwing) then + local MissSwingDist = 3 + local MissSwingAttPer = 80 + if targetDist <= MissSwingDist and fate <= MissSwingAttPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, NPC_ATK_StepF, TARGET_ENE_0, DIST_None, 0) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Near, 0) + return true + end + end + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 80 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if ai:GetNumber(1) ~= 1 then + ai:SetNumber(1, 1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, 1, TARGET_ENE_0, true, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 100 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0) + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 100 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, 1, TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + end + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 70 + if fate <= shootIntPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/010000_logic.lua b/scripts_decompiled/010000_logic.lua new file mode 100644 index 0000000..7cc7a4c --- /dev/null +++ b/scripts_decompiled/010000_logic.lua @@ -0,0 +1,11 @@ +REGISTER_LOGIC_FUNC(LOGIC_ID_Common10000, "common10000_Logic", "common10000_Interupt") +function common10000_Logic(ai) + COMMON_EasySetup3(ai) + return +end + +function common10000_Interupt(ai, goal) + return +end + +return diff --git a/scripts_decompiled/010001_logic.lua b/scripts_decompiled/010001_logic.lua new file mode 100644 index 0000000..f366c1e --- /dev/null +++ b/scripts_decompiled/010001_logic.lua @@ -0,0 +1,16 @@ +REGISTER_LOGIC_FUNC(LOGIC_ID_Common_DoObjAct10001, "common_DoObjAct10001_Logic", "common_DoObjAct10001_Interupt") +function common_DoObjAct10001_Logic(ai) + if ai:IsExistReqObjAct() then + ai:AddTopGoal(GOAL_COMMON_ApproachTarget, 5, POINT_NEAR_OBJ_ACT_POINT, 0.1, TARGET_SELF, false, -1) + ai:AddTopGoal(GOAL_COMMON_ObjActTest, 5, OBJ_ACT_TYPE_LEVER) + else + COMMON_EasySetup3(ai) + end + return +end + +function common_DoObjAct10001_Interupt(ai, goal) + return +end + +return diff --git a/scripts_decompiled/010002_logic.lua b/scripts_decompiled/010002_logic.lua new file mode 100644 index 0000000..aa97847 --- /dev/null +++ b/scripts_decompiled/010002_logic.lua @@ -0,0 +1,16 @@ +REGISTER_LOGIC_FUNC(LOGIC_ID_Husi_Runaway10002, "husi_Runaway10002_Logic", "husi_Runaway10002_Interupt") +function husi_Runaway10002_Logic(ai) + local eventNo = ai:GetEventRequest() + if eventNo == 10 then + ai:AddTopGoal(GOAL_COMMON_ApproachTarget, 30, POINT_INITIAL, 0.5, TARGET_SELF, false, -1) + else + COMMON_EasySetup3(ai) + end + return +end + +function common_DoObjAct10001_Interupt(ai, goal) + return +end + +return diff --git a/scripts_decompiled/010100_battle.lua b/scripts_decompiled/010100_battle.lua new file mode 100644 index 0000000..24afd25 --- /dev/null +++ b/scripts_decompiled/010100_battle.lua @@ -0,0 +1,149 @@ +REGISTER_GOAL(GOAL_DS2pot10100_Battle, "DS2pot10100Battle") +REGISTER_GOAL_NO_UPDATE(GOAL_DS2pot10100_Battle, 1) +function DS2pot10100Battle_Activate(ai, goal) + local hprate = ai:GetHpRate(TARGET_SELF) + DS2pot10100_Battle_Sword(ai, goal) + return +end + +function DS2pot10100_Gitai_Move(ai, goal) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, 2, TARGET_ENE_0, false, -1) + return +end + +function DS2pot10100_Battle_Sword(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local NormalR_Dist = 2 + local NR_fate = ai:GetRandam_Int(1, 100) + if NormalR_Dist <= targetDist then + if NR_fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, NormalR_Dist, TARGET_ENE_0, false, 4) + DS2pot10100_Battle_Kougeki_Noato(ai, goal) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, NormalR_Dist, TARGET_ENE_0, false, -1) + DS2pot10100_Battle_Kougeki_Noato(ai, goal) + end + else + DS2pot10100_Battle_NormalR_Comb(ai, goal) + DS2pot10100_Battle_Kougeki_Noato(ai, goal) + end + return +end + +function DS2pot10100_Battle_NormalR_Comb(ai, goal) + local NR_fate = ai:GetRandam_Int(1, 100) + local NR_fate2 = ai:GetRandam_Int(1, 100) + local NR_fate3 = ai:GetRandam_Int(1, 100) + if NR_fate <= 80 then + CommonNPC_SwitchOneHandMode(ai, goal) + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Near, 0) + if NR_fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Near, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Near, 0) + end + if NR_fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Near, 0) + end + else + CommonNPC_SwitchBothHandMode(ai, goal) + if NR_fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Near, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Near, 0) + end + if NR_fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Near, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_Near, 0) + end + end + return +end + +function DS2pot10100_Battle_Kougeki_Noato(ai, goal) + local KN_fate = ai:GetRandam_Int(1, 100) + local MoveDist = 3 + if KN_fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Int(4, 6), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(25, 45), true, true, 4) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, MoveDist, TARGET_ENE_0, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, MoveDist, TARGET_ENE_0, true, 4) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Int(4, 6), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(25, 50), true, true, -1) + end + return +end + +function DS2pot10100Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function DS2pot10100Battle_Terminate(ai, goal) + return +end + +function DS2pot10100Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_MissSwing) then + local MissSwingDist = 3 + local MissSwingAttPer = 80 + if targetDist <= MissSwingDist and fate <= MissSwingAttPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, NPC_ATK_StepF, TARGET_ENE_0, DIST_None, 0) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, NPC_ATK_NormalR, TARGET_ENE_0, DIST_Near, 0) + return true + end + end + if ai:IsInterupt(INTERUPT_FindAttack) then + local FindATKDist = 3 + local FindATKPer = 80 + if targetDist <= FindATKDist and fate <= FindATKPer then + goal:ClearSubGoal() + if ai:GetNumber(1) ~= 1 then + ai:SetNumber(1, 1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, 1, TARGET_ENE_0, true, 4) + end + return true + end + end + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Suc_GuardDist = 3 + local Suc_GuardPer = 100 + if targetDist <= Suc_GuardDist and fate <= Suc_GuardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0) + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, NPC_ATK_LargeR, TARGET_ENE_0, DIST_None, 0) + return true + end + end + if ai:IsInterupt(INTERUPT_Damaged) then + local combRunDist = 3 + local combRunPer = 100 + if targetDist < combRunDist and fate <= combRunPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Int(3, 5), TARGET_ENE_0, 1, TARGET_ENE_0, true, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + end + return true + end + end + if ai:IsInterupt(INTERUPT_Shoot) then + local shootIntPer = 70 + if fate <= shootIntPer then + goal:ClearSubGoal() + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, NPC_ATK_StepB, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, ai:GetRandam_Int(11, 12), TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + end + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/010100_logic.lua b/scripts_decompiled/010100_logic.lua new file mode 100644 index 0000000..602ff54 --- /dev/null +++ b/scripts_decompiled/010100_logic.lua @@ -0,0 +1,18 @@ +REGISTER_LOGIC_FUNC(LOGIC_ID_Gitai10100, "Gitai10100_Logic", "Gitai10100_Interupt") +function Gitai10100_Logic(ai) + if ai:IsExistReqObjAct() then + ai:AddTopGoal(GOAL_COMMON_ApproachTarget, 5, POINT_NEAR_OBJ_ACT_POINT, 0.1, TARGET_SELF, false, -1) + ai:AddTopGoal(GOAL_COMMON_ObjActTest, 5, OBJ_ACT_TYPE_LEVER) + elseif ai:IsSearchTarget(TARGET_ENE_0) == true then + ai:AddTopGoal(GOAL_DS2pot10100_Battle, -1, 0, 0, 0, 0) + else + ai:AddTopGoal(GOAL_COMMON_Stay, 1, 0, 0, 0, 0) + end + return +end + +function Gitai10100_Interupt(ai, goal) + return +end + +return diff --git a/scripts_decompiled/011000_battle.lua b/scripts_decompiled/011000_battle.lua new file mode 100644 index 0000000..053c003 --- /dev/null +++ b/scripts_decompiled/011000_battle.lua @@ -0,0 +1,20 @@ +REGISTER_GOAL(GOAL_Nanimosinai11000_Battle, "Nanimosinai11000Battle") +REGISTER_GOAL_NO_UPDATE(GOAL_Nanimosinai11000_Battle, 1) +function Nanimosinai11000Battle_Activate(ai, goal) + goal:AddSubGoal(GOAL_COMMON_Wait, 5, TARGET_NONE, 0, 0, 0) + return +end + +function Nanimosinai11000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Nanimosinai11000Battle_Terminate(ai, goal) + return +end + +function Nanimosinai11000Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/011000_logic.lua b/scripts_decompiled/011000_logic.lua new file mode 100644 index 0000000..d8009a8 --- /dev/null +++ b/scripts_decompiled/011000_logic.lua @@ -0,0 +1,11 @@ +REGISTER_LOGIC_FUNC(LOGIC_ID_Nanimosinai11000, "Nanimosinai11000_Logic", "Nanimosinai11000_Interupt") +function Nanimosinai11000_Logic(ai) + ai:AddTopGoal(GOAL_COMMON_Wait, 5, TARGET_NONE, 0, 0, 0) + return +end + +function Nanimosinai11000_Interupt(ai, goal) + return +end + +return diff --git a/scripts_decompiled/120000_battle.lua b/scripts_decompiled/120000_battle.lua new file mode 100644 index 0000000..5b7a231 --- /dev/null +++ b/scripts_decompiled/120000_battle.lua @@ -0,0 +1,137 @@ +REGISTER_GOAL(GOAL_Inunezumi120000_Battle, "Inunezumi120000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 1.2 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 1.4 +local Att3002_Dist_min = 1 +local Att3002_Dist_max = 3.2 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 1.2 +REGISTER_GOAL_NO_UPDATE(GOAL_Inunezumi120000_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3001_Dist_max +Att3000_Dist_min = Att3002_Dist_max +Att3000_Dist_min = Att3003_Dist_max +function Inunezumi120000Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local GetWellSpace_Odds = 0 + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + if 5 <= targetDist then + Act01Per = 15 + Act02Per = 15 + Act03Per = 55 + Act04Per = 15 + elseif 1 <= targetDist then + Act01Per = 25 + Act02Per = 25 + Act03Per = 25 + Act04Per = 25 + else + Act01Per = 35 + Act02Per = 35 + Act03Per = 0 + Act04Per = 30 + end + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per) + if fateAct <= Act01Per then + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 1.5 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Near, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Near, 0) + end + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per then + local AppDist = Att3001_Dist_max + local DashDist = Att3001_Dist_max + 1.5 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3001, TARGET_ENE_0, DIST_Near, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3001, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3000, TARGET_ENE_0, DIST_Near, 0) + end + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per then + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 1.5 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Near, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3002, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3000, TARGET_ENE_0, DIST_Near, 0) + end + GetWellSpace_Odds = 100 + else + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 1.5 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Near, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3003, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3000, TARGET_ENE_0, DIST_Near, 0) + end + GetWellSpace_Odds = 100 + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds and fate2 > 35 then + if fate2 <= 80 then + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.8, 1.4), TARGET_ENE_0, 0, 0, 0) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, 2, TARGET_ENE_0, true, -1) + end + end + return +end + +function Inunezumi120000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Inunezumi120000Battle_Terminate(ai, goal) + return +end + +function Inunezumi120000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local superStepDist = 4 + local superStepPer = 15 + local bkStepPer = 100 + local leftStepPer = 0 + local rightStepPer = 0 + local safetyDist = 3.5 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local oddsResponse = 20 + local bkStepPer = 100 + local leftStepPer = 0 + local rightStepPer = 0 + local safetyDist = 3.5 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end + end +end + +return diff --git a/scripts_decompiled/120100_battle.lua b/scripts_decompiled/120100_battle.lua new file mode 100644 index 0000000..0583ad8 --- /dev/null +++ b/scripts_decompiled/120100_battle.lua @@ -0,0 +1,143 @@ +REGISTER_GOAL(GOAL_SmallInunezumi120100_Battle, "SmallInunezumi120100Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 0.8 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 0.8 +local Att3002_Dist_min = 0.8 +local Att3002_Dist_max = 1.9 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 1 +REGISTER_GOAL_NO_UPDATE(GOAL_SmallInunezumi120100_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3001_Dist_max +Att3000_Dist_min = Att3002_Dist_max +Att3000_Dist_min = Att3003_Dist_max +function SmallInunezumi120100Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local GetWellSpace_Odds = 0 + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + if 5 <= targetDist then + Act01Per = 15 + Act02Per = 15 + Act03Per = 55 + Act04Per = 15 + elseif 0.8 <= targetDist then + Act01Per = 25 + Act02Per = 25 + Act03Per = 25 + Act04Per = 25 + else + Act01Per = 35 + Act02Per = 35 + Act03Per = 0 + Act04Per = 30 + end + local doAdmirer = ai:GetExcelParam(AI_EXCEL_THINK_PARAM_TYPE__thinkAttr_doAdmirer) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local Odds_Guard = 0 + if doAdmirer == 1 and role == ROLE_TYPE_Torimaki then + Torimaki_Act(ai, goal, Odds_Guard) + elseif doAdmirer == 1 and role == ROLE_TYPE_Kankyaku then + Kankyaku_Act(ai, goal, Odds_Guard) + else + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per) + if fateAct <= Act01Per then + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 1.5 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Near, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Near, 0) + end + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per then + local AppDist = Att3001_Dist_max + local DashDist = Att3001_Dist_max + 1.5 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3001, TARGET_ENE_0, DIST_Near, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3001, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3000, TARGET_ENE_0, DIST_Near, 0) + end + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per then + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 1.5 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Near, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3002, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3000, TARGET_ENE_0, DIST_Near, 0) + end + GetWellSpace_Odds = 100 + else + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 1.5 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Near, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3003, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3000, TARGET_ENE_0, DIST_Near, 0) + end + GetWellSpace_Odds = 100 + end + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds and fate2 > 80 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, 2, TARGET_ENE_0, true, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Near, 0) + end + return +end + +function SmallInunezumi120100Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function SmallInunezumi120100Battle_Terminate(ai, goal) + return +end + +function SmallInunezumi120100Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local superStepDist = 3 + local superStepPer = 15 + local bkStepPer = 100 + local leftStepPer = 0 + local rightStepPer = 0 + local safetyDist = 3.5 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local oddsResponse = 20 + local bkStepPer = 100 + local leftStepPer = 0 + local rightStepPer = 0 + local safetyDist = 3.5 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end + end +end + +return diff --git a/scripts_decompiled/120101_battle.lua b/scripts_decompiled/120101_battle.lua new file mode 100644 index 0000000..b581280 --- /dev/null +++ b/scripts_decompiled/120101_battle.lua @@ -0,0 +1,139 @@ +REGISTER_GOAL(GOAL_SmallInunezumi120101_Battle, "SmallInunezumi120101Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 0.8 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 0.8 +local Att3002_Dist_min = 0.8 +local Att3002_Dist_max = 1.9 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 1 +REGISTER_GOAL_NO_UPDATE(GOAL_SmallInunezumi120101_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3001_Dist_max +Att3000_Dist_min = Att3002_Dist_max +Att3000_Dist_min = Att3003_Dist_max +function SmallInunezumi120101Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local GetWellSpace_Odds = 0 + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + if 5 <= targetDist then + Act01Per = 15 + Act02Per = 15 + Act03Per = 55 + Act04Per = 15 + elseif 0.8 <= targetDist then + Act01Per = 25 + Act02Per = 25 + Act03Per = 25 + Act04Per = 25 + else + Act01Per = 35 + Act02Per = 35 + Act03Per = 0 + Act04Per = 30 + end + local doAdmirer = ai:GetExcelParam(AI_EXCEL_THINK_PARAM_TYPE__thinkAttr_doAdmirer) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local Odds_Guard = 0 + if doAdmirer == 1 and role == ROLE_TYPE_Torimaki then + Torimaki_Act(ai, goal, Odds_Guard) + elseif doAdmirer == 1 and role == ROLE_TYPE_Kankyaku then + Kankyaku_Act(ai, goal, Odds_Guard) + else + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per) + if fateAct <= Act01Per then + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 1.5 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Near, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Near, 0) + end + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per then + local AppDist = Att3001_Dist_max + local DashDist = Att3001_Dist_max + 1.5 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3001, TARGET_ENE_0, DIST_Near, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3001, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3000, TARGET_ENE_0, DIST_Near, 0) + end + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per then + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 1.5 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Near, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3002, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3000, TARGET_ENE_0, DIST_Near, 0) + end + GetWellSpace_Odds = 100 + else + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 1.5 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Near, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3003, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3000, TARGET_ENE_0, DIST_Near, 0) + end + GetWellSpace_Odds = 100 + end + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds and fate2 > 80 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, 2, TARGET_ENE_0, true, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Near, 0) + end + return +end + +function SmallInunezumi120101Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function SmallInunezumi120101Battle_Terminate(ai, goal) + return +end + +function SmallInunezumi120101Battle_Interupt(ai, goal) + local superStepDist = 3 + local superStepPer = 15 + local bkStepPer = 100 + local leftStepPer = 0 + local rightStepPer = 0 + local safetyDist = 3.5 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local oddsResponse = 20 + local bkStepPer = 100 + local leftStepPer = 0 + local rightStepPer = 0 + local safetyDist = 3.5 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end + end +end + +return diff --git a/scripts_decompiled/120200_battle.lua b/scripts_decompiled/120200_battle.lua new file mode 100644 index 0000000..3dbbac4 --- /dev/null +++ b/scripts_decompiled/120200_battle.lua @@ -0,0 +1,152 @@ +REGISTER_GOAL(GOAL_BigInunezumi120200_Battle, "BigInunezumi120200Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 2.1 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 1.6 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 1.7 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 1.6 +local Att3004_Dist_min = 2 +local Att3004_Dist_max = 3.5 +local Att3005_Dist_min = 2 +local Att3005_Dist_max = 3.5 +local Att3006_Dist_min = 5 +local Att3006_Dist_max = 7.3 +REGISTER_GOAL_NO_UPDATE(GOAL_BigInunezumi120200_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3001_Dist_max +Att3000_Dist_min = Att3002_Dist_max +Att3000_Dist_min = Att3003_Dist_max +Att3000_Dist_min = Att3006_Dist_max +function BigInunezumi120200Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local GetWellSpace_Odds = 0 + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act08Per = 0 + ai:AddObserveRegion(0, TARGET_ENE_0, 1002700) + ai:AddObserveRegion(1, TARGET_ENE_0, 1002701) + ai:AddObserveRegion(2, TARGET_ENE_0, 1002702) + ai:AddObserveRegion(3, TARGET_ENE_0, 1002704) + ai:SetEventMoveTarget(1002703) + local Sumade = ai:GetDistAtoB(POINT_EVENT, TARGET_SELF) + if not not ai:IsInsideTargetRegion(TARGET_ENE_0, 1002700) or not not ai:IsInsideTargetRegion(TARGET_ENE_0, 1002701) or ai:IsInsideTargetRegion(TARGET_ENE_0, 1002702) then + Act05Per = 100 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1002704) then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 90) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 170) and targetDist <= 3.5 then + Act06Per = 100 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 90) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 170) and targetDist <= 3.5 then + Act07Per = 100 + elseif 5.1 <= targetDist then + Act01Per = 10 + Act02Per = 15 + Act03Per = 10 + Act04Per = 15 + Act08Per = 50 + else + Act01Per = 25 + Act02Per = 25 + Act03Per = 25 + Act04Per = 25 + Act08Per = 0 + end + else + Act05Per = 100 + end + local doAdmirer = ai:GetExcelParam(AI_EXCEL_THINK_PARAM_TYPE__thinkAttr_doAdmirer) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local Odds_Guard = 0 + if doAdmirer == 1 and role == ROLE_TYPE_Torimaki then + Torimaki_Act(ai, goal, Odds_Guard) + elseif doAdmirer == 1 and role == ROLE_TYPE_Kankyaku then + Kankyaku_Act(ai, goal, Odds_Guard) + else + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per) + if fateAct <= Act01Per then + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3000, TARGET_ENE_0, DIST_Middle, -1, 32) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per then + local AppDist = Att3001_Dist_max + local DashDist = Att3001_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3001, TARGET_ENE_0, DIST_Middle, -1, 32) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per then + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3002, TARGET_ENE_0, DIST_Middle, -1, 32) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3003, TARGET_ENE_0, DIST_Middle, -1, 32) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + if 2 <= Sumade then + ai:SetEventMoveTarget(1002703) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 1.5, POINT_EVENT, 0, TARGET_SELF, True, -1) + end + goal:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_Turn, 2, TARGET_ENE_0, 0, 0, 0) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + local Odds_Guard = 0 + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 5, 3004, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + local Odds_Guard = 0 + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 5, 3005, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + else + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 1.5 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3006, TARGET_ENE_0, DIST_Middle, -1, 32) + GetWellSpace_Odds = 100 + end + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds and fate2 > 70 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + end + return +end + +function BigInunezumi120200Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function BigInunezumi120200Battle_Terminate(ai, goal) + return +end + +function BigInunezumi120200Battle_Interupt(ai, goal) + if ai:IsInterupt(INTERUPT_Inside_ObserveArea) and ai:IsFinishTimer(0) == true then + ai:SetTimer(0, 2) + ai:Replaning() + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/120300_battle.lua b/scripts_decompiled/120300_battle.lua new file mode 100644 index 0000000..47b5cfe --- /dev/null +++ b/scripts_decompiled/120300_battle.lua @@ -0,0 +1,139 @@ +REGISTER_GOAL(GOAL_SnowInunezumi120300_Battle, "SnowInunezumi120300Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 0.8 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 0.8 +local Att3002_Dist_min = 0.8 +local Att3002_Dist_max = 1.9 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 1 +REGISTER_GOAL_NO_UPDATE(GOAL_SnowInunezumi120300_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3001_Dist_max +Att3000_Dist_min = Att3002_Dist_max +Att3000_Dist_min = Att3003_Dist_max +function SnowInunezumi120300Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local GetWellSpace_Odds = 0 + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + if 5 <= targetDist then + Act01Per = 15 + Act02Per = 15 + Act03Per = 55 + Act04Per = 15 + elseif 0.8 <= targetDist then + Act01Per = 25 + Act02Per = 25 + Act03Per = 25 + Act04Per = 25 + else + Act01Per = 35 + Act02Per = 35 + Act03Per = 0 + Act04Per = 30 + end + local doAdmirer = ai:GetExcelParam(AI_EXCEL_THINK_PARAM_TYPE__thinkAttr_doAdmirer) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local Odds_Guard = 0 + if doAdmirer == 1 and role == ROLE_TYPE_Torimaki then + Torimaki_Act(ai, goal, Odds_Guard) + elseif doAdmirer == 1 and role == ROLE_TYPE_Kankyaku then + Kankyaku_Act(ai, goal, Odds_Guard) + else + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per) + if fateAct <= Act01Per then + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 1.5 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Near, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Near, 0) + end + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per then + local AppDist = Att3001_Dist_max + local DashDist = Att3001_Dist_max + 1.5 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3001, TARGET_ENE_0, DIST_Near, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3001, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3000, TARGET_ENE_0, DIST_Near, 0) + end + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per then + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 1.5 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Near, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3002, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3000, TARGET_ENE_0, DIST_Near, 0) + end + GetWellSpace_Odds = 100 + else + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 1.5 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Near, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3003, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3000, TARGET_ENE_0, DIST_Near, 0) + end + GetWellSpace_Odds = 100 + end + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds and fate2 > 80 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, 2, TARGET_ENE_0, true, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Near, 0) + end + return +end + +function SnowInunezumi120300Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function SnowInunezumi120300Battle_Terminate(ai, goal) + return +end + +function SnowInunezumi120300Battle_Interupt(ai, goal) + local superStepDist = 3 + local superStepPer = 15 + local bkStepPer = 100 + local leftStepPer = 0 + local rightStepPer = 0 + local safetyDist = 3.5 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local oddsResponse = 20 + local bkStepPer = 100 + local leftStepPer = 0 + local rightStepPer = 0 + local safetyDist = 3.5 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end + end +end + +return diff --git a/scripts_decompiled/206000_battle.lua b/scripts_decompiled/206000_battle.lua new file mode 100644 index 0000000..af32540 --- /dev/null +++ b/scripts_decompiled/206000_battle.lua @@ -0,0 +1,213 @@ +REGISTER_GOAL(GOAL_Ghoul_Sword206000_Battle, "Ghoul_Sword206000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 1.7 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 1.5 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 2.3 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 3.8 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 1.8 +local Att3005_Dist_min = 4 +local Att3005_Dist_max = 6 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 3 +REGISTER_GOAL_NO_UPDATE(GOAL_Ghoul_Sword206000_Battle, 1) +Att3000_Dist_min = Att3001_Dist_max +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3002_Dist_max +Att3000_Dist_min = Att3004_Dist_max +function Ghoul_Sword206000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest() + if eventNo == 10 then + actPerArr[8] = 100 + elseif ai:IsLadderAct(TARGET_SELF) then + actPerArr[10] = 100 + elseif 8 <= targetDist then + actPerArr[1] = 10 + actPerArr[2] = 10 + actPerArr[3] = 10 + actPerArr[4] = 10 + actPerArr[5] = 50 + actPerArr[6] = 10 + elseif 4 <= targetDist then + actPerArr[1] = 10 + actPerArr[2] = 10 + actPerArr[3] = 10 + actPerArr[4] = 20 + actPerArr[5] = 30 + actPerArr[6] = 20 + elseif 3 <= targetDist then + actPerArr[1] = 10 + actPerArr[2] = 20 + actPerArr[3] = 20 + actPerArr[4] = 30 + actPerArr[5] = 10 + actPerArr[6] = 10 + else + actPerArr[1] = 0 + actPerArr[2] = 40 + actPerArr[3] = 20 + actPerArr[4] = 10 + actPerArr[5] = 0 + actPerArr[6] = 30 + end + local local0 = {Att3001_Dist_max, 0, 3001, DIST_Middle} + defFuncParamTbl[1] = local0 + local0 = {} + local local1, local2, local3, local4 = nil + local0[1] = Att3000_Dist_max + local0[2] = 0 + local0[3] = 40 + local0[4] = 100 + local0[5] = local1 + local0[6] = local2 + local0[7] = local3 + local0[8] = local4 + defFuncParamTbl[2] = local0 + local0 = {Att3002_Dist_max, 0, 3002, DIST_Middle} + defFuncParamTbl[3] = local0 + local0 = {Att3004_Dist_max, 0, 3004, DIST_Near, 3002, DIST_Middle, nil} + defFuncParamTbl[4] = local0 + actFuncArr[5] = REGIST_FUNC(ai, goal, Ghoul_Sword206000_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, Ghoul_Sword206000_Act06) + actFuncArr[8] = REGIST_FUNC(ai, goal, Ghoul_Sword206000_Act08) + actFuncArr[10] = REGIST_FUNC(ai, goal, Ghoul_Sword206000_Act10) + local0 = {0, 60, 10, 10, 10, 6, 4} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace_IncludeSidestep, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3003_Dist_max +function Ghoul_Sword206000_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_max +function Ghoul_Sword206000_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Ghoul_Sword206000_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 1), 0, 0, 0, 0) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 30, POINT_INITIAL, 2, TARGET_SELF, false, -1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3002_Dist_max +function Ghoul_Sword206000_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3002 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Ghoul_Sword206000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Ghoul_Sword206000Battle_Terminate(ai, goal) + return +end + +function Ghoul_Sword206000Battle_Interupt(ai, goal) + if ai:IsLadderAct(TARGET_SELF) then + return false + end + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local superStepDist = 3 + local superStepPer = 15 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer) then + return true + end + local distDamagedStep = 3 + local oddsDamagedStep = 15 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 4 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + end + local distGuardBreak_Act = 3.8 + local oddsGuardBreak_Act = 30 + local fate = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if 1.7 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + local distResNear = 8 + local distResFar = 20 + local oddsResNear = 0 + local oddsResFar = 20 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + elseif ResBehavID == 2 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + end + local oddsResponse = 20 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 4 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/206001_battle.lua b/scripts_decompiled/206001_battle.lua new file mode 100644 index 0000000..bd0df00 --- /dev/null +++ b/scripts_decompiled/206001_battle.lua @@ -0,0 +1,213 @@ +REGISTER_GOAL(GOAL_Ghoul_Spear206001_Battle, "Ghoul_Spear206001Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 2.4 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 3 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 2.5 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 3.8 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 1.8 +local Att3005_Dist_min = 4 +local Att3005_Dist_max = 6 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 3 +REGISTER_GOAL_NO_UPDATE(GOAL_Ghoul_Spear206001_Battle, 1) +Att3000_Dist_min = Att3001_Dist_max +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3002_Dist_max +Att3000_Dist_min = Att3004_Dist_max +function Ghoul_Spear206001Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest() + if eventNo == 10 then + actPerArr[8] = 100 + elseif ai:IsLadderAct(TARGET_SELF) then + actPerArr[10] = 100 + elseif 8 <= targetDist then + actPerArr[1] = 10 + actPerArr[2] = 10 + actPerArr[3] = 10 + actPerArr[4] = 10 + actPerArr[5] = 50 + actPerArr[6] = 10 + elseif 4 <= targetDist then + actPerArr[1] = 10 + actPerArr[2] = 10 + actPerArr[3] = 10 + actPerArr[4] = 20 + actPerArr[5] = 30 + actPerArr[6] = 20 + elseif 3 <= targetDist then + actPerArr[1] = 10 + actPerArr[2] = 20 + actPerArr[3] = 20 + actPerArr[4] = 30 + actPerArr[5] = 10 + actPerArr[6] = 10 + else + actPerArr[1] = 0 + actPerArr[2] = 40 + actPerArr[3] = 20 + actPerArr[4] = 10 + actPerArr[5] = 0 + actPerArr[6] = 30 + end + local local0 = {Att3001_Dist_max, 0, 3001, DIST_Middle} + defFuncParamTbl[1] = local0 + local0 = {} + local local1, local2, local3, local4 = nil + local0[1] = Att3000_Dist_max + local0[2] = 0 + local0[3] = 40 + local0[4] = 100 + local0[5] = local1 + local0[6] = local2 + local0[7] = local3 + local0[8] = local4 + defFuncParamTbl[2] = local0 + local0 = {Att3002_Dist_max, 0, 3002, DIST_Middle} + defFuncParamTbl[3] = local0 + local0 = {Att3004_Dist_max, 0, 3004, DIST_Near, 3002, DIST_Middle, nil} + defFuncParamTbl[4] = local0 + actFuncArr[5] = REGIST_FUNC(ai, goal, Ghoul_Spear206001_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, Ghoul_Spear206001_Act06) + actFuncArr[8] = REGIST_FUNC(ai, goal, Ghoul_Spear206001_Act08) + actFuncArr[10] = REGIST_FUNC(ai, goal, Ghoul_Spear206001_Act10) + local0 = {0, 60, 10, 10, 10, 6, 4} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace_IncludeSidestep, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3003_Dist_max +function Ghoul_Spear206001_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_max +function Ghoul_Spear206001_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Ghoul_Spear206001_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 1), 0, 0, 0, 0) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 30, POINT_INITIAL, 2, TARGET_SELF, false, -1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3002_Dist_max +function Ghoul_Spear206001_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3002 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Ghoul_Spear206001Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Ghoul_Spear206001Battle_Terminate(ai, goal) + return +end + +function Ghoul_Spear206001Battle_Interupt(ai, goal) + if ai:IsLadderAct(TARGET_SELF) then + return false + end + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local superStepDist = 3 + local superStepPer = 15 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer) then + return true + end + local distDamagedStep = 3 + local oddsDamagedStep = 15 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 4 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + end + local distGuardBreak_Act = 3.8 + local oddsGuardBreak_Act = 40 + local fate = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if 2.4 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + local distResNear = 8 + local distResFar = 20 + local oddsResNear = 0 + local oddsResFar = 20 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + elseif ResBehavID == 2 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + end + local oddsResponse = 20 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 4 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/206002_battle.lua b/scripts_decompiled/206002_battle.lua new file mode 100644 index 0000000..6ae2e38 --- /dev/null +++ b/scripts_decompiled/206002_battle.lua @@ -0,0 +1,217 @@ +REGISTER_GOAL(GOAL_Ghoul_Human206002_Battle, "Ghoul_Human206002Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 2.2 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 2.6 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 3.1 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 3.8 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 1.8 +local Att3005_Dist_min = 4 +local Att3005_Dist_max = 6 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 3 +REGISTER_GOAL_NO_UPDATE(GOAL_Ghoul_Human206002_Battle, 1) +Att3000_Dist_min = Att3001_Dist_max +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3002_Dist_max +Att3000_Dist_min = Att3004_Dist_max +function Ghoul_Human206002Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest() + if eventNo == 10 then + actPerArr[8] = 100 + elseif ai:IsLadderAct(TARGET_SELF) then + actPerArr[10] = 100 + elseif 8 <= targetDist then + actPerArr[1] = 10 + actPerArr[2] = 10 + actPerArr[3] = 10 + actPerArr[4] = 10 + actPerArr[5] = 50 + actPerArr[6] = 10 + elseif 4 <= targetDist then + actPerArr[1] = 10 + actPerArr[2] = 10 + actPerArr[3] = 10 + actPerArr[4] = 20 + actPerArr[5] = 30 + actPerArr[6] = 20 + elseif 3 <= targetDist then + actPerArr[1] = 10 + actPerArr[2] = 20 + actPerArr[3] = 20 + actPerArr[4] = 30 + actPerArr[5] = 10 + actPerArr[6] = 10 + else + actPerArr[1] = 0 + actPerArr[2] = 40 + actPerArr[3] = 20 + actPerArr[4] = 10 + actPerArr[5] = 0 + actPerArr[6] = 30 + end + local local0 = {Att3001_Dist_max, 0, 3001, DIST_Middle} + defFuncParamTbl[1] = local0 + local0 = {} + local local1, local2, local3, local4 = nil + local0[1] = Att3000_Dist_max + local0[2] = 0 + local0[3] = 40 + local0[4] = 100 + local0[5] = local1 + local0[6] = local2 + local0[7] = local3 + local0[8] = local4 + defFuncParamTbl[2] = local0 + local0 = {Att3002_Dist_max, 0, 3002, DIST_Middle} + defFuncParamTbl[3] = local0 + local0 = {Att3004_Dist_max, 0, 3004, DIST_Near, 3002, DIST_Middle, nil} + defFuncParamTbl[4] = local0 + actFuncArr[5] = REGIST_FUNC(ai, goal, Ghoul_Human206002_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, Ghoul_Human206002_Act06) + actFuncArr[8] = REGIST_FUNC(ai, goal, Ghoul_Human206002_Act08) + actFuncArr[10] = REGIST_FUNC(ai, goal, Ghoul_Human206002_Act10) + local0 = {0, 60, 10, 10, 10, 6, 4} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace_IncludeSidestep, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3003_Dist_max +function Ghoul_Human206002_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_max +function Ghoul_Human206002_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Ghoul_Human206002_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 1), 0, 0, 0, 0) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 30, POINT_INITIAL, 2, TARGET_SELF, false, -1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3002_Dist_max +function Ghoul_Human206002_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3002 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Ghoul_Human206002Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Ghoul_Human206002Battle_Terminate(ai, goal) + return +end + +function Ghoul_Human206002Battle_Interupt(ai, goal) + if ai:IsLadderAct(TARGET_SELF) then + return false + end + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if ai:IsFinishTimer(0) == true then + ai:SetTimer(0, 2) + local intodds = ai:GetRandam_Int(1, 100) + end + local superStepDist = 3 + local superStepPer = 15 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer) then + return true + end + local distDamagedStep = 3 + local oddsDamagedStep = 15 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 4 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + end + local distGuardBreak_Act = 3.8 + local oddsGuardBreak_Act = 40 + local fate = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if 2.2 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + local distResNear = 8 + local distResFar = 20 + local oddsResNear = 0 + local oddsResFar = 20 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + elseif ResBehavID == 2 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + end + local oddsResponse = 15 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 4 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/223000_battle.lua b/scripts_decompiled/223000_battle.lua new file mode 100644 index 0000000..7b3c6a7 --- /dev/null +++ b/scripts_decompiled/223000_battle.lua @@ -0,0 +1,248 @@ +REGISTER_GOAL(GOAL_GreaterDemon223000_Battle, "GreaterDemon223000Battle") +local Att3000_Dist_min = 6 +local Att3000_Dist_max = 12 +local Att3002_Dist_min = 4 +local Att3002_Dist_max = 12 +local Att3004_Dist_min = 14 +local Att3004_Dist_max = 19 +local Att3005_Dist_min = -3 +local Att3005_Dist_max = 2 +local Att3006_Dist_min = 3 +local Att3006_Dist_max = 10 +local Att3007_Dist_min = -3 +local Att3007_Dist_max = 5 +REGISTER_GOAL_NO_UPDATE(GOAL_GreaterDemon223000_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +function GreaterDemon223000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest(0) + if eventNo == 10 then + actPerArr[9] = 100 + elseif 14 <= targetDist then + actPerArr[1] = 10 + actPerArr[2] = 5 + actPerArr[4] = 0 + actPerArr[5] = 20 + actPerArr[6] = 0 + actPerArr[7] = 65 + actPerArr[8] = 0 + elseif 10 <= targetDist then + actPerArr[1] = 50 + actPerArr[2] = 40 + actPerArr[4] = 0 + actPerArr[5] = 10 + actPerArr[6] = 0 + actPerArr[7] = 0 + actPerArr[8] = 0 + elseif 6 <= targetDist then + actPerArr[1] = 25 + actPerArr[2] = 25 + actPerArr[4] = 0 + actPerArr[5] = 40 + actPerArr[6] = 0 + actPerArr[7] = 0 + actPerArr[8] = 10 + elseif 2.5 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[4] = 0 + actPerArr[5] = 50 + actPerArr[6] = 15 + actPerArr[7] = 0 + actPerArr[8] = 35 + elseif 0.5 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[4] = 10 + actPerArr[5] = 0 + actPerArr[6] = 55 + actPerArr[7] = 0 + actPerArr[8] = 35 + else + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[4] = 50 + actPerArr[5] = 0 + actPerArr[6] = 25 + actPerArr[7] = 0 + actPerArr[8] = 25 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, GreaterDemon223000_Act01) + local local0 = {Att3000_Dist_max, 0, 20, 80} + defFuncParamTbl[2] = local0 + actFuncArr[4] = REGIST_FUNC(ai, goal, GreaterDemon223000_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, GreaterDemon223000_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, GreaterDemon223000_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, GreaterDemon223000_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, GreaterDemon223000_Act08) + actFuncArr[9] = REGIST_FUNC(ai, goal, GreaterDemon223000_Act09) + local atkAfterFunc = REGIST_FUNC(ai, goal, GreaterDemon223000_ActAfter_AdjustSpace) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3002_Dist_max +function GreaterDemon223000_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3005_Dist_max +function GreaterDemon223000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 6 + local Odds_Guard = 0 + local AttID = 3005 + local AttDist = DIST_Middle + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3005, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_max +function GreaterDemon223000_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 6 + local Odds_Guard = 0 + local AttID = 3006 + local AttDist = DIST_Far + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3007_Dist_max +function GreaterDemon223000_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 6 + local Odds_Guard = 0 + local AttID = 3007 + local AttDist = DIST_Middle + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3007, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3004_Dist_max +function GreaterDemon223000_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 6 + local Odds_Guard = 0 + local AttID = 3004 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function GreaterDemon223000_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, -1, AI_DIR_TYPE_B, 6) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function GreaterDemon223000_Act09(ai, goal) + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, 20, POINT_MOVE_POINT, AI_DIR_TYPE_CENTER, 2, TARGET_SELF, true) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function GreaterDemon223000_ActAfter_AdjustSpace(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate > 75 then + if fate <= 90 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 2.5, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(15, 30), true, true, -1) + return true + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, -1, AI_DIR_TYPE_B, 6) + return true + end + else + return false + end +end + +function GreaterDemon223000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function GreaterDemon223000Battle_Terminate(ai, goal) + return +end + +function GreaterDemon223000Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local superStepDist = 3 + local superStepPer = 5 + local bkStepPer = 100 + local leftStepPer = 0 + local rightStepPer = 0 + local safetyDist = 6 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distDamagedStep = 3 + local oddsDamagedStep = 5 + local bkStepPer = 100 + local leftStepPer = 0 + local rightStepPer = 0 + local safetyDist = 6 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distUseItem_Act = 12 + local oddsUseItem_Act = 15 + local targetDist = ai:GetDist(TARGET_ENE_0) + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if 10 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + elseif 6 <= targetDist then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + end + elseif 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + return false + end + end + end +end + +return diff --git a/scripts_decompiled/223100_battle.lua b/scripts_decompiled/223100_battle.lua new file mode 100644 index 0000000..2e9596b --- /dev/null +++ b/scripts_decompiled/223100_battle.lua @@ -0,0 +1,244 @@ +REGISTER_GOAL(GOAL_SnowDemon223100_Battle, "SnowDemon223100Battle") +local Att3000_Dist_min = 6 +local Att3000_Dist_max = 12 +local Att3002_Dist_min = 4 +local Att3002_Dist_max = 12 +local Att3004_Dist_min = 14 +local Att3004_Dist_max = 19 +local Att3005_Dist_min = -3 +local Att3005_Dist_max = 2 +local Att3006_Dist_min = 3 +local Att3006_Dist_max = 10 +local Att3007_Dist_min = -3 +local Att3007_Dist_max = 5 +REGISTER_GOAL_NO_UPDATE(GOAL_SnowDemon223100_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +function SnowDemon223100Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if 14 <= targetDist then + actPerArr[1] = 10 + actPerArr[2] = 5 + actPerArr[4] = 0 + actPerArr[5] = 20 + actPerArr[6] = 0 + actPerArr[7] = 65 + actPerArr[8] = 0 + elseif 10 <= targetDist then + actPerArr[1] = 50 + actPerArr[2] = 40 + actPerArr[4] = 0 + actPerArr[5] = 10 + actPerArr[6] = 0 + actPerArr[7] = 0 + actPerArr[8] = 0 + elseif 6 <= targetDist then + actPerArr[1] = 25 + actPerArr[2] = 25 + actPerArr[4] = 0 + actPerArr[5] = 40 + actPerArr[6] = 0 + actPerArr[7] = 0 + actPerArr[8] = 10 + elseif 2 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[4] = 0 + actPerArr[5] = 50 + actPerArr[6] = 10 + actPerArr[7] = 0 + actPerArr[8] = 40 + elseif 0.5 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[4] = 45 + actPerArr[5] = 0 + actPerArr[6] = 15 + actPerArr[7] = 0 + actPerArr[8] = 40 + else + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[4] = 55 + actPerArr[5] = 0 + actPerArr[6] = 15 + actPerArr[7] = 0 + actPerArr[8] = 30 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, SnowDemon223100_Act01) + local local0 = {Att3000_Dist_max, 0, 20, 80} + defFuncParamTbl[2] = local0 + actFuncArr[4] = REGIST_FUNC(ai, goal, SnowDemon223100_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, SnowDemon223100_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, SnowDemon223100_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, SnowDemon223100_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, SnowDemon223100_Act08) + local atkAfterFunc = REGIST_FUNC(ai, goal, SnowDemon223100_ActAfter_AdjustSpace) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3002_Dist_max +function SnowDemon223100_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3005_Dist_max +function SnowDemon223100_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 6 + local Odds_Guard = 0 + local AttID = 3005 + local AttDist = DIST_Middle + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3005, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_max +function SnowDemon223100_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 6 + local Odds_Guard = 0 + local AttID = 3006 + local AttDist = DIST_Far + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3007_Dist_max +function SnowDemon223100_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 6 + local Odds_Guard = 0 + local AttID = 3007 + local AttDist = DIST_Middle + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3007, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3004_Dist_max +function SnowDemon223100_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 6 + local Odds_Guard = 0 + local AttID = 3004 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function SnowDemon223100_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, -1, AI_DIR_TYPE_B, 2) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function SnowDemon223100_ActAfter_AdjustSpace(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate > 75 then + if fate <= 90 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 2.5, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(15, 30), true, true, -1) + return true + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, -1, AI_DIR_TYPE_B, 6) + return true + end + else + return false + end +end + +function SnowDemon223100Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function SnowDemon223100Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3007_Dist_max +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3002_Dist_max +Att3000_Dist_min = Att3006_Dist_max +function SnowDemon223100Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local superStepDist = 3 + local superStepPer = 5 + local bkStepPer = 100 + local leftStepPer = 0 + local rightStepPer = 0 + local safetyDist = 6 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distDamagedStep = 3 + local oddsDamagedStep = 5 + local bkStepPer = 100 + local leftStepPer = 0 + local rightStepPer = 0 + local safetyDist = 6 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distUseItem_Act = 15 + local oddsUseItem_Act = 15 + local targetDist = ai:GetDist(TARGET_ENE_0) + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if 10.5 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3007_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + elseif 5.2 <= targetDist then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3002_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + end + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3006_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + return false + end + end + end +end + +return diff --git a/scripts_decompiled/223200_battle.lua b/scripts_decompiled/223200_battle.lua new file mode 100644 index 0000000..125e347 --- /dev/null +++ b/scripts_decompiled/223200_battle.lua @@ -0,0 +1,397 @@ +REGISTER_GOAL(GOAL_MiniGreaterDemon223200_Battle, "MiniGreaterDemon223200Battle") +local Att3000_Dist_min = 7.4 +local Att3000_Dist_max = 9.6 +local Att3001_Dist_min = 7 +local Att3001_Dist_max = 8 +local Att3002_Dist_min = 5 +local Att3002_Dist_max = 6.6 +local Att3003_Dist_min = 4.2 +local Att3003_Dist_max = 6.4 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 1.7 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 1 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 1.5 +local Att3007_Dist_min = 10.5 +local Att3007_Dist_max = 11.9 +local Att3008_Dist_min = -3 +local Att3008_Dist_max = 0 +local Att3014_Dist_min = 6 +local Att3014_Dist_max = 8 +REGISTER_GOAL_NO_UPDATE(GOAL_MiniGreaterDemon223200_Battle, 1) +function MiniGreaterDemon223200Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + ai:AddObserveChrDmySphere(0, TARGET_ENE_0, 3, 2) + ai:AddObserveChrDmySphere(1, TARGET_ENE_0, 4, 3) + local targetDist = ai:GetDist(TARGET_ENE_0) + local targetDistY = ai:GetDistYSigned(TARGET_ENE_0) + local flag = ai:GetNumber(0) + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1812350) and flag == 0 then + actPerArr[12] = 100 + ai:SetNumber(0, 1) + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1812350) and flag == 1 and ai:GetNumber(1) <= 2 then + actPerArr[13] = 100 + local StateNo = ai:GetNumber(1) + ai:SetNumber(1, StateNo + 1) + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1812996) and flag == 1 then + actPerArr[14] = 100 + ai:SetNumber(0, 0) + ai:SetNumber(1, 0) + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1812350) and flag == 1 and ai:GetNumber(1) == 3 then + actPerArr[15] = 100 + ai:SetNumber(0, 0) + ai:SetNumber(1, 0) + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1812351) then + actPerArr[6] = 100 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1812352) then + actPerArr[6] = 100 + elseif not ai:IsInsideTargetRegion(TARGET_ENE_0, 1812990) then + actPerArr[16] = 100 + elseif ai:IsInsideObserve(0) then + actPerArr[4] = 15 + actPerArr[8] = 85 + elseif ai:IsInsideObserve(1) then + actPerArr[4] = 15 + actPerArr[9] = 85 + elseif 11.5 <= targetDist then + actPerArr[1] = 70 + actPerArr[2] = 5 + actPerArr[5] = 10 + actPerArr[7] = 10 + actPerArr[11] = 5 + elseif 7 <= targetDist then + actPerArr[2] = 15 + actPerArr[3] = 0 + actPerArr[5] = 35 + actPerArr[7] = 35 + actPerArr[11] = 15 + elseif 4.2 <= targetDist then + actPerArr[2] = 45 + actPerArr[3] = 10 + actPerArr[5] = 0 + actPerArr[7] = 0 + actPerArr[11] = 45 + elseif 1.5 <= targetDist then + actPerArr[2] = 20 + actPerArr[3] = 50 + actPerArr[5] = 5 + actPerArr[7] = 5 + actPerArr[11] = 20 + else + actPerArr[2] = 0 + actPerArr[3] = 45 + actPerArr[4] = 45 + actPerArr[5] = 0 + actPerArr[7] = 0 + actPerArr[11] = 10 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, MiniGreaterDemon223200_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, MiniGreaterDemon223200_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, MiniGreaterDemon223200_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, MiniGreaterDemon223200_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, MiniGreaterDemon223200_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, MiniGreaterDemon223200_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, MiniGreaterDemon223200_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, MiniGreaterDemon223200_Act08) + actFuncArr[9] = REGIST_FUNC(ai, goal, MiniGreaterDemon223200_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, MiniGreaterDemon223200_Act10) + actFuncArr[11] = REGIST_FUNC(ai, goal, MiniGreaterDemon223200_Act11) + actFuncArr[12] = REGIST_FUNC(ai, goal, MiniGreaterDemon223200_Act12) + actFuncArr[13] = REGIST_FUNC(ai, goal, MiniGreaterDemon223200_Act13) + actFuncArr[14] = REGIST_FUNC(ai, goal, MiniGreaterDemon223200_Act14) + actFuncArr[15] = REGIST_FUNC(ai, goal, MiniGreaterDemon223200_Act15) + actFuncArr[16] = REGIST_FUNC(ai, goal, MiniGreaterDemon223200_Act16) + local atkAfterFunc = REGIST_FUNC(ai, goal, MiniGreaterDemon223200_ActAfter_AdjustSpace) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3007_Dist_max +function MiniGreaterDemon223200_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 6 + local Odds_Guard = 0 + local AttID = 3007 + local AttDist = DIST_Middle + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3002_Dist_max +function MiniGreaterDemon223200_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 6 + local Odds_Guard = 0 + local AttID = 3002 + local AttDist = DIST_Middle + if fate <= 10 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 20 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3011, TARGET_ENE_0, DIST_Middle, 0) + else + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3011, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3012, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_max +function MiniGreaterDemon223200_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 6 + local Odds_Guard = 0 + local AttID = 3006 + local AttDist = DIST_Middle + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3008_Dist_max +function MiniGreaterDemon223200_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3008_Dist_max + local DashDist = Att3008_Dist_max + 6 + local Odds_Guard = 0 + local AttID = 3008 + local AttDist = DIST_Middle + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3008, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3000_Dist_max +function MiniGreaterDemon223200_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 6 + local Odds_Guard = 0 + local AttID = 3000 + local AttDist = DIST_Middle + if fate <= 10 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3010, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3014_Dist_max +function MiniGreaterDemon223200_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local waitTime = ai:GetRandam_Float(0.1, 3) + local AppDist = Att3014_Dist_max + local DashDist = Att3014_Dist_max + 6 + local Odds_Guard = 0 + local AttID = 3014 + local AttDist = DIST_Middle + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3014, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3001_Dist_max +function MiniGreaterDemon223200_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3001_Dist_max + local DashDist = Att3001_Dist_max + 6 + local Odds_Guard = 0 + local AttID = 3001 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3004_Dist_max +function MiniGreaterDemon223200_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 6 + local Odds_Guard = 0 + local AttID = 3004 + local AttDist = DIST_Middle + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3004, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3005_Dist_max +function MiniGreaterDemon223200_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 6 + local Odds_Guard = 0 + local AttID = 3005 + local AttDist = DIST_Middle + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3005, TARGET_ENE_0, DIST_Middle, 0, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function MiniGreaterDemon223200_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 6) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3003_Dist_max +function MiniGreaterDemon223200_Act11(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 6 + local Odds_Guard = 0 + local AttID = 3003 + local AttDist = DIST_Middle + if fate <= 10 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3013, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function MiniGreaterDemon223200_Act12(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3020, TARGET_ENE_0, DIST_Middle) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function MiniGreaterDemon223200_Act13(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3021, TARGET_ENE_0, DIST_Middle) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function MiniGreaterDemon223200_Act14(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3022, TARGET_ENE_0, DIST_Middle) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function MiniGreaterDemon223200_Act15(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3023, TARGET_ENE_0, DIST_Middle) + GetWellSpace_Odds = 0 + return +end + +function MiniGreaterDemon223200_Act16(ai, goal, paramTbl) + ai:SetEventMoveTarget(1812301) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, POINT_INITIAL, 2, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 2), TARGET_ENE_0, 0, 0, 0) + goal:AddSubGoal(GOAL_COMMON_Turn, 2, TARGET_ENE_0, 0, 0, 0) + GetWellSpace_Odds = 0 + return +end + +function MiniGreaterDemon223200Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function MiniGreaterDemon223200_ActAfter_AdjustSpace(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate > 80 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 2.5, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(15, 30), true, true, -1) + return true + else + return false + end +end + +function MiniGreaterDemon223200Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3007_Dist_max +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3002_Dist_max +Att3000_Dist_min = Att3006_Dist_max +function MiniGreaterDemon223200Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local superStepDist = 3 + local superStepPer = 5 + local bkStepPer = 100 + local leftStepPer = 0 + local rightStepPer = 0 + local safetyDist = 6 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distDamagedStep = 3 + local oddsDamagedStep = 5 + local bkStepPer = 100 + local leftStepPer = 0 + local rightStepPer = 0 + local safetyDist = 6 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distUseItem_Act = 15 + local oddsUseItem_Act = 15 + local targetDist = ai:GetDist(TARGET_ENE_0) + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if 10.5 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3007_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + elseif 5.2 <= targetDist then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3002_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + end + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3006_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + return false + end + end + end +end + +return diff --git a/scripts_decompiled/224000_battle.lua b/scripts_decompiled/224000_battle.lua new file mode 100644 index 0000000..37fb03a --- /dev/null +++ b/scripts_decompiled/224000_battle.lua @@ -0,0 +1,249 @@ +REGISTER_GOAL(GOAL_Nata224000_Battle, "Nata224000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 3.5 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 3.5 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 3.5 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 3.5 +local Att3004_Dist_min = 4 +local Att3004_Dist_max = 6.5 +local Att3005_Dist_min = 2 +local Att3005_Dist_max = 3 +REGISTER_GOAL_NO_UPDATE(GOAL_Nata224000_Battle, 1) +Att3000_Dist_min = Att3002_Dist_max +function Nata224000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if 8 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 10 + actPerArr[3] = 0 + actPerArr[4] = 10 + actPerArr[7] = 80 + actPerArr[8] = 0 + elseif 4 <= targetDist then + actPerArr[1] = 15 + actPerArr[2] = 25 + actPerArr[3] = 15 + actPerArr[4] = 25 + actPerArr[7] = 20 + actPerArr[8] = 0 + elseif 2 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 30 + actPerArr[3] = 20 + actPerArr[4] = 30 + actPerArr[7] = 0 + actPerArr[8] = 0 + else + actPerArr[1] = 15 + actPerArr[2] = 20 + actPerArr[3] = 15 + actPerArr[4] = 20 + actPerArr[7] = 0 + actPerArr[8] = 30 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Nata224000_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Nata224000_Act02) + local local0 = {Att3002_Dist_max, 0, 3002, DIST_Middle} + defFuncParamTbl[3] = local0 + actFuncArr[4] = REGIST_FUNC(ai, goal, Nata224000_Act04) + actFuncArr[7] = REGIST_FUNC(ai, goal, Nata224000_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, Nata224000_Act08) + local atkAfterFunc = REGIST_FUNC(ai, goal, Nata224000_ActAfter_AdjustSpace) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function Nata224000_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3005_Dist_max +function Nata224000_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3005 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3003_Dist_max +function Nata224000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3004_Dist_max +function Nata224000_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3004 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Nata224000_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, -1, AI_DIR_TYPE_B, 4) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Nata224000_ActAfter_AdjustSpace(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate > 80 then + if fate <= 90 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 2.5, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(15, 30), true, true, -1) + return true + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + else + return false + end +end + +function Nata224000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Nata224000Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3004_Dist_max +function Nata224000Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local superStepDist = 3 + local superStepPer = 15 + local bkStepPer = 60 + local leftStepPer = 20 + local rightStepPer = 20 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer) then + return true + end + local distDamagedStep = 3 + local oddsDamagedStep = 15 + local bkStepPer = 60 + local leftStepPer = 20 + local rightStepPer = 20 + local safetyDist = 3.5 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + end + local distGuardBreak_Act = 8 + local oddsGuardBreak_Act = 30 + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if targetDist <= 3.5 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3004_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + else + local distMissSwing_Attack = 6.5 + local oddsMissSwing_Attack = 30 + local AttID = 3003 + if MissSwing_Attack(ai, goal, distMissSwing_Attack, oddsMissSwing_Attack, AttID) then + if targetDist <= 3.5 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + local distUseItem_Act = 9 + local oddsUseItem_Act = 60 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if targetDist <= 3.5 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3004_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + local distResNear = 12 + local distResFar = 20 + local oddsResNear = 0 + local oddsResFar = 30 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + elseif ResBehavID == 2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + end + local oddsResponse = 50 + local bkStepPer = 60 + local leftStepPer = 20 + local rightStepPer = 20 + local safetyDist = 3.5 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end + end +end + +return diff --git a/scripts_decompiled/225000_battle.lua b/scripts_decompiled/225000_battle.lua new file mode 100644 index 0000000..8f992b4 --- /dev/null +++ b/scripts_decompiled/225000_battle.lua @@ -0,0 +1,306 @@ +REGISTER_GOAL(GOAL_Hammer_m10_225000_Battle, "Hammer_m10_225000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 3 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 2 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 4 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 2.9 +local Att3004_Dist_min = 6.5 +local Att3004_Dist_max = 8.5 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 3 +local Att3006_Dist_min = -1.4 +local Att3006_Dist_max = 1.1 +REGISTER_GOAL_NO_UPDATE(GOAL_Hammer_m10_225000_Battle, 1) +function OnIf_225000(ai, goal, codeNo) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if codeNo == 0 then + ai:SetEventMoveTarget(1012745) + goal:AddSubGoal(GOAL_COMMON_Turn, 10, POINT_EVENT, 5, 0, 0) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 26, 3009, POINT_EVENT, DIST_None, 5, 5) + elseif codeNo == 1 then + ai:SetEventMoveTarget(1012744) + goal:AddSubGoal(GOAL_COMMON_Turn, 10, POINT_EVENT, 5, 0, 0) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 3, 3008, POINT_EVENT, DIST_None, 5, 5) + elseif codeNo == 2 then + ai:SetEventMoveTarget(1012745) + goal:AddSubGoal(GOAL_COMMON_Turn, 10, POINT_EVENT, 5, 0, 0) + end + return +end + +function Hammer_m10_225000Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act08Per = 0 + local Act09Per = 0 + local Act10Per = 0 + local Act11Per = 0 + local Act12Per = 0 + local GetWellSpace_Odds = 100 + ai:AddObserveRegion(0, TARGET_SELF, 1012740) + ai:AddObserveRegion(1, TARGET_SELF, 1012741) + ai:AddObserveRegion(2, TARGET_ENE_0, 1012742) + ai:AddObserveRegion(3, TARGET_ENE_0, 1012743) + ai:AddObserveRegion(4, TARGET_SELF, 1012742) + ai:AddObserveRegion(5, TARGET_SELF, 1012743) + if 15 <= targetDist then + Act01Per = 0 + Act02Per = 0 + Act03Per = 25 + Act04Per = 75 + Act05Per = 0 + Act06Per = 0 + elseif 7 <= targetDist then + Act01Per = 0 + Act02Per = 0 + Act03Per = 40 + Act04Per = 60 + Act05Per = 0 + Act06Per = 0 + elseif 3 <= targetDist then + Act01Per = 20 + Act02Per = 15 + Act03Per = 35 + Act04Per = 0 + Act05Per = 15 + Act06Per = 15 + else + Act01Per = 20 + Act02Per = 20 + Act03Per = 20 + Act04Per = 0 + Act05Per = 20 + Act06Per = 20 + end + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per) + local flag = ai:GetNumber(0) + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1012743) and ai:IsInsideTargetRegion(TARGET_SELF, 1012742) and flag == 0 then + Hammer_m10_225000_Act09(ai, goal) + ai:SetNumber(0, 1) + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1012742) and ai:IsInsideTargetRegion(TARGET_SELF, 1012743) then + Hammer_m10_225000_Act07(ai, goal) + ai:SetNumber(0, 0) + ai:SetNumber(1, 0) + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1012743) and flag == 1 and ai:GetNumber(1) <= 2 then + Hammer_m10_225000_Act10(ai, goal) + local StateNo = ai:GetNumber(1) + ai:SetNumber(1, StateNo + 1) + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1012742) and flag == 1 then + Hammer_m10_225000_Act11(ai, goal) + ai:SetNumber(0, 0) + ai:SetNumber(1, 0) + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1012743) and flag == 1 and ai:GetNumber(1) == 3 then + Hammer_m10_225000_Act08(ai, goal) + ai:SetNumber(0, 0) + ai:SetNumber(1, 0) + elseif fateAct <= Act01Per then + Hammer_m10_225000_Act01(ai, goal) + elseif fateAct <= Act01Per + Act02Per then + Hammer_m10_225000_Act02(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per then + Hammer_m10_225000_Act03(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + Hammer_m10_225000_Act04(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + Hammer_m10_225000_Act05(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + Hammer_m10_225000_Act06(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + Hammer_m10_225000_Act07(ai, goal) + else + Hammer_m10_225000_Act08(ai, goal) + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + Hammer_m10_225000_GetWellSpace_Act(ai, goal) + end + return +end + +Att3000_Dist_min = Att3000_Dist_max +function Hammer_m10_225000_Act01(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 17, 10, 10) + GetWellSpace_Odds = 100 + return +end + +Att3000_Dist_min = Att3001_Dist_max +function Hammer_m10_225000_Act02(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3001_Dist_max + local DashDist = Att3001_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3001, TARGET_ENE_0, DIST_Middle, -1, 22, 10, 10) + GetWellSpace_Odds = 100 + return +end + +Att3000_Dist_min = Att3002_Dist_max +Att3000_Dist_min = Att3003_Dist_max +function Hammer_m10_225000_Act03(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if fate <= 50 then + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate2 <= 80 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, DIST_Middle, -1, 38, 10, 10) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3002, TARGET_ENE_0, DIST_Middle, -1, 38, 10, 10) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, DIST_Middle, 10, 10) + end + else + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate2 <= 80 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3003, TARGET_ENE_0, DIST_Middle, -1, 38, 10, 10) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3003, TARGET_ENE_0, DIST_Middle, -1, 38, 10, 10) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Middle, 10, 10) + end + end + GetWellSpace_Odds = 100 + return +end + +Att3000_Dist_min = Att3004_Dist_max +function Hammer_m10_225000_Act04(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3004, TARGET_ENE_0, DIST_Middle, -1, 27, 10, 10) + GetWellSpace_Odds = 100 + return +end + +Att3000_Dist_min = Att3005_Dist_max +function Hammer_m10_225000_Act05(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3005, TARGET_ENE_0, DIST_Middle, -1, 14, 10, 10) + GetWellSpace_Odds = 100 + return +end + +Att3000_Dist_min = Att3006_Dist_max +function Hammer_m10_225000_Act06(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, DIST_Middle, -1, 23, 10, 10) + GetWellSpace_Odds = 100 + return +end + +function Hammer_m10_225000_Act07(ai, goal) + ai:SetEventMoveTarget(1012740) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 4, POINT_EVENT, 0.8, TARGET_SELF, True, -1) + goal:AddSubGoal(GOAL_COMMON_If, 10, 1) + GetWellSpace_Odds = 0 + return +end + +function Hammer_m10_225000_Act08(ai, goal) + ai:SetEventMoveTarget(1012741) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 4, POINT_EVENT, 0.7, TARGET_SELF, True, -1) + goal:AddSubGoal(GOAL_COMMON_If, 26, 0) + GetWellSpace_Odds = 0 + return +end + +function Hammer_m10_225000_Act09(ai, goal) + ai:SetEventMoveTarget(1012741) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 30, POINT_EVENT, 0.1, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_If, 26, 2) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3010, TARGET_ENE_0, DIST_Middle) + GetWellSpace_Odds = 0 + return +end + +function Hammer_m10_225000_Act10(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3011, TARGET_ENE_0, DIST_Middle) + GetWellSpace_Odds = 0 + return +end + +function Hammer_m10_225000_Act11(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3012, TARGET_ENE_0, DIST_Middle) + GetWellSpace_Odds = 0 + return +end + +function Hamme_m10_r225000_Act12(ai, goal) + ai:SetEventMoveTarget(1012741) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 30, POINT_EVENT, 0.1, TARGET_SELF, false, -1) + GetWellSpace_Odds = 0 + return +end + +function Hammer_m10_225000_GetWellSpace_Act(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate > 30 then + if fate <= 85 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 6) + return true + elseif fate <= 90 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 2.5, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(15, 30), true, true, -1) + return true + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 6, TARGET_ENE_0, true, -1) + return true + end + else + return false + end +end + +function Hammer_m10_225000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Hammer_m10_225000Battle_Terminate(ai, goal) + return +end + +function Hammer_m10_225000Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/225001_battle.lua b/scripts_decompiled/225001_battle.lua new file mode 100644 index 0000000..5c95fb4 --- /dev/null +++ b/scripts_decompiled/225001_battle.lua @@ -0,0 +1,275 @@ +REGISTER_GOAL(GOAL_Hammer_m11_225001_Battle, "Hammer_m11_225001Battle") +local Att3000_Dist_min = -0.5 +local Att3000_Dist_max = 3.4 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 2.6 +local Att3002_Dist_min = 2.3 +local Att3002_Dist_max = 4.5 +local Att3003_Dist_min = -1.5 +local Att3003_Dist_max = 4.5 +local Att3004_Dist_min = 5.5 +local Att3004_Dist_max = 9.2 +local Att3005_Dist_min = -1 +local Att3005_Dist_max = 3.5 +local Att3006_Dist_min = -1.4 +local Att3006_Dist_max = 1.1 +REGISTER_GOAL_NO_UPDATE(GOAL_Hammer_m11_225001_Battle, 1) +function Hammer_m11_225001Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local GetWellSpace_Odds = 0 + if not ai:IsInsideTargetRegion(TARGET_ENE_0, 1812990) then + Act07Per = 100 + elseif 15 <= targetDist then + Act01Per = 0 + Act02Per = 0 + Act03Per = 25 + Act04Per = 75 + Act05Per = 0 + Act06Per = 0 + elseif 7 <= targetDist then + Act01Per = 0 + Act02Per = 0 + Act03Per = 40 + Act04Per = 60 + Act05Per = 0 + Act06Per = 0 + elseif 3 <= targetDist then + Act01Per = 20 + Act02Per = 15 + Act03Per = 35 + Act04Per = 0 + Act05Per = 15 + Act06Per = 15 + else + Act01Per = 20 + Act02Per = 20 + Act03Per = 20 + Act04Per = 0 + Act05Per = 20 + Act06Per = 20 + end + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per) + local flag = ai:GetNumber(0) + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1812350) and flag == 0 then + Hammer225001_Act08(ai, goal) + ai:SetNumber(0, 1) + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1812350) and flag == 1 and ai:GetNumber(1) <= 2 then + Hammer225001_Act09(ai, goal) + local StateNo = ai:GetNumber(1) + ai:SetNumber(1, StateNo + 1) + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1812996) and flag == 1 then + Hammer225001_Act10(ai, goal) + ai:SetNumber(0, 0) + ai:SetNumber(1, 0) + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1812350) and flag == 1 and ai:GetNumber(1) == 3 then + Hammer225001_Act11(ai, goal) + ai:SetNumber(0, 0) + ai:SetNumber(1, 0) + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1812351) then + Hammer225001_Act12(ai, goal) + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1812352) then + Hammer225001_Act12(ai, goal) + elseif fateAct <= Act01Per then + Hammer225001_Act01(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per then + Hammer225001_Act02(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per then + Hammer225001_Act03(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + Hammer225001_Act04(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + Hammer225001_Act05(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + Hammer225001_Act06(ai, goal) + GetWellSpace_Odds = 100 + else + Hammer225001_Act07(ai, goal) + GetWellSpace_Odds = 0 + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + Hammer225001_GetWellSpace_Act(ai, goal) + end + return +end + +Att3000_Dist_min = Att3000_Dist_max +function Hammer225001_Act01(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 25) + GetWellSpace_Odds = 100 + return +end + +Att3000_Dist_min = Att3001_Dist_max +function Hammer225001_Act02(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3001_Dist_max + local DashDist = Att3001_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3001, TARGET_ENE_0, DIST_Middle, -1, 20) + GetWellSpace_Odds = 100 + return +end + +Att3000_Dist_min = Att3002_Dist_max +function Hammer225001_Act03(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, DIST_Middle, -1, 45) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3003, TARGET_ENE_0, DIST_Middle, -1, 45) + end + GetWellSpace_Odds = 100 + return +end + +Att3000_Dist_min = Att3004_Dist_max +function Hammer225001_Act04(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3004, TARGET_ENE_0, DIST_Middle, -1, 25) + GetWellSpace_Odds = 100 + return +end + +Att3000_Dist_min = Att3005_Dist_max +function Hammer225001_Act05(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3005, TARGET_ENE_0, DIST_Middle, -1, 25) + GetWellSpace_Odds = 100 + return +end + +Att3000_Dist_min = Att3006_Dist_max +function Hammer225001_Act06(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, DIST_Middle, -1, 25) + GetWellSpace_Odds = 100 + return +end + +function Hammer225001_Act07(ai, goal) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, POINT_INITIAL, 2, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_Wait, 3, TARGET_SELF) + GetWellSpace_Odds = 0 + return +end + +function Hammer225001_Act08(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3010, TARGET_ENE_0, DIST_Middle) + GetWellSpace_Odds = 0 + return +end + +function Hammer225001_Act09(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3011, TARGET_ENE_0, DIST_Middle) + GetWellSpace_Odds = 0 + return +end + +function Hammer225001_Act10(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3012, TARGET_ENE_0, DIST_Middle) + GetWellSpace_Odds = 0 + return +end + +function Hammer225001_Act11(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3013, TARGET_ENE_0, DIST_Middle) + GetWellSpace_Odds = 0 + return +end + +function Hammer225001_Act12(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = 6 + local DashDist = 8 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3001, TARGET_ENE_0, DIST_Middle, -1, 20) + GetWellSpace_Odds = 100 + return +end + +function Hammer225001_GetWellSpace_Act(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate > 75 then + if fate <= 90 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + return true + elseif fate <= 95 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 2.5, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(15, 30), true, true, -1) + return true + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 6, TARGET_ENE_0, true, -1) + return true + end + else + return false + end +end + +function Hammer_m11_225001Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Hammer_m11_225001Battle_Terminate(ai, goal) + return +end + +function Hammer_m11_225001Battle_Interupt(ai, goal) + local distDamagedStep = 3 + local oddsDamagedStep = 30 + local bkStepPer = 100 + local leftStepPer = 0 + local rightStepPer = 0 + local safetyDist = 5 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/225002_battle.lua b/scripts_decompiled/225002_battle.lua new file mode 100644 index 0000000..bdbee0b --- /dev/null +++ b/scripts_decompiled/225002_battle.lua @@ -0,0 +1,213 @@ +REGISTER_GOAL(GOAL_Hammer225002_Battle, "Hammer225002Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 3 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 2 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 4 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 2.9 +local Att3004_Dist_min = 6.5 +local Att3004_Dist_max = 8.5 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 3 +local Att3006_Dist_min = -1.4 +local Att3006_Dist_max = 1.1 +REGISTER_GOAL_NO_UPDATE(GOAL_Hammer225002_Battle, 1) +function Hammer225002Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local GetWellSpace_Odds = 100 + if 15 <= targetDist then + Act01Per = 0 + Act02Per = 0 + Act03Per = 25 + Act04Per = 75 + Act05Per = 0 + Act06Per = 0 + elseif 7 <= targetDist then + Act01Per = 0 + Act02Per = 0 + Act03Per = 40 + Act04Per = 60 + Act05Per = 0 + Act06Per = 0 + elseif 3 <= targetDist then + Act01Per = 20 + Act02Per = 15 + Act03Per = 35 + Act04Per = 0 + Act05Per = 15 + Act06Per = 15 + else + Act01Per = 20 + Act02Per = 20 + Act03Per = 20 + Act04Per = 0 + Act05Per = 20 + Act06Per = 20 + end + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per) + if fateAct <= Act01Per then + Hammer225002_Act01(ai, goal) + elseif fateAct <= Act01Per + Act02Per then + Hammer225002_Act02(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per then + Hammer225002_Act03(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + Hammer225002_Act04(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + Hammer225002_Act05(ai, goal) + else + Hammer225002_Act06(ai, goal) + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + Hammer225002_GetWellSpace_Act(ai, goal) + end + return +end + +Att3000_Dist_min = Att3000_Dist_max +function Hammer225002_Act01(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 17, 10, 10) + GetWellSpace_Odds = 100 + return +end + +Att3000_Dist_min = Att3001_Dist_max +function Hammer225002_Act02(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3001_Dist_max + local DashDist = Att3001_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3001, TARGET_ENE_0, DIST_Middle, -1, 22, 10, 10) + GetWellSpace_Odds = 100 + return +end + +Att3000_Dist_min = Att3002_Dist_max +Att3000_Dist_min = Att3003_Dist_max +function Hammer225002_Act03(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if fate <= 50 then + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate2 <= 80 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, DIST_Middle, -1, 38, 10, 10) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3002, TARGET_ENE_0, DIST_Middle, -1, 38, 10, 10) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, DIST_Middle, 10, 10) + end + else + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate2 <= 80 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3003, TARGET_ENE_0, DIST_Middle, -1, 38, 10, 10) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3003, TARGET_ENE_0, DIST_Middle, -1, 38, 10, 10) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Middle, 10, 10) + end + end + GetWellSpace_Odds = 100 + return +end + +Att3000_Dist_min = Att3004_Dist_max +function Hammer225002_Act04(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3004, TARGET_ENE_0, DIST_Middle, -1, 27, 10, 10) + GetWellSpace_Odds = 100 + return +end + +Att3000_Dist_min = Att3005_Dist_max +function Hammer225002_Act05(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3005, TARGET_ENE_0, DIST_Middle, -1, 14, 10, 10) + GetWellSpace_Odds = 100 + return +end + +Att3000_Dist_min = Att3006_Dist_max +function Hammer225002_Act06(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, DIST_Middle, -1, 23, 10, 10) + GetWellSpace_Odds = 100 + return +end + +function Hammer225002_GetWellSpace_Act(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate > 75 then + if fate <= 90 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 6) + return true + elseif fate <= 95 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 2.5, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(15, 30), true, true, -1) + return true + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 6, TARGET_ENE_0, true, -1) + return true + end + else + return false + end +end + +function Hammer225002Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Hammer225002Battle_Terminate(ai, goal) + if ai:GetNumber(0) == 1 then + ai:SetNumber(0, 0) + end + if ai:GetNumber(1) == 1 then + ai:SetNumber(1, 0) + end + return +end + +function Hammer225002Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/226000_battle.lua b/scripts_decompiled/226000_battle.lua new file mode 100644 index 0000000..760e733 --- /dev/null +++ b/scripts_decompiled/226000_battle.lua @@ -0,0 +1,237 @@ +REGISTER_GOAL(GOAL_SpearDemon226000_Battle, "SpearDemon226000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 4.5 +local Att3003_Dist_min = 4 +local Att3003_Dist_max = 6.5 +local Att3004_Dist_min = 6.5 +local Att3004_Dist_max = 10 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 4.5 +local Att3006_Dist_min = 12 +local Att3006_Dist_max = 25 +local Att3007_Dist_min = 0 +local Att3007_Dist_max = 4 +local Att3008_Dist_min = 0 +local Att3008_Dist_max = 4.5 +REGISTER_GOAL_NO_UPDATE(GOAL_SpearDemon226000_Battle, 1) +Att3000_Dist_min = Att3008_Dist_max +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3007_Dist_max +function SpearDemon226000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if 12 <= targetDist then + actPerArr[1] = 5 + actPerArr[2] = 5 + actPerArr[9] = 5 + actPerArr[5] = 75 + actPerArr[6] = 0 + actPerArr[7] = 10 + elseif 6.5 <= targetDist then + actPerArr[1] = 10 + actPerArr[2] = 10 + actPerArr[9] = 10 + actPerArr[5] = 0 + actPerArr[6] = 0 + actPerArr[7] = 70 + elseif 4 <= targetDist then + actPerArr[1] = 25 + actPerArr[2] = 35 + actPerArr[9] = 25 + actPerArr[5] = 0 + actPerArr[6] = 0 + actPerArr[7] = 15 + else + actPerArr[1] = 15 + actPerArr[2] = 20 + actPerArr[9] = 15 + actPerArr[5] = 0 + actPerArr[6] = 50 + actPerArr[7] = 0 + end + local local0 = {Att3008_Dist_max, 0, 3008, DIST_Middle} + defFuncParamTbl[1] = local0 + local0 = {Att3000_Dist_max, 0, 10, 40} + defFuncParamTbl[2] = local0 + local0 = {Att3007_Dist_max, 0, 10, 20, 3007, 3009, 3010} + defFuncParamTbl[9] = local0 + actFuncArr[5] = REGIST_FUNC(ai, goal, SpearDemon226000_Act05) + local0 = {3005, DIST_Far} + defFuncParamTbl[6] = local0 + actFuncArr[7] = REGIST_FUNC(ai, goal, SpearDemon226000_Act07) + local atkAfterFunc = REGIST_FUNC(ai, goal, SpearDemon226000_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3006_Dist_max +function SpearDemon226000_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3006 + local AttDist = DIST_None + local TurnTime = 1.5 + local TurnFaceAngle = 20 + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist, TurnTime, TurnFaceAngle) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3003_Dist_max +Att3000_Dist_min = Att3004_Dist_max +function SpearDemon226000_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if targetDist <= 6.5 then + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 30 then + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function SpearDemon226000_ActAfter_AdjustSpace(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate > 45 then + if fate <= 65 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + return true + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + else + return false + end +end + +function SpearDemon226000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function SpearDemon226000Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3003_Dist_max +function SpearDemon226000Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local superStepDist = 3 + local superStepPer = 25 + local bkStepPer = 60 + local leftStepPer = 20 + local rightStepPer = 20 + local safetyDist = 3.5 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distDamagedStep = 3 + local oddsDamagedStep = 25 + local bkStepPer = 60 + local leftStepPer = 20 + local rightStepPer = 20 + local safetyDist = 3.5 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distGuardBreak_Act = 6.5 + local oddsGuardBreak_Act = 30 + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if targetDist <= 4 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distMissSwing_Int = 6.5 + local oddsMissSwing_Int = 50 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if targetDist <= 4 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distUseItem_Act = 8 + local oddsUseItem_Act = 60 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if targetDist <= 4 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3008, TARGET_ENE_0, DIST_Middle, 0) + end + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3003_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distResNear = 8 + local distResFar = 18 + local oddsResNear = 0 + local oddsResFar = 60 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + return true + elseif ResBehavID == 2 then + if fate <= 25 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + local local0 = true + return true + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + else + local oddsResponse = 50 + local bkStepPer = 60 + local leftStepPer = 20 + local rightStepPer = 20 + local safetyDist = 3.5 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end + end + end + end + end + end + end +end + +return diff --git a/scripts_decompiled/227000_battle.lua b/scripts_decompiled/227000_battle.lua new file mode 100644 index 0000000..95cd033 --- /dev/null +++ b/scripts_decompiled/227000_battle.lua @@ -0,0 +1,102 @@ +REGISTER_GOAL(GOAL_Kinoko227000_Battle, "Kinoko227000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 2.5 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 3.2 +REGISTER_GOAL_NO_UPDATE(GOAL_Kinoko227000_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3002_Dist_max +function Kinoko227000Battle_Activate(ai, goal) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local GetWellSpace_Odds = 0 + local Act01Per = 0 + local Act02Per = 0 + if 8 <= targetDist then + Act01Per = 70 + Act02Per = 30 + else + Act01Per = 60 + Act02Per = 40 + end + local doAdmirer = ai:GetExcelParam(AI_EXCEL_THINK_PARAM_TYPE__thinkAttr_doAdmirer) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local Guard = 0 + if doAdmirer == 1 and role == ROLE_TYPE_Torimaki then + Torimaki_Act(ai, goal, Odds_Guard) + elseif doAdmirer == 1 and role == ROLE_TYPE_Kankyaku then + Kankyaku_Act(ai, goal, Odds_Guard) + else + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per) + if fateAct <= Act01Per then + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 90 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + else + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3002 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + end + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + local Odds_Guard = 0 + local Odds_NoAct = 70 + local Odds_BackAndSide = 0 + local Odds_Back = 10 + local Odds_BitWait = 20 + local Odds_Backstep = 0 + GetWellSpace_Act(ai, goal, Odds_Guard, Odds_NoAct, Odds_BackAndSide, Odds_Back, Odds_BitWait, Odds_Backstep) + end + return +end + +function Kinoko227000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Kinoko227000Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3002_Dist_max +function Kinoko227000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local guardBreakConutDist = 2.9 + local guardBreakConutPer = 50 + if FindGuardBreak_Act(ai, goal, guardBreakConutDist, guardBreakConutPer) then + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3002 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/228000_battle.lua b/scripts_decompiled/228000_battle.lua new file mode 100644 index 0000000..43df9b9 --- /dev/null +++ b/scripts_decompiled/228000_battle.lua @@ -0,0 +1,155 @@ +REGISTER_GOAL(GOAL_KinokoChild228000_Battle, "KinokoChild228000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 0.6 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 1.4 +REGISTER_GOAL_NO_UPDATE(GOAL_KinokoChild228000_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3002_Dist_max +function KinokoChild228000Battle_Activate(ai, goal) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local targetDist = ai:GetDist(TARGET_ENE_0) + local hprate = ai:GetHpRate(TARGET_SELF) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local GetWellSpace_Odds = 0 + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + if 8 <= targetDist then + Act01Per = 10 + Act02Per = 10 + Act03Per = 80 + Act04Per = 0 + elseif 4 <= targetDist then + Act01Per = 60 + Act02Per = 40 + Act03Per = 0 + Act04Per = 0 + elseif 0.5 <= hprate then + Act01Per = 100 + Act02Per = 0 + Act03Per = 0 + Act04Per = 0 + else + Act01Per = 0 + Act02Per = 0 + Act03Per = 0 + Act04Per = 100 + end + local doAdmirer = ai:GetExcelParam(AI_EXCEL_THINK_PARAM_TYPE__thinkAttr_doAdmirer) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local Guard = 0 + if doAdmirer == 1 and role == ROLE_TYPE_Torimaki then + Torimaki_Act(ai, goal, Odds_Guard) + elseif doAdmirer == 1 and role == ROLE_TYPE_Kankyaku then + Kankyaku_Act(ai, goal, Odds_Guard) + else + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per) + if fateAct <= Act01Per then + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 85 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per then + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3002 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per then + local AppDist = 6 + local DashDist = 8 + local Odds_Guard = 0 + local AttID = 3002 + local AttDist = DIST_None + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 0 + else + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 95 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + end + if 60 <= fate2 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 20, TARGET_SELF, false, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(5, 7), TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_SELF, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 20, TARGET_SELF, false, -1) + end + GetWellSpace_Odds = 0 + end + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + local Odds_Guard = 0 + local Odds_NoAct = 70 + local Odds_BackAndSide = 0 + local Odds_Back = 10 + local Odds_BitWait = 20 + local Odds_Backstep = 0 + GetWellSpace_Act(ai, goal, Odds_Guard, Odds_NoAct, Odds_BackAndSide, Odds_Back, Odds_BitWait, Odds_Backstep) + end + return +end + +function KinokoChild228000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function KinokoChild228000Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3002_Dist_max +function KinokoChild228000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local guardBreakConutDist = 2 + local guardBreakConutPer = 10 + if FindGuardBreak_Act(ai, goal, guardBreakConutDist, guardBreakConutPer) then + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3002 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/228001_battle.lua b/scripts_decompiled/228001_battle.lua new file mode 100644 index 0000000..b353337 --- /dev/null +++ b/scripts_decompiled/228001_battle.lua @@ -0,0 +1,186 @@ +REGISTER_GOAL(GOAL_KinokoChild_m12_228001_Battle, "KinokoChild_m12_228001Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 0.6 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 1.4 +REGISTER_GOAL_NO_UPDATE(GOAL_KinokoChild_m12_228001_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3002_Dist_max +function KinokoChild_m12_228001Battle_Activate(ai, goal) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local targetDist = ai:GetDist(TARGET_ENE_0) + local hprate = ai:GetHpRate(TARGET_SELF) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local eventNo = ai:GetEventRequest(0) + local Nigeruflag = 0 + local GetWellSpace_Odds = 0 + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + if ai:IsInsideTargetRegion(TARGET_SELF, 1202114) then + Nigeruflag = 1 + end + if 0.8 <= hprate and Nigeruflag == 0 then + Act05Per = 100 + elseif hprate <= 0.8 and Nigeruflag == 0 then + Act06Per = 100 + elseif eventNo == 1 then + if 8 <= targetDist then + Act01Per = 10 + Act02Per = 10 + Act03Per = 80 + Act04Per = 0 + elseif 4 <= targetDist then + Act01Per = 60 + Act02Per = 40 + Act03Per = 0 + Act04Per = 0 + else + Act01Per = 100 + Act02Per = 0 + Act03Per = 0 + Act04Per = 0 + end + elseif 4 <= targetDist then + Act01Per = 0 + Act02Per = 0 + Act07Per = 100 + else + Act01Per = 20 + Act02Per = 10 + Act07Per = 70 + end + local doAdmirer = ai:GetExcelParam(AI_EXCEL_THINK_PARAM_TYPE__thinkAttr_doAdmirer) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local Guard = 0 + if doAdmirer == 1 and role == ROLE_TYPE_Torimaki then + Torimaki_Act(ai, goal, Odds_Guard) + elseif doAdmirer == 1 and role == ROLE_TYPE_Kankyaku then + Kankyaku_Act(ai, goal, Odds_Guard) + else + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per) + if fateAct <= Act01Per then + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 85 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per then + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3002 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per then + local AppDist = 6 + local DashDist = 8 + local Odds_Guard = 0 + local AttID = 3002 + local AttDist = DIST_None + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 95 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + end + if 60 <= fate2 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 20, TARGET_SELF, false, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(5, 7), TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_SELF, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 20, TARGET_SELF, false, -1) + end + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, 2, POINT_MOVE_POINT, AI_DIR_TYPE_CENTER, 1, TARGET_SELF, true) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + ai:SetEventMoveTarget(1202114) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, POINT_EVENT, 1, TARGET_SELF, false, -1) + GetWellSpace_Odds = 0 + else + if 15 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Wait, 1.5, TARGET_ENE_0) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 15, TARGET_SELF, false, -1) + end + GetWellSpace_Odds = 0 + end + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + local Odds_Guard = 0 + local Odds_NoAct = 70 + local Odds_BackAndSide = 0 + local Odds_Back = 10 + local Odds_BitWait = 20 + local Odds_Backstep = 0 + GetWellSpace_Act(ai, goal, Odds_Guard, Odds_NoAct, Odds_BackAndSide, Odds_Back, Odds_BitWait, Odds_Backstep) + end + return +end + +function KinokoChild_m12_228001Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function KinokoChild_m12_228001Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3002_Dist_max +function KinokoChild_m12_228001Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local guardBreakConutDist = 2 + local guardBreakConutPer = 10 + if FindGuardBreak_Act(ai, goal, guardBreakConutDist, guardBreakConutPer) then + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3002 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/230000_battle.lua b/scripts_decompiled/230000_battle.lua new file mode 100644 index 0000000..8fcbfa4 --- /dev/null +++ b/scripts_decompiled/230000_battle.lua @@ -0,0 +1,278 @@ +REGISTER_GOAL(GOAL_HaikaiDemon230000_Battle, "HaikaiDemon230000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 3.8 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 4 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 8 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 7.5 +local Att3006_Dist_min = -1.3 +local Att3006_Dist_max = 0 +local Att3007_Dist_min = 6.5 +local Att3007_Dist_max = 8.7 +local Att3008_Dist_min = 11.8 +local Att3008_Dist_max = 13.5 +local Att3009_Dist_min = 5.5 +local Att3009_Dist_max = 25 +REGISTER_GOAL_NO_UPDATE(GOAL_HaikaiDemon230000_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3003_Dist_max +Att3000_Dist_min = Att3006_Dist_max +Att3000_Dist_min = Att3008_Dist_min +Att3000_Dist_min = Att3008_Dist_max +Att3000_Dist_min = Att3007_Dist_max +function HaikaiDemon230000Battle_Activate(ai, goal) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local targetDist = ai:GetDist(TARGET_ENE_0) + local hprate = ai:GetHpRate(TARGET_SELF) + local myThinkId = ai:GetNpcThinkParamID() + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local GetWellSpace_Odds = 0 + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local BattleArea01 = 0 + local BattleArea02 = 0 + local BattleArea03 = 0 + local BattleArea04 = 0 + local BattleArea05 = 0 + local ShootBattleArea01 = 0 + local ShootBattleArea02 = 0 + local CanStep = 1 + local LJump = 1 + if myThinkId == 230000 then + BattleArea01 = 1302750 + BattleArea02 = 1302750 + BattleArea03 = 1302750 + BattleArea04 = 1302750 + BattleArea05 = 1302751 + ShootBattleArea01 = 1302752 + ShootBattleArea02 = 1302752 + elseif myThinkId == 230001 then + BattleArea01 = 1502734 + BattleArea02 = 1502734 + BattleArea03 = 1502734 + BattleArea04 = 1502734 + BattleArea05 = 1502735 + ShootBattleArea01 = 1502731 + ShootBattleArea02 = 1502732 + elseif myThinkId == 230002 then + BattleArea01 = 1502733 + BattleArea02 = 1502733 + BattleArea03 = 1502733 + BattleArea04 = 1502733 + BattleArea05 = 1502733 + ShootBattleArea01 = 1502731 + ShootBattleArea02 = 1502731 + elseif myThinkId == 230003 then + BattleArea01 = 1012795 + BattleArea02 = 1012795 + BattleArea03 = 1012795 + BattleArea04 = 1012795 + BattleArea05 = 1012795 + ShootBattleArea01 = 1012796 + ShootBattleArea02 = 1012797 + LJump = 0 + if not ai:IsInsideTargetRegion(TARGET_SELF, BattleArea01) then + CanStep = 0 + end + elseif myThinkId == 230004 then + BattleArea01 = 1512760 + BattleArea02 = 1512760 + BattleArea03 = 1512760 + BattleArea04 = 1512760 + BattleArea05 = 1512760 + ShootBattleArea01 = 1512761 + ShootBattleArea02 = 1512762 + if not ai:IsInsideTargetRegion(TARGET_SELF, BattleArea01) then + CanStep = 0 + LJump = 0 + end + elseif myThinkId == 230005 then + BattleArea01 = 1412740 + BattleArea02 = 1412740 + BattleArea03 = 1412740 + BattleArea04 = 1412740 + BattleArea05 = 1412740 + ShootBattleArea01 = 1412741 + ShootBattleArea02 = 1412742 + end + if not not ai:IsInsideTargetRegion(TARGET_ENE_0, BattleArea01) or not not ai:IsInsideTargetRegion(TARGET_ENE_0, BattleArea02) or not not ai:IsInsideTargetRegion(TARGET_ENE_0, BattleArea03) or not not ai:IsInsideTargetRegion(TARGET_ENE_0, BattleArea04) or ai:IsInsideTargetRegion(TARGET_ENE_0, BattleArea05) then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 160) and targetDist <= 0.8 then + Act04Per = 85 + Act05Per = 15 + elseif 12.3 <= targetDist then + Act01Per = 5 + Act02Per = 10 + Act04Per = 75 + Act06Per = 10 + elseif 7 <= targetDist then + Act02Per = 40 + Act03Per = 5 + Act04Per = 40 + Act06Per = 15 + elseif 4 <= targetDist then + Act01Per = 55 + Act02Per = 25 + Act03Per = 20 + elseif 2.2 <= targetDist then + Act01Per = 70 + Act03Per = 20 + Act05Per = 10 + else + Act01Per = 55 + Act03Per = 15 + Act05Per = 30 + end + elseif not not ai:IsInsideTargetRegion(TARGET_ENE_0, ShootBattleArea01) or ai:IsInsideTargetRegion(TARGET_ENE_0, ShootBattleArea02) then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 160) and targetDist <= 0.8 then + Act04Per = 85 + Act05Per = 15 + elseif 8 <= targetDist then + Act06Per = 75 + Act07Per = 25 + elseif 5.5 <= targetDist then + Act02Per = 40 + Act06Per = 45 + Act07Per = 15 + elseif 3.8 <= targetDist then + Act02Per = 85 + Act07Per = 15 + else + Act01Per = 50 + Act02Per = 45 + Act07Per = 5 + end + else + Act07Per = 100 + end + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per) + if fateAct <= Act01Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, false, -1) + if fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, 2, 70) + elseif fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, 2, 70) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, 2, 70) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, TARGET_ENE_0, Att3003_Dist_max, TARGET_SELF, false, -1) + if fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3003, TARGET_ENE_0, DIST_Middle, 2, 70) + elseif fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3003, TARGET_ENE_0, DIST_Middle, 2, 70) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3003, TARGET_ENE_0, DIST_Middle, 2, 70) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, TARGET_ENE_0, Att3006_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + if Att3008_Dist_min <= targetDist and fate <= 40 and LJump == 1 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, TARGET_ENE_0, Att3008_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3008, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, TARGET_ENE_0, Att3007_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + end + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + if myThinkId == 230003 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 10, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(15, 30), true, true, -1) + end + GetWellSpace_Odds = 0 + elseif myThinkId == 230003 then + ai:SetEventMoveTarget(1012798) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, POINT_EVENT, 1, TARGET_ENE_0, True, -1) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, POINT_INITIAL, 1, TARGET_ENE_0, True, -1) + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds and CanStep == 1 then + local Odds_Guard = 0 + local Odds_NoAct = 70 + local Odds_BackAndSide = 0 + local Odds_Back = 0 + local Odds_BitWait = 0 + local Odds_Backstep = 30 + GetWellSpace_Act(ai, goal, Odds_Guard, Odds_NoAct, Odds_BackAndSide, Odds_Back, Odds_BitWait, Odds_Backstep) + end + return +end + +function HaikaiDemon230000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function HaikaiDemon230000Battle_Terminate(ai, goal) + return +end + +function HaikaiDemon230000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distDamagedStep = 3 + local oddsDamagedStep = 15 + local bkStepPer = 100 + local leftStepPer = 0 + local rightStepPer = 0 + local safetyDist = 6 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distGuardBreak_Attack = 4.3 + local oddsGuardBreak_Attack = 60 + local AttID = 3000 + if GuardBreak_Attack(ai, goal, distGuardBreak_Attack, oddsGuardBreak_Attack, AttID) then + return true + else + local distUseItem_Act = 9.5 + local oddsUseItem_Act = 15 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if 4.4 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local oddsResponse = 20 + local bkStepPer = 100 + local leftStepPer = 0 + local rightStepPer = 0 + local safetyDist = 6 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end + end + end + end +end + +return diff --git a/scripts_decompiled/231000_battle.lua b/scripts_decompiled/231000_battle.lua new file mode 100644 index 0000000..a529889 --- /dev/null +++ b/scripts_decompiled/231000_battle.lua @@ -0,0 +1,280 @@ +REGISTER_GOAL(GOAL_Kyochojin231000_Battle, "Kyochojin231000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 3.3 +local Att3003_Dist_min = 5.4 +local Att3003_Dist_max = 8 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 5.1 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 23 +REGISTER_GOAL_NO_UPDATE(GOAL_Kyochojin231000_Battle, 1) +function OnIf_231000(ai, goal, codeNo) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local eventNo = ai:GetEventRequest(0) + if codeNo == 1 then + ai:SetEventMoveTarget(1102714) + goal:AddSubGoal(GOAL_COMMON_Turn, 10, POINT_EVENT, 1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3014, POINT_EVENT, DIST_Middle, 0) + elseif codeNo == 2 then + ai:SetEventMoveTarget(1102715) + goal:AddSubGoal(GOAL_COMMON_Turn, 10, POINT_EVENT, 1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3015, POINT_EVENT, DIST_Middle, 0) + elseif codeNo == 3 then + ai:SetEventMoveTarget(1102711) + goal:AddSubGoal(GOAL_COMMON_Turn, 10, POINT_EVENT, 1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3016, POINT_EVENT, DIST_Middle, 0) + elseif codeNo == 4 then + ai:SetEventMoveTarget(1102710) + goal:AddSubGoal(GOAL_COMMON_Turn, 10, POINT_EVENT, 1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3017, POINT_EVENT, DIST_Middle, 0) + elseif codeNo == 5 then + ai:SetEventMoveTarget(1102713) + goal:AddSubGoal(GOAL_COMMON_Turn, 10, POINT_EVENT, 1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3018, POINT_EVENT, DIST_Middle, 0) + elseif codeNo == 6 then + ai:SetEventMoveTarget(1102712) + goal:AddSubGoal(GOAL_COMMON_Turn, 10, POINT_EVENT, 1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3019, POINT_EVENT, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + end + return +end + +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3003_Dist_max +Att3000_Dist_min = Att3005_Dist_max +Att3000_Dist_min = Att3006_Dist_max +function Kyochojin231000Battle_Activate(ai, goal) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local eventNo = ai:GetEventRequest(0) + local GetWellSpace_Odds = 0 + ai:AddObserveRegion(0, TARGET_SELF, 1102020) + ai:AddObserveRegion(1, TARGET_SELF, 1102030) + ai:AddObserveRegion(2, TARGET_SELF, 1102040) + ai:AddObserveRegion(3, TARGET_SELF, 1102050) + ai:AddObserveRegion(4, TARGET_ENE_0, 1102020) + ai:AddObserveRegion(5, TARGET_ENE_0, 1102030) + ai:AddObserveRegion(6, TARGET_ENE_0, 1102040) + ai:AddObserveRegion(7, TARGET_ENE_0, 1102050) + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + if eventNo == 1 then + ai:SetEventMoveTarget(1102710) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, POINT_EVENT, 1, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_If, 30, 1) + elseif eventNo == 2 then + ai:SetEventMoveTarget(1102712) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, POINT_EVENT, 1, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_If, 30, 2) + elseif eventNo == 3 then + ai:SetEventMoveTarget(1102710) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, POINT_EVENT, 1, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_If, 30, 3) + elseif eventNo == 4 then + ai:SetEventMoveTarget(1102711) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, POINT_EVENT, 1, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_If, 30, 4) + elseif eventNo == 5 then + ai:SetEventMoveTarget(1102712) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, POINT_EVENT, 1, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_If, 30, 5) + elseif eventNo == 6 then + ai:SetEventMoveTarget(1102713) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, POINT_EVENT, 1, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_If, 30, 6) + elseif 10 <= targetDist then + Act01Per = 50 + Act02Per = 50 + Act03Per = 0 + Act04Per = 0 + elseif 5.4 <= targetDist then + Act01Per = 20 + Act02Per = 40 + Act03Per = 40 + Act04Per = 0 + else + Act01Per = 50 + Act02Per = 0 + Act03Per = 50 + Act04Per = 0 + end + local doAdmirer = ai:GetExcelParam(AI_EXCEL_THINK_PARAM_TYPE__thinkAttr_doAdmirer) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local Odds_Guard = 0 + if doAdmirer == 1 and role == ROLE_TYPE_Torimaki then + Torimaki_Act(ai, goal, Odds_Guard) + elseif doAdmirer == 1 and role == ROLE_TYPE_Kankyaku then + Kankyaku_Act(ai, goal, Odds_Guard) + else + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per) + if fateAct <= Act01Per then + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per then + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 25 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per then + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3005 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3006 + local AttDist = DIST_None + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 0 + else + ai:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_NONE, 0, 0, 0) + end + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + local Odds_Guard = 0 + local Odds_NoAct = 40 + local Odds_BackAndSide = 10 + local Odds_Back = 10 + local Odds_BitWait = 0 + local Odds_Backstep = 40 + GetWellSpace_Act(ai, goal, Odds_Guard, Odds_NoAct, Odds_BackAndSide, Odds_Back, Odds_BitWait, Odds_Backstep) + end + return +end + +function Kyochojin231000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Kyochojin231000Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function Kyochojin231000Battle_Interupt(ai, goal) + local superStepDist = 4 + local superStepPer = 15 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer) then + return true + else + local distDamagedStep = 4 + local oddsDamagedStep = 25 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + local safetyDist = 4 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distGuardBreak_Act = 8 + local oddsGuardBreak_Act = 30 + local targetDist = ai:GetDist(TARGET_ENE_0) + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if 5.4 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distMissSwing_Int = 8 + local oddsMissSwing_Int = 40 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if targetDist <= 5.4 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distUseItem_Act = 8 + local oddsUseItem_Act = 15 + local targetDist = ai:GetDist(TARGET_ENE_0) + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if 5.4 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distResNear = 8 + local distResFar = 20 + local oddsResNear = 0 + local oddsResFar = 40 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + return true + elseif ResBehavID == 2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + else + local oddsResponse = 15 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + local safetyDist = 4 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end + end + end + end + end + end + end +end + +return diff --git a/scripts_decompiled/231000_logic.lua b/scripts_decompiled/231000_logic.lua new file mode 100644 index 0000000..93bfa86 --- /dev/null +++ b/scripts_decompiled/231000_logic.lua @@ -0,0 +1,117 @@ +REGISTER_LOGIC_FUNC(LOGIC_ID_Kyochojin231000, "Kyochojin231000_Logic", "Kyochojin231000_Interupt") +function OnIf_231000(ai, goal, codeNo) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local eventNo = ai:GetEventRequest(0) + if codeNo == 1 then + ai:SetEventMoveTarget(1102714) + ai:AddTopGoal(GOAL_COMMON_Turn, 10, POINT_EVENT, 1) + ai:AddTopGoal(GOAL_COMMON_Attack, 20, 3014, POINT_EVENT, DIST_Middle, 0) + elseif codeNo == 2 then + ai:SetEventMoveTarget(1102715) + ai:AddTopGoal(GOAL_COMMON_Turn, 10, POINT_EVENT, 1) + ai:AddTopGoal(GOAL_COMMON_Attack, 20, 3015, POINT_EVENT, DIST_Middle, 0) + elseif codeNo == 3 then + ai:SetEventMoveTarget(1102711) + ai:AddTopGoal(GOAL_COMMON_Turn, 10, POINT_EVENT, 1) + ai:AddTopGoal(GOAL_COMMON_Attack, 20, 3016, POINT_EVENT, DIST_Middle, 0) + elseif codeNo == 4 then + ai:SetEventMoveTarget(1102710) + ai:AddTopGoal(GOAL_COMMON_Turn, 10, POINT_EVENT, 1) + ai:AddTopGoal(GOAL_COMMON_Attack, 20, 3017, POINT_EVENT, DIST_Middle, 0) + elseif codeNo == 5 then + ai:SetEventMoveTarget(1102713) + ai:AddTopGoal(GOAL_COMMON_Turn, 10, POINT_EVENT, 1) + ai:AddTopGoal(GOAL_COMMON_Attack, 20, 3018, POINT_EVENT, DIST_Middle, 0) + elseif codeNo == 6 then + ai:SetEventMoveTarget(1102712) + ai:AddTopGoal(GOAL_COMMON_Turn, 10, POINT_EVENT, 1) + ai:AddTopGoal(GOAL_COMMON_Attack, 20, 3019, POINT_EVENT, DIST_Middle, 0) + else + ai:AddTopGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + end + return +end + +function Kyochojin231000_Logic(ai) + local eventNo = ai:GetEventRequest(0) + local isFindTarget = ai:IsSearchTarget(TARGET_ENE_0) + local pointDist = ai:GetMovePointEffectRange() + local targetDist = ai:GetDist(TARGET_ENE_0) + if not (isFindTarget ~= false or 1 > eventNo) or 10 <= targetDist and 1 <= eventNo then + if eventNo == 1 then + ai:SetEventMoveTarget(1102710) + ai:AddTopGoal(GOAL_COMMON_ApproachTarget, 2, POINT_EVENT, 1, TARGET_SELF, false, -1) + ai:AddTopGoal(GOAL_COMMON_If, 30, 1) + elseif eventNo == 2 then + ai:SetEventMoveTarget(1102712) + ai:AddTopGoal(GOAL_COMMON_ApproachTarget, 2, POINT_EVENT, 1, TARGET_SELF, false, -1) + ai:AddTopGoal(GOAL_COMMON_If, 30, 2) + elseif eventNo == 3 then + ai:SetEventMoveTarget(1102710) + ai:AddTopGoal(GOAL_COMMON_ApproachTarget, 2, POINT_EVENT, 1, TARGET_SELF, false, -1) + ai:AddTopGoal(GOAL_COMMON_If, 30, 3) + elseif eventNo == 4 then + ai:SetEventMoveTarget(1102711) + ai:AddTopGoal(GOAL_COMMON_ApproachTarget, 2, POINT_EVENT, 1, TARGET_SELF, false, -1) + ai:AddTopGoal(GOAL_COMMON_If, 30, 4) + elseif eventNo == 5 then + ai:SetEventMoveTarget(1102712) + ai:AddTopGoal(GOAL_COMMON_ApproachTarget, 2, POINT_EVENT, 1, TARGET_SELF, false, -1) + ai:AddTopGoal(GOAL_COMMON_If, 30, 5) + elseif eventNo == 6 then + ai:SetEventMoveTarget(1102713) + ai:AddTopGoal(GOAL_COMMON_ApproachTarget, 2, POINT_EVENT, 1, TARGET_SELF, false, -1) + ai:AddTopGoal(GOAL_COMMON_If, 30, 6) + else + ai:AddTopGoal(GOAL_Kyochojin231000_Battle, -1, 0, 0, 0, 0) + end + elseif isFindTarget == false then + ai:AddTopGoal(GOAL_COMMON_ApproachTarget, 7, POINT_INITIAL, 0.1, TARGET_SELF, false, -1) + elseif 75 <= pointDist then + if 5 <= targetDist then + ai:AddTopGoal(GOAL_COMMON_ApproachTarget, 7, POINT_INITIAL, 0.1, TARGET_SELF, false, -1) + elseif 3 <= targetDist then + ai:AddTopGoal(GOAL_COMMON_ApproachTarget, 2, POINT_INITIAL, 0.1, TARGET_ENE_0, true, -1) + else + ai:AddTopGoal(GOAL_Kyochojin231000_Battle, -1, 0, 0, 0, 0) + end + elseif ai:IsBattleState() then + if 50 <= pointDist then + if 15 <= targetDist then + ai:AddTopGoal(GOAL_COMMON_ApproachTarget, 7, POINT_INITIAL, 0.1, TARGET_SELF, false, -1) + else + ai:AddTopGoal(GOAL_Kyochojin231000_Battle, -1, 0, 0, 0, 0) + end + elseif 25 <= pointDist then + if 20 <= targetDist then + ai:AddTopGoal(GOAL_COMMON_ApproachTarget, 7, POINT_INITIAL, 0.1, TARGET_SELF, false, -1) + else + ai:AddTopGoal(GOAL_Kyochojin231000_Battle, -1, 0, 0, 0, 0) + end + elseif 20 <= targetDist then + ai:AddTopGoal(GOAL_COMMON_ApproachTarget, 7, POINT_INITIAL, 0.1, TARGET_SELF, false, -1) + else + ai:AddTopGoal(GOAL_Kyochojin231000_Battle, -1, 0, 0, 0, 0) + end + elseif ai:IsCautionState() then + ai:AddTopGoal(GOAL_COMMON_Wait, 2, TARGET_ENE_0, 0, 0, 0) + elseif 30 <= targetDist then + ai:AddTopGoal(GOAL_COMMON_Wait, 2, TARGET_NONE, 0, 0, 0) + elseif 12 <= targetDist then + ai:AddTopGoal(GOAL_COMMON_Wait, 2, TARGET_ENE_0, 0, 0, 0) + else + ai:AddTopGoal(GOAL_Kyochojin231000_Battle, -1, 0, 0, 0, 0) + end + return +end + +function Kyochojin231000_Interupt(ai, goal) + if ai:IsInterupt(INTERUPT_Damaged) then + ai:AddTopGoal(GOAL_Kyochojin231000_Battle, -1, 0, 0, 0, 0) + end + return +end + +return diff --git a/scripts_decompiled/232000_battle.lua b/scripts_decompiled/232000_battle.lua new file mode 100644 index 0000000..560d1c1 --- /dev/null +++ b/scripts_decompiled/232000_battle.lua @@ -0,0 +1,342 @@ +REGISTER_GOAL(GOAL_IronGolem232000_Battle, "IronGolem232000Battle") +local Att3000_Dist_min = 1.4 +local Att3000_Dist_max = 3.8 +local Att3002_Dist_min = 1.1 +local Att3002_Dist_max = 4.2 +local Att3003_Dist_min = 1 +local Att3003_Dist_max = 3.1 +local Att3006_Dist_min = -1.5 +local Att3006_Dist_max = 3.8 +local Att3007_Dist_min = -1.5 +local Att3007_Dist_max = 0.4 +local Att3009_Dist_min = -1.5 +local Att3009_Dist_max = -0.5 +local Att3010_Dist_min = -1.5 +local Att3010_Dist_max = 0 +local Att3012_Dist_min = 12 +local Att3012_Dist_max = 30 +REGISTER_GOAL_NO_UPDATE(GOAL_IronGolem232000_Battle, 1) +function IronGolem232000Battle_Activate(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + local fate5 = ai:GetRandam_Int(1, 100) + local fate6 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local EventNo = ai:GetEventRequest() + local GetWellSpace_Odds = 0 + local Act00Per = 0 + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act08Per = 0 + local Act09Per = 0 + local Act10Per = 0 + local Act11Per = 0 + local Act12Per = 0 + local Act13Per = 0 + ai:AddObserveChrDmySphere(0, TARGET_ENE_0, 3, 1.4) + ai:AddObserveChrDmySphere(1, TARGET_ENE_0, 30, 1.4) + ai:AddObserveChrDmySphere(2, TARGET_ENE_0, 4, 1.4) + ai:AddObserveChrDmySphere(3, TARGET_ENE_0, 40, 1.4) + local FirstImpression = ai:GetNumber(0) + local RateThrow = 1 + if ai:IsFinishTimer(0) == false then + RateThrow = 0.1 + end + local RateRightCrush = 1 + if ai:IsFinishTimer(1) == false then + RateRightCrush = 0.2 + end + local RateLeftCrush = 1 + if ai:IsFinishTimer(2) == false then + RateLeftCrush = 0.2 + end + local RateStep = 1 + if ai:IsFinishTimer(3) == false then + RateStep = 0 + end + local RateNagi = 1 + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1502730) then + RateNagi = 0 + end + if FirstImpression == 0 then + Act11Per = 100 + elseif not not ai:IsInsideObserve(0) or ai:IsInsideObserve(1) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 120) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) and fate <= 75 * RateRightCrush then + Act03Per = 100 + elseif not not ai:IsInsideObserve(2) or ai:IsInsideObserve(3) and fate2 <= 75 * RateLeftCrush then + Act04Per = 50 + Act09Per = 50 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 30) and 0 <= targetDist and targetDist <= 4 and fate3 <= 75 * RateThrow then + Act05Per = 100 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 30) and -1.5 <= targetDist and targetDist <= 1.5 and fate4 <= 60 then + Act06Per = 100 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 50) and -1.5 <= targetDist and targetDist <= 1.5 and fate5 <= 75 * RateThrow then + Act07Per = 100 + elseif 12 <= targetDist then + Act00Per = 5 + Act01Per = 10 * RateNagi + Act02Per = 5 + Act10Per = 50 + Act12Per = 30 + elseif 6 <= targetDist then + Act00Per = 30 + Act01Per = 45 * RateNagi + Act02Per = 15 + Act05Per = 10 * RateThrow + elseif 3 <= targetDist then + Act00Per = 20 + Act01Per = 35 * RateNagi + Act02Per = 10 + Act05Per = 15 * RateThrow + Act13Per = 20 * RateStep + elseif 1.4 <= targetDist then + Act00Per = 5 + Act01Per = 10 * RateNagi + Act02Per = 10 + Act05Per = 25 * RateThrow + Act13Per = 50 * RateStep + elseif -0.5 <= targetDist then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 120) then + Act05Per = 20 * RateThrow + Act06Per = 15 + Act07Per = 5 * RateThrow + Act08Per = 10 + Act13Per = 300 * RateStep + else + Act05Per = 20 * RateThrow + Act06Per = 15 + Act07Per = 5 * RateThrow + Act08Per = 10 + Act13Per = 50 * RateStep + end + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 120) then + Act06Per = 10 + Act07Per = 10 * RateThrow + Act08Per = 10 + Act13Per = 300 * RateStep + Act03Per = 5 * RateRightCrush + Act04Per = 5 * RateLeftCrush + else + Act06Per = 10 + Act07Per = 10 * RateThrow + Act08Per = 10 + Act13Per = 70 * RateStep + Act03Per = 5 * RateRightCrush + Act04Per = 5 * RateLeftCrush + end + if not not ai:IsInsideObserve(0) or ai:IsInsideObserve(1) then + Act07Per = 200 + end + local fateAct = ai:GetRandam_Int(1, Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per) + if fateAct <= Act00Per then + IronGolem232000_Act00(ai, goal) + elseif fateAct <= Act00Per + Act01Per then + IronGolem232000_Act01(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per then + IronGolem232000_Act02(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per then + IronGolem232000_Act03(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per then + IronGolem232000_Act04(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + IronGolem232000_Act05(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + IronGolem232000_Act06(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + IronGolem232000_Act07(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per then + IronGolem232000_Act08(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per then + IronGolem232000_Act09(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per then + IronGolem232000_Act10(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per then + IronGolem232000_Act11(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per then + IronGolem232000_Act12(ai, goal) + else + IronGolem232000_Act13(ai, goal) + end + return +end + +Att3000_Dist_min = Att3000_Dist_max +function IronGolem232000_Act00(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 0 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, 2, 45) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, 2, 45) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + end + return +end + +Att3000_Dist_min = Att3002_Dist_max +function IronGolem232000_Act01(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 0 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, DIST_Far, 2, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3002, TARGET_ENE_0, DIST_Far, 2, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3008, TARGET_ENE_0, DIST_Middle, 0) + end + return +end + +Att3000_Dist_min = Att3003_Dist_max +function IronGolem232000_Act02(ai, goal) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 0 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3003, TARGET_ENE_0, DIST_Middle, 2, 30) + return +end + +function IronGolem232000_Act03(ai, goal) + ai:SetTimer(1, 15) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3004, TARGET_ENE_0, DIST_Near, 0, 180) + return +end + +function IronGolem232000_Act04(ai, goal) + ai:SetTimer(2, 15) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3005, TARGET_ENE_0, DIST_Near, 0, 180) + return +end + +Att3000_Dist_min = Att3006_Dist_max +function IronGolem232000_Act05(ai, goal) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 0 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + ai:SetTimer(0, 25) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, DIST_Middle, 2, 30) + return +end + +Att3000_Dist_min = Att3007_Dist_max +function IronGolem232000_Act06(ai, goal) + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 0 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3007, TARGET_ENE_0, DIST_Middle, 2, 30) + return +end + +function IronGolem232000_Act07(ai, goal) + ai:SetTimer(0, 25) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3009, TARGET_ENE_0, DIST_Middle, 0, 180) + return +end + +Att3000_Dist_min = Att3010_Dist_max +function IronGolem232000_Act08(ai, goal) + local AppDist = Att3010_Dist_max + local DashDist = Att3010_Dist_max + 0 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3010, TARGET_ENE_0, DIST_Near, 2, 90) + return +end + +function IronGolem232000_Act09(ai, goal) + ai:SetTimer(2, 15) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3011, TARGET_ENE_0, DIST_Near, 0, 180) + return +end + +Att3000_Dist_min = Att3012_Dist_max +function IronGolem232000_Act10(ai, goal) + local AppDist = Att3012_Dist_max + local DashDist = Att3012_Dist_max + 0 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3012, TARGET_ENE_0, DIST_None, -1, 20) + return +end + +Att3000_Dist_min = Att3012_Dist_max +Att3000_Dist_min = Att3002_Dist_max +function IronGolem232000_Act11(ai, goal) + ai:SetNumber(0, 1) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 30, TARGET_ENE_0, Att3012_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3012, TARGET_ENE_0, DIST_None, -1, 20) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3002_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3002, TARGET_ENE_0, DIST_Far, 2, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3008, TARGET_ENE_0, DIST_Middle, 0) + return +end + +function IronGolem232000_Act12(ai, goal) + local AppDist = 8.5 + local DashDist = 8.5 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3002, TARGET_ENE_0, DIST_Far, 2, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3008, TARGET_ENE_0, DIST_Middle, 0) + return +end + +function IronGolem232000_Act13(ai, goal) + ai:SetTimer(3, 10) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 6) + return +end + +function IronGolem232000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function IronGolem232000Battle_Terminate(ai, goal) + return +end + +function IronGolem232000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distUseItem_Act = 20 + local oddsUseItem_Act = 50 + local targetDist = ai:GetDist(TARGET_ENE_0) + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if 12 <= targetDist then + IronGolem232000_Act10(ai, goal) + elseif 8.5 <= targetDist then + IronGolem232000_Act12(ai, goal) + elseif 4.1 <= targetDist then + IronGolem232000_Act01(ai, goal) + elseif 0 <= targetDist then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 120) then + IronGolem232000_Act13(ai, goal) + else + IronGolem232000_Act05(ai, goal) + end + else + IronGolem232000_Act13(ai, goal) + end + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/233000_battle.lua b/scripts_decompiled/233000_battle.lua new file mode 100644 index 0000000..76b17d9 --- /dev/null +++ b/scripts_decompiled/233000_battle.lua @@ -0,0 +1,176 @@ +REGISTER_GOAL(GOAL_Jujin233000_Battle, "Jujin233000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 3.8 +local Att3002_Dist_min = 2.5 +local Att3002_Dist_max = 6.5 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 1.8 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 3.8 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 4 +REGISTER_GOAL_NO_UPDATE(GOAL_Jujin233000_Battle, 1) +Att3000_Dist_min = Att3005_Dist_max +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3006_Dist_max +Att3000_Dist_min = Att3002_Dist_max +function Jujin233000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if 8 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 20 + actPerArr[3] = 15 + actPerArr[4] = 5 + actPerArr[9] = 40 + elseif 2.5 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 20 + actPerArr[3] = 15 + actPerArr[4] = 15 + actPerArr[9] = 30 + else + actPerArr[1] = 30 + actPerArr[2] = 20 + actPerArr[3] = 20 + actPerArr[4] = 30 + actPerArr[9] = 0 + end + local local0 = {Att3005_Dist_max, 0, 3005, DIST_Middle} + defFuncParamTbl[1] = local0 + local0 = {} + local local1, local2, local3, local4 = nil + local0[1] = Att3000_Dist_max + local0[2] = 0 + local0[3] = 30 + local0[4] = 70 + local0[5] = local1 + local0[6] = local2 + local0[7] = local3 + local0[8] = local4 + defFuncParamTbl[2] = local0 + local0 = {Att3006_Dist_max, 0, 3006, DIST_Middle} + defFuncParamTbl[3] = local0 + actFuncArr[4] = REGIST_FUNC(ai, goal, Jujin233000_Act04) + local0 = {} + local3, local4 = nil + local0[1] = Att3002_Dist_max + local0[2] = 0 + local0[3] = 30 + local0[4] = 70 + local0[5] = 3002 + local0[6] = 3003 + local0[7] = local3 + local0[8] = local4 + defFuncParamTbl[9] = local0 + local0 = {0, 50, 0, 5, 20, 15, 10} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace_IncludeSidestep, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3004_Dist_max +function Jujin233000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3004 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 2) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Jujin233000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Jujin233000Battle_Terminate(ai, goal) + return +end + +function Jujin233000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local superStepDist = 3 + local superStepPer = 15 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + local safetyDist = 3.5 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + end + local distDamagedStep = 3 + local oddsDamagedStep = 25 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + local safetyDist = 3.5 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + end + local distGuardBreak_Act = 6.5 + local oddsGuardBreak_Act = 30 + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if targetDist <= 3.8 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + end + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + local distMissSwing_Int = 6.5 + local oddsMissSwing_Int = 30 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if targetDist <= 3.8 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + end + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + local distResNear = 7 + local distResFar = 18 + local oddsResNear = 0 + local oddsResFar = 40 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + elseif ResBehavID == 2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + end + local oddsResponse = 30 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + local safetyDist = 3.5 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/236000_battle.lua b/scripts_decompiled/236000_battle.lua new file mode 100644 index 0000000..bb24a1d --- /dev/null +++ b/scripts_decompiled/236000_battle.lua @@ -0,0 +1,323 @@ +REGISTER_GOAL(GOAL_FourKnightC236000_Battle, "FourKnightC236000Battle") +local Att3000_Dist_min = 1.8 +local Att3000_Dist_max = 4.8 +local Att3002_Dist_min = 0.5 +local Att3002_Dist_max = 1 +local Att3003_Dist_min = -1.1 +local Att3003_Dist_max = 1.3 +local Att3004_Dist_min = 2 +local Att3004_Dist_max = 4 +local Att3006_Dist_min = 5.3 +local Att3006_Dist_max = 6.7 +local Att3007_Dist_min = 12 +local Att3007_Dist_max = 18 +local Att3008_Dist_min = 0 +local Att3008_Dist_max = 0 +local Att3009_Dist_min = 3.2 +local Att3009_Dist_max = 10.2 +REGISTER_GOAL_NO_UPDATE(GOAL_FourKnightC236000_Battle, 1) +function OnIf_236000(ai, goal, codeNo) + local targetDist = ai:GetDist(TARGET_ENE_0) + local OddsLR = ai:GetRandam_Int(1, 100) + if codeNo == 0 then + if ai:IsInsideTarget(TARGET_FRI_0, AI_DIR_TYPE_R, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_NONE, 0, AI_DIR_TYPE_L, 3.7) + elseif ai:IsInsideTarget(TARGET_FRI_0, AI_DIR_TYPE_L, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_NONE, 0, AI_DIR_TYPE_R, 3.7) + elseif ai:IsInsideTarget(TARGET_FRI_0, AI_DIR_TYPE_F, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_FRI_0, 0, AI_DIR_TYPE_B, 4) + elseif OddsLR <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_NONE, 0, AI_DIR_TYPE_L, 3.7) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_NONE, 0, AI_DIR_TYPE_R, 3.7) + end + end + return +end + +function FourKnightC236000Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + ai:AddObserveArea(0, TARGET_FRI_0, TARGET_SELF, AI_DIR_TYPE_F, 360, 13) + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act08Per = 0 + local GetWellSpace_Odds = 0 + if 12 <= targetDist then + Act01Per = 25 + Act02Per = 15 + Act03Per = 0 + Act04Per = 50 + Act05Per = 0 + Act06Per = 0 + Act07Per = 0 + Act08Per = 10 + elseif 6.7 <= targetDist then + Act01Per = 60 + Act02Per = 10 + Act03Per = 0 + Act04Per = 0 + Act05Per = 20 + Act06Per = 0 + Act07Per = 0 + Act08Per = 10 + elseif 3.3 <= targetDist then + Act01Per = 20 + Act02Per = 20 + Act03Per = 0 + Act04Per = 0 + Act05Per = 40 + Act06Per = 0 + Act07Per = 0 + Act08Per = 20 + elseif 1 <= targetDist then + Act01Per = 0 + Act02Per = 0 + Act03Per = 25 + Act04Per = 0 + Act05Per = 0 + Act06Per = 37 + Act07Per = 38 + Act08Per = 0 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 150) then + Act01Per = 0 + Act02Per = 0 + Act03Per = 60 + Act04Per = 0 + Act05Per = 0 + Act06Per = 20 + Act07Per = 20 + Act08Per = 0 + else + Act01Per = 0 + Act02Per = 0 + Act03Per = 50 + Act04Per = 0 + Act05Per = 0 + Act06Per = 25 + Act07Per = 25 + Act08Per = 0 + end + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per) + if fateAct <= Act01Per then + FourKnightC236000_Act01(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per then + FourKnightC236000_Act02(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per then + FourKnightC236000_Act03(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + FourKnightC236000_Act04(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + FourKnightC236000_Act05(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + FourKnightC236000_Act06(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + FourKnightC236000_Act07(ai, goal) + GetWellSpace_Odds = 100 + else + FourKnightC236000_Act08(ai, goal) + GetWellSpace_Odds = 100 + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + FourKnightC236000_GetWellSpace_Act(ai, goal) + end + return +end + +Att3000_Dist_min = Att3006_Dist_max +function FourKnightC236000_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 4 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function FourKnightC236000_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 4 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + end + return +end + +function FourKnightC236000_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3008, TARGET_ENE_0, DIST_Middle, 0, -1) + return +end + +Att3000_Dist_min = Att3007_Dist_max +function FourKnightC236000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 4 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + return +end + +Att3000_Dist_min = Att3009_Dist_max +function FourKnightC236000_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3009_Dist_max + local DashDist = Att3009_Dist_max + 4 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + return +end + +Att3000_Dist_min = Att3002_Dist_max +function FourKnightC236000_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 4 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + return +end + +Att3000_Dist_min = Att3003_Dist_max +function FourKnightC236000_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 4 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + return +end + +Att3000_Dist_min = Att3004_Dist_max +function FourKnightC236000_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 4 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return +end + +function FourKnightC236000_GetWellSpace_Act(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate2 = ai:GetRandam_Int(1, 100) + local bRight = ai:GetRandam_Int(0, 1) + local friendNum = ai:GetTeamRecordCount(COORDINATE_TYPE_SideWalk_L + bRight, TARGET_ENE_0, 2) + if fate2 > 50 then + if fate2 <= 60 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 6, TARGET_ENE_0, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + end + end + return +end + +function FourKnightC236000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function FourKnightC236000Battle_Terminate(ai, goal) + return +end + +function FourKnightC236000Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_Inside_ObserveArea) and ai:IsFinishTimer(0) == true then + ai:SetTimer(0, 15) + goal:AddSubGoal(GOAL_COMMON_If, 30, 0) + return true + else + local distDamagedStep = 3 + local oddsDamagedStep = 15 + local bkStepPer = 60 + local leftStepPer = 20 + local rightStepPer = 20 + local safetyDist = 4 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distGuardBreak_Act = 7 + local oddsGuardBreak_Act = 80 + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if targetDist <= 1 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distMissSwing_Int = 7 + local oddsMissSwing_Int = 70 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + return true + else + local distUseItem_Act = 8 + local oddsUseItem_Act = 30 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if targetDist <= 1 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distResNear = 3.2 + local distResFar = 10.2 + local oddsResNear = 0 + local oddsResFar = 15 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + return true + elseif ResBehavID == 2 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + return true + else + return false + end + end + end + end + end + end +end + +return diff --git a/scripts_decompiled/236001_battle.lua b/scripts_decompiled/236001_battle.lua new file mode 100644 index 0000000..cf7d7d0 --- /dev/null +++ b/scripts_decompiled/236001_battle.lua @@ -0,0 +1,317 @@ +REGISTER_GOAL(GOAL_FourKnightC_Thunder236001_Battle, "FourKnightC_Thunder236001Battle") +local Att3000_Dist_min = 1.8 +local Att3000_Dist_max = 4.8 +local Att3002_Dist_min = 0.5 +local Att3002_Dist_max = 1 +local Att3003_Dist_min = -1.1 +local Att3003_Dist_max = 1.3 +local Att3004_Dist_min = 2 +local Att3004_Dist_max = 4 +local Att3006_Dist_min = 5.3 +local Att3006_Dist_max = 6.7 +local Att3007_Dist_min = 12 +local Att3007_Dist_max = 18 +local Att3008_Dist_min = 0 +local Att3008_Dist_max = 0 +local Att3009_Dist_min = 3.2 +local Att3009_Dist_max = 10.2 +REGISTER_GOAL_NO_UPDATE(GOAL_FourKnightC_Thunder236001_Battle, 1) +function OnIf_236001(ai, goal, codeNo) + local targetDist = ai:GetDist(TARGET_ENE_0) + local OddsLR = ai:GetRandam_Int(1, 100) + if codeNo == 0 then + if ai:IsInsideTarget(TARGET_FRI_0, AI_DIR_TYPE_R, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_NONE, 0, AI_DIR_TYPE_L, 3.7) + elseif ai:IsInsideTarget(TARGET_FRI_0, AI_DIR_TYPE_L, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_NONE, 0, AI_DIR_TYPE_R, 3.7) + elseif ai:IsInsideTarget(TARGET_FRI_0, AI_DIR_TYPE_F, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_FRI_0, 0, AI_DIR_TYPE_B, 4) + elseif OddsLR <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_NONE, 0, AI_DIR_TYPE_L, 3.7) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_NONE, 0, AI_DIR_TYPE_R, 3.7) + end + end + return +end + +function FourKnightC_Thunder236001Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + ai:AddObserveArea(0, TARGET_FRI_0, TARGET_SELF, AI_DIR_TYPE_F, 360, 13) + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act08Per = 0 + local GetWellSpace_Odds = 0 + if 12 <= targetDist then + Act01Per = 25 + Act02Per = 15 + Act03Per = 0 + Act04Per = 50 + Act05Per = 0 + Act06Per = 0 + Act07Per = 0 + Act08Per = 10 + elseif 6.7 <= targetDist then + Act01Per = 60 + Act02Per = 10 + Act03Per = 0 + Act04Per = 0 + Act05Per = 20 + Act06Per = 0 + Act07Per = 0 + Act08Per = 10 + elseif 3.3 <= targetDist then + Act01Per = 20 + Act02Per = 20 + Act03Per = 0 + Act04Per = 0 + Act05Per = 40 + Act06Per = 0 + Act07Per = 0 + Act08Per = 20 + elseif 1 <= targetDist then + Act01Per = 0 + Act02Per = 0 + Act03Per = 25 + Act04Per = 0 + Act05Per = 0 + Act06Per = 37 + Act07Per = 38 + Act08Per = 0 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 150) then + Act01Per = 0 + Act02Per = 0 + Act03Per = 60 + Act04Per = 0 + Act05Per = 0 + Act06Per = 20 + Act07Per = 20 + Act08Per = 0 + else + Act01Per = 0 + Act02Per = 0 + Act03Per = 50 + Act04Per = 0 + Act05Per = 0 + Act06Per = 25 + Act07Per = 25 + Act08Per = 0 + end + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per) + if fateAct <= Act01Per then + FourKnightC_Thunder236001_Act01(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per then + FourKnightC_Thunder236001_Act02(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per then + FourKnightC_Thunder236001_Act03(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + FourKnightC_Thunder236001_Act04(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + FourKnightC_Thunder236001_Act05(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + FourKnightC_Thunder236001_Act06(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + FourKnightC_Thunder236001_Act07(ai, goal) + GetWellSpace_Odds = 100 + else + FourKnightC_Thunder236001_Act08(ai, goal) + GetWellSpace_Odds = 100 + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + FourKnightC_Thunder236001_GetWellSpace_Act(ai, goal) + end + return +end + +Att3000_Dist_min = Att3006_Dist_max +function FourKnightC_Thunder236001_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 4 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function FourKnightC_Thunder236001_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 4 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + end + return +end + +function FourKnightC_Thunder236001_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3008, TARGET_ENE_0, DIST_Middle, 0, -1) + return +end + +Att3000_Dist_min = Att3007_Dist_max +function FourKnightC_Thunder236001_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 4 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + return +end + +Att3000_Dist_min = Att3009_Dist_max +function FourKnightC_Thunder236001_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3009_Dist_max + local DashDist = Att3009_Dist_max + 4 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + return +end + +Att3000_Dist_min = Att3002_Dist_max +function FourKnightC_Thunder236001_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 4 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + return +end + +Att3000_Dist_min = Att3003_Dist_max +function FourKnightC_Thunder236001_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 4 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + return +end + +Att3000_Dist_min = Att3004_Dist_max +function FourKnightC_Thunder236001_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 4 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return +end + +function FourKnightC_Thunder236001_GetWellSpace_Act(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate2 = ai:GetRandam_Int(1, 100) + local bRight = ai:GetRandam_Int(0, 1) + local friendNum = ai:GetTeamRecordCount(COORDINATE_TYPE_SideWalk_L + bRight, TARGET_ENE_0, 2) + if fate2 > 50 then + if fate2 <= 60 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 6, TARGET_ENE_0, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + end + end + return +end + +function FourKnightC_Thunder236001Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function FourKnightC_Thunder236001Battle_Terminate(ai, goal) + return +end + +function FourKnightC_Thunder236001Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local distDamagedStep = 3 + local oddsDamagedStep = 15 + local bkStepPer = 60 + local leftStepPer = 20 + local rightStepPer = 20 + local safetyDist = 4 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distGuardBreak_Act = 7 + local oddsGuardBreak_Act = 80 + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if targetDist <= 1 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distMissSwing_Int = 7 + local oddsMissSwing_Int = 70 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + return true + else + local distUseItem_Act = 8 + local oddsUseItem_Act = 30 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if targetDist <= 1 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distResNear = 3.2 + local distResFar = 10.2 + local oddsResNear = 0 + local oddsResFar = 50 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + return true + elseif ResBehavID == 2 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + return true + else + return false + end + end + end + end + end +end + +return diff --git a/scripts_decompiled/237000_battle.lua b/scripts_decompiled/237000_battle.lua new file mode 100644 index 0000000..fa89527 --- /dev/null +++ b/scripts_decompiled/237000_battle.lua @@ -0,0 +1,361 @@ +REGISTER_GOAL(GOAL_FourKnightD237000_Battle, "FourKnightD237000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 3.1 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 3.5 +local Att3005_Dist_min = 2.5 +local Att3005_Dist_max = 4 +local Att3006_Dist_min = 4 +local Att3006_Dist_max = 6 +local Att3007_Dist_min = 6 +local Att3007_Dist_max = 7.5 +local Att3009_Dist_min = 0 +local Att3009_Dist_max = 4.1 +REGISTER_GOAL_NO_UPDATE(GOAL_FourKnightD237000_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3003_Dist_max +function FourKnightD237000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local targetDistY = ai:GetDistYSigned(TARGET_ENE_0) + local GetWellSpace_Odds = 100 + if ai:ChkNearLowHpFriend(1, 20) and ai:IsInsideTargetRegion(TARGET_ENE_0, 1012775) and not ai:HasSpecialEffectId(TARGET_SELF, 5470) then + if 8 <= targetDist then + actPerArr[5] = 900 + elseif 4 <= targetDist then + actPerArr[5] = 50 + elseif 2.5 <= targetDist then + actPerArr[5] = 45 + else + actPerArr[5] = 20 + end + end + if ai:IsInsideTargetRegion(TARGET_SELF, 1012775) and ai:IsInsideTargetRegion(TARGET_ENE_0, 1012776) then + actPerArr[1] = 40 + actPerArr[3] = 60 + elseif ai:IsInsideTargetRegion(TARGET_SELF, 1012775) and ai:IsInsideTargetRegion(TARGET_ENE_0, 1012777) then + actPerArr[6] = 100 + elseif 8 <= targetDist then + actPerArr[1] = 40 + actPerArr[2] = 0 + actPerArr[3] = 60 + actPerArr[4] = 0 + actPerArr[9] = 0 + elseif 4 <= targetDist then + actPerArr[1] = 25 + actPerArr[2] = 15 + actPerArr[3] = 15 + actPerArr[4] = 15 + actPerArr[7] = 15 + actPerArr[9] = 15 + elseif 2.5 <= targetDist then + actPerArr[1] = 10 + actPerArr[2] = 15 + actPerArr[3] = 0 + actPerArr[4] = 50 + actPerArr[7] = 10 + actPerArr[9] = 15 + else + actPerArr[1] = 0 + actPerArr[2] = 10 + actPerArr[3] = 0 + actPerArr[4] = 70 + actPerArr[7] = 10 + actPerArr[9] = 10 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, FourKnightD237000_Act01) + local local0 = {} + local local1, local2, local3, local4 = nil + local0[1] = Att3000_Dist_max + local0[2] = 0 + local0[3] = 20 + local0[4] = 40 + local0[5] = local1 + local0[6] = local2 + local0[7] = local3 + local0[8] = local4 + defFuncParamTbl[2] = local0 + actFuncArr[3] = REGIST_FUNC(ai, goal, FourKnightD237000_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, FourKnightD237000_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, FourKnightD237000_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, FourKnightD237000_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, FourKnightD237000_Act07) + local0 = {} + local3, local4 = nil + local0[1] = Att3003_Dist_max + local0[2] = 0 + local0[3] = 40 + local0[4] = 100 + local0[5] = 3003 + local0[6] = 3004 + local0[7] = local3 + local0[8] = local4 + defFuncParamTbl[9] = local0 + local atkAfterFunc = REGIST_FUNC(ai, goal, FourKnightD237000_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +function FourKnightD237000_Act01(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function FourKnightD237000_Act03(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function FourKnightD237000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if targetDist <= 5 then + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 721, TARGET_ENE_0, 0.5, AI_DIR_TYPE_B, 7.5) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 10, TARGET_SELF, false, -1) + end + elseif targetDist <= 10 then + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 711, TARGET_ENE_0, 0.5, AI_DIR_TYPE_B, 4.5) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 5, TARGET_ENE_0, true, -1) + end + end + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function FourKnightD237000_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if 5 > targetDist then + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 721, TARGET_ENE_0, 0.5, AI_DIR_TYPE_B, 7.5) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 5, TARGET_SELF, false, -1) + end + end + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function FourKnightD237000_Act06(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_Wait, 2, TARGET_NONE, 0, 0, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3009_Dist_max +function FourKnightD237000_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3009_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3009, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function FourKnightD237000_ActAfter_AdjustSpace(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if fate > 10 then + if fate <= 90 then + goal:AddSubGoal(GOAL_COMMON_If, 10, 0) + else + goal:AddSubGoal(GOAL_COMMON_Wait, 2, TARGET_NONE, 0, 0, 0) + return true + end + end + return false +end + +function OnIf_237000(ai, goal, codeNo) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local canStep701 = 0 + local canStep702 = 0 + local canStep703 = 0 + local canStep711 = 0 + local canStep712 = 0 + local canStep713 = 0 + local canStep721 = 0 + local canStep722 = 0 + local canStep723 = 0 + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_B, 7.5) then + canStep721 = 1 + end + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_L, 7.5) then + canStep722 = 1 + end + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_R, 7.5) then + canStep723 = 1 + end + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_B, 4.5) then + canStep711 = 1 + end + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_L, 4.5) then + canStep712 = 1 + end + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_R, 4.5) then + canStep713 = 1 + end + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_B, 3.5) then + canStep701 = 1 + end + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_L, 3.5) then + canStep702 = 1 + end + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_R, 3.5) then + canStep703 = 1 + end + if canStep723 == 1 or canStep722 == 1 or canStep721 == 1 then + if canStep721 == 1 or canStep723 == 0 and canStep722 == 0 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 721, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 3) + elseif fate3 <= 50 or canStep722 == 0 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 723, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 3) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 722, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 3) + end + return true + elseif canStep713 == 1 or canStep712 == 1 or canStep711 == 1 then + if canStep711 == 1 or canStep713 == 0 and canStep712 == 0 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 711, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate3 <= 50 or canStep712 == 0 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 713, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 2) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 712, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 2) + end + return true + elseif canStep701 == 1 or canStep703 == 0 and canStep702 == 0 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 1) + elseif fate3 <= 50 or canStep702 == 0 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 1) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 1) + end + return true +end + +function FourKnightD237000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function FourKnightD237000Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3005_Dist_max +function FourKnightD237000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local canStep701 = 0 + local canStep702 = 0 + local canStep703 = 0 + local canStep711 = 0 + local canStep712 = 0 + local canStep713 = 0 + local canStep721 = 0 + local canStep722 = 0 + local canStep723 = 0 + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_B, 7.5) then + canStep721 = 1 + end + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_L, 7.5) then + canStep722 = 1 + end + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_R, 7.5) then + canStep723 = 1 + end + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_B, 4.5) then + canStep711 = 1 + end + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_L, 4.5) then + canStep712 = 1 + end + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_R, 4.5) then + canStep713 = 1 + end + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_B, 3.5) then + canStep701 = 1 + end + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_L, 3.5) then + canStep702 = 1 + end + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_R, 3.5) then + canStep703 = 1 + end + local distNearRes = 3.5 + local oddsNearRes = 30 + if Damaged_Act(ai, goal, distNearRes, oddsNearRes) then + goal:AddSubGoal(GOAL_COMMON_If, 10, 0) + end + if ai:IsInterupt(INTERUPT_Damaged) and 6 <= targetDist then + goal:ClearSubGoal() + if fate <= 25 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_None, 0) + elseif fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_None, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_None, 0) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_None, 0) + end + return true + else + local distGuardBreak_Act = 3.1 + local oddsGuardBreak_Act = 50 + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distMissSwing_Int = 6.5 + local oddsMissSwing_Int = 50 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distUseItem_Act = 8 + local oddsUseItem_Act = 15 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if targetDist <= 3.1 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3005_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + return true + elseif ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) and fate <= 20 then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_If, 10, 0) + return true + else + return false + end + end + end + end +end + +return diff --git a/scripts_decompiled/237001_battle.lua b/scripts_decompiled/237001_battle.lua new file mode 100644 index 0000000..0152a4e --- /dev/null +++ b/scripts_decompiled/237001_battle.lua @@ -0,0 +1,280 @@ +REGISTER_GOAL(GOAL_FourKnightD_m17_237001_Battle, "FourKnightD_m17_237001Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 3.1 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 3.5 +local Att3005_Dist_min = 2.5 +local Att3005_Dist_max = 4 +local Att3006_Dist_min = 4 +local Att3006_Dist_max = 6 +local Att3007_Dist_min = 6 +local Att3007_Dist_max = 7.5 +local Att3009_Dist_min = 0 +local Att3009_Dist_max = 4.1 +REGISTER_GOAL_NO_UPDATE(GOAL_FourKnightD_m17_237001_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3003_Dist_max +function FourKnightD_m17_237001Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if ai:ChkNearLowHpFriend(1, 20) and not ai:HasSpecialEffectId(TARGET_SELF, 5470) then + if 8 <= targetDist then + actPerArr[5] = 900 + elseif 4 <= targetDist then + actPerArr[5] = 50 + elseif 2.5 <= targetDist then + actPerArr[5] = 45 + else + actPerArr[5] = 20 + end + end + if 8 <= targetDist then + actPerArr[1] = 40 + actPerArr[2] = 0 + actPerArr[3] = 60 + actPerArr[9] = 0 + elseif 4 <= targetDist then + actPerArr[1] = 30 + actPerArr[2] = 15 + actPerArr[3] = 15 + actPerArr[7] = 15 + actPerArr[9] = 15 + elseif 2.5 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 25 + actPerArr[3] = 10 + actPerArr[7] = 20 + actPerArr[9] = 25 + else + actPerArr[1] = 10 + actPerArr[2] = 30 + actPerArr[3] = 0 + actPerArr[7] = 30 + actPerArr[9] = 30 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, FourKnightD_m17_237001_Act01) + local local0 = {} + local local1, local2, local3, local4 = nil + local0[1] = Att3000_Dist_max + local0[2] = 0 + local0[3] = 20 + local0[4] = 40 + local0[5] = local1 + local0[6] = local2 + local0[7] = local3 + local0[8] = local4 + defFuncParamTbl[2] = local0 + actFuncArr[3] = REGIST_FUNC(ai, goal, FourKnightD_m17_237001_Act03) + actFuncArr[5] = REGIST_FUNC(ai, goal, FourKnightD_m17_237001_Act05) + actFuncArr[7] = REGIST_FUNC(ai, goal, FourKnightD_m17_237001_Act07) + local0 = {} + local3, local4 = nil + local0[1] = Att3003_Dist_max + local0[2] = 0 + local0[3] = 40 + local0[4] = 100 + local0[5] = 3003 + local0[6] = 3004 + local0[7] = local3 + local0[8] = local4 + defFuncParamTbl[9] = local0 + local atkAfterFunc = REGIST_FUNC(ai, goal, FourKnightD_m17_237001_ActAfter_AdjustSpace) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +function FourKnightD_m17_237001_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3005, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function FourKnightD_m17_237001_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3006, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function FourKnightD_m17_237001_Act05(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3009_Dist_max +function FourKnightD_m17_237001_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3009_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3009, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function FourKnightD_m17_237001_ActAfter_AdjustSpace(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if fate > 10 then + if fate <= 90 then + goal:AddSubGoal(GOAL_COMMON_If, 10, 0) + else + goal:AddSubGoal(GOAL_COMMON_Wait, 2, TARGET_NONE, 0, 0, 0) + return true + end + end + return false +end + +function OnIf_237001(ai, goal, codeNo) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local canStep701 = 0 + local canStep702 = 0 + local canStep703 = 0 + local canStep711 = 0 + local canStep712 = 0 + local canStep713 = 0 + local canStep721 = 0 + local canStep722 = 0 + local canStep723 = 0 + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_B, 7.5) then + canStep721 = 1 + end + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_L, 7.5) then + canStep722 = 1 + end + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_R, 7.5) then + canStep723 = 1 + end + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_B, 4.5) then + canStep711 = 1 + end + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_L, 4.5) then + canStep712 = 1 + end + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_R, 4.5) then + canStep713 = 1 + end + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_B, 3.5) then + canStep701 = 1 + end + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_L, 3.5) then + canStep702 = 1 + end + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_R, 3.5) then + canStep703 = 1 + end + if canStep723 == 1 or canStep722 == 1 or canStep721 == 1 then + if canStep721 == 1 or canStep723 == 0 and canStep722 == 0 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 721, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 3) + elseif fate3 <= 50 or canStep722 == 0 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 723, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 3) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 722, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 3) + end + return true + elseif canStep713 == 1 or canStep712 == 1 or canStep711 == 1 then + if canStep711 == 1 or canStep713 == 0 and canStep712 == 0 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 711, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate3 <= 50 or canStep712 == 0 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 713, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 2) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 712, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 2) + end + return true + elseif canStep701 == 1 or canStep703 == 0 and canStep702 == 0 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 1) + elseif fate3 <= 50 or canStep702 == 0 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 1) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 1) + end + return true +end + +function FourKnightD_m17_237001Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function FourKnightD_m17_237001Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3005_Dist_max +function FourKnightD_m17_237001Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest(0) + local distNearRes = 3.5 + local oddsNearRes = 100 + local myThinkId = ai:GetNpcThinkParamID() + if ai:IsInterupt(INTERUPT_Damaged) then + if myThinkId == 237001 then + if eventNo ~= 1 and targetDist <= 3.5 then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 3008, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 0) + elseif targetDist <= 3.5 and fate <= 50 then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 3) + end + elseif myThinkId == 237001 and targetDist <= 3.5 and fate <= 50 then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 3) + end + end + local distGuardBreak_Act = 3.1 + local oddsGuardBreak_Act = 50 + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distMissSwing_Int = 6.5 + local oddsMissSwing_Int = 50 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distUseItem_Act = 8 + local oddsUseItem_Act = 15 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if targetDist <= 3.1 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3005_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + return true + elseif ai:IsInterupt(INTERUPT_ReboundByOpponentGuard) and fate <= 20 then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_If, 10, 0) + return true + else + return false + end + end + end +end + +return diff --git a/scripts_decompiled/238000_battle.lua b/scripts_decompiled/238000_battle.lua new file mode 100644 index 0000000..af46192 --- /dev/null +++ b/scripts_decompiled/238000_battle.lua @@ -0,0 +1,196 @@ +REGISTER_GOAL(GOAL_ClayDoll238000_Battle, "ClayDoll238000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 3.4 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 3.3 +local Att3005_Dist_min = 5.5 +local Att3005_Dist_max = 8.3 +local Att3006_Dist_min = 5.6 +local Att3006_Dist_max = 8 +local Att3007_Dist_min = 0 +local Att3007_Dist_max = 10 +REGISTER_GOAL_NO_UPDATE(GOAL_ClayDoll238000_Battle, 1) +function ClayDoll238000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local Act05_Odds = 0 + if ai:IsFinishTimer(0) == true then + Act05_Odds = 1 + end + if 8 <= targetDist then + actPerArr[1] = 40 + actPerArr[2] = 10 + actPerArr[3] = 45 + actPerArr[5] = 0 * Act05_Odds + actPerArr[9] = 5 + elseif 4 <= targetDist then + actPerArr[1] = 25 + actPerArr[2] = 20 + actPerArr[3] = 25 + actPerArr[5] = 10 * Act05_Odds + actPerArr[9] = 20 + elseif 2.5 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 30 + actPerArr[3] = 0 + actPerArr[5] = 40 * Act05_Odds + actPerArr[9] = 30 + else + actPerArr[1] = 0 + actPerArr[2] = 30 + actPerArr[3] = 0 + actPerArr[5] = 50 * Act05_Odds + actPerArr[9] = 20 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, ClayDoll238000_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, ClayDoll238000_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, ClayDoll238000_Act03) + actFuncArr[5] = REGIST_FUNC(ai, goal, ClayDoll238000_Act05) + actFuncArr[9] = REGIST_FUNC(ai, goal, ClayDoll238000_Act09) + local local0 = {100, 10, 30, 25, 20, 8, 7} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace_IncludeSidestep, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3005_Dist_max +function ClayDoll238000_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 30 + local Odds_Guard = 30 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3000_Dist_max +function ClayDoll238000_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 30 + local Odds_Guard = 30 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_max +function ClayDoll238000_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 30 + local Odds_Guard = 30 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function ClayDoll238000_Act05(ai, goal, paramTbl) + ai:SetTimer(0, 75) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3007, TARGET_ENE_0, DIST_Middle) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3003_Dist_max +function ClayDoll238000_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 30 + local Odds_Guard = 30 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function ClayDoll238000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function ClayDoll238000Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3003_Dist_max +function ClayDoll238000Battle_Interupt(ai, goal) + local distGuardBreak_Act = 8 + local oddsGuardBreak_Act = 35 + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if 5.5 <= targetDist then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + end + elseif fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3003_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + local distResNear = 8.3 + local distResFar = 20 + local oddsResNear = 0 + local oddsResFar = 100 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + elseif ResBehavID == 2 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + end + local distSuccessGuard_Act = 3.4 + local oddsSuccessGuard_Act = 40 + if SuccessGuard_Act(ai, goal, distSuccessGuard_Act, oddsSuccessGuard_Act) then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/239000_battle.lua b/scripts_decompiled/239000_battle.lua new file mode 100644 index 0000000..eb31409 --- /dev/null +++ b/scripts_decompiled/239000_battle.lua @@ -0,0 +1,257 @@ +REGISTER_GOAL(GOAL_Darkwraith239000_Battle, "Darkwraith239000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 2 +local Att3004_Dist_min = 4 +local Att3004_Dist_max = 5.6 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 2.1 +local Att3007_Dist_min = 0 +local Att3007_Dist_max = 1.6 +local Att3008_Dist_min = 0 +local Att3008_Dist_max = 1.2 +REGISTER_GOAL_NO_UPDATE(GOAL_Darkwraith239000_Battle, 1) +Att3000_Dist_min = Att3008_Dist_max +Att3000_Dist_min = Att3004_Dist_max +Att3000_Dist_min = Att3005_Dist_max +function Darkwraith239000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if 8 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 10 + actPerArr[4] = 0 + actPerArr[7] = 85 + actPerArr[9] = 5 + elseif 5 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 10 + actPerArr[2] = 15 + actPerArr[4] = 35 + actPerArr[7] = 20 + actPerArr[9] = 20 + else + actPerArr[1] = 5 + actPerArr[2] = 30 + actPerArr[4] = 0 + actPerArr[7] = 35 + actPerArr[9] = 25 + end + elseif 3.5 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 15 + actPerArr[2] = 10 + actPerArr[4] = 40 + actPerArr[7] = 5 + actPerArr[9] = 30 + else + actPerArr[1] = 15 + actPerArr[2] = 35 + actPerArr[4] = 0 + actPerArr[7] = 15 + actPerArr[9] = 35 + end + elseif ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 20 + actPerArr[2] = 10 + actPerArr[4] = 50 + actPerArr[7] = 0 + actPerArr[9] = 20 + else + actPerArr[1] = 20 + actPerArr[2] = 35 + actPerArr[4] = 10 + actPerArr[7] = 0 + actPerArr[9] = 35 + end + local local0 = {Att3008_Dist_max, 100, 3008, DIST_Middle} + defFuncParamTbl[1] = local0 + actFuncArr[2] = REGIST_FUNC(ai, goal, Darkwraith239000_Act02) + actFuncArr[4] = REGIST_FUNC(ai, goal, Darkwraith239000_Act04) + local0 = {Att3004_Dist_max, 30, 3004, DIST_Middle} + defFuncParamTbl[7] = local0 + local0 = {Att3005_Dist_max, 30, 30, 70, 3005, 3006, nil} + defFuncParamTbl[9] = local0 + local0 = {100, 60, 5, 5, 0, 15, 15} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace_IncludeSidestep, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function Darkwraith239000_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 30 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 5 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 15 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3007_Dist_max +function Darkwraith239000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 30 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Darkwraith239000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Darkwraith239000Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3004_Dist_max +function Darkwraith239000Battle_Interupt(ai, goal) + if ai:IsLadderAct(TARGET_SELF) then + return false + else + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distResponse = 3 + local oddsResponse = 15 + local oddsStep = 20 + local bkStepPer = 60 + local leftStepPer = 20 + local rightStepPer = 20 + local safetyDist = 3.5 + local oddsLeaveAndSide = 50 + local oddsSideAndLeave = 25 + local timeSide = 4.5 + local distLeave = 2.5 + if FindAttack_Step_or_Guard(ai, goal, distResponse, oddsResponse, oddsStep, bkStepPer, leftStepPer, rightStepPer, safetyDist, oddsLeaveAndSide, oddsSide, oddsSideAndLeave, timeSide, distLeave) then + return true + else + local distResponse = 3 + local oddsResponse = 25 + local oddsStep = 20 + local bkStepPer = 60 + local leftStepPer = 20 + local rightStepPer = 20 + local safetyDist = 3.5 + local oddsLeaveAndSide = 50 + local oddsSideAndLeave = 25 + local timeSide = 4.5 + local distLeave = 2.5 + if Damaged_Step_or_Guard(ai, goal, distResponse, oddsResponse, oddsStep, bkStepPer, leftStepPer, rightStepPer, safetyDist, oddsLeaveAndSide, oddsSide, oddsSideAndLeave, timeSide, distLeave) then + return true + else + local distGuardBreak_Act = 5.6 + local oddsGuardBreak_Act = 30 + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if targetDist <= 1 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3008, TARGET_ENE_0, DIST_Middle, 0) + elseif targetDist <= 2 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distMissSwing_Int = 5.6 + local oddsMissSwing_Int = 30 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if targetDist <= 2 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distUseItem_Act = 5.6 + local oddsUseItem_Act = 60 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if targetDist <= 1 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3008, TARGET_ENE_0, DIST_Middle, 0) + elseif targetDist <= 2 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3004_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distResNear = 5.6 + local distResFar = 18 + local oddsResNear = 0 + local oddsResFar = 50 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + return true + elseif ResBehavID == 2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + return true + elseif fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + else + local oddsResponse = 50 + local bkStepPer = 60 + local leftStepPer = 20 + local rightStepPer = 20 + local safetyDist = 3.5 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distSuccessGuard_Act = 5.6 + local oddsSuccessGuard_Act = 60 + if SuccessGuard_Act(ai, goal, distSuccessGuard_Act, oddsSuccessGuard_Act) then + if targetDist <= 2 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + return false + end + end + end + end + end + end + end + end + end +end + +return diff --git a/scripts_decompiled/240000_battle.lua b/scripts_decompiled/240000_battle.lua new file mode 100644 index 0000000..fd495c2 --- /dev/null +++ b/scripts_decompiled/240000_battle.lua @@ -0,0 +1,487 @@ +REGISTER_GOAL(GOAL_Assassin240000_Battle, "Assassin240000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 1.7 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 2.5 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 0.8 +local Att3005_Dist_min = 2 +local Att3005_Dist_max = 4.1 +local Att3006_Dist_min = 1 +local Att3006_Dist_max = 2.1 +local Att3007_Dist_min = 4 +local Att3007_Dist_max = 5.1 +local Att3008_Dist_min = 0 +local Att3008_Dist_max = 1.7 +local Att3011_Dist_min = 5 +local Att3011_Dist_max = 15 +REGISTER_GOAL_NO_UPDATE(GOAL_Assassin240000_Battle, 1) +function OnIf_240000(ai, goal, codeNo) + if ai:HasSpecialEffectId(TARGET_SELF, 3151) then + ai:SetTimer(0, 120) + else + ai:SetTimer(0, 30) + end + return +end + +Att3000_Dist_min = Att3004_Dist_max +function Assassin240000Battle_Activate(ai, goal) + local ObserveNo = 0 + local BackstabDist = 5 + local BackstabAng = 30 + ObserveAreaForBackstab(ai, goal, ObserveNo, BackstabDist, BackstabAng) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local hprate = ai:GetHpRate(TARGET_SELF) + if ai:IsLadderAct(TARGET_SELF) then + actPerArr[15] = 100 + elseif hprate <= 0.4 and ai:IsFinishTimer(0) == true then + if 4.5 <= targetDist then + actPerArr[7] = 300 + elseif 3 <= targetDist then + actPerArr[7] = 100 + else + actPerArr[7] = 50 + end + end + if ai:IsLadderAct(TARGET_SELF) then + actPerArr[15] = 100 + elseif ai:HasSpecialEffectId(TARGET_SELF, 5401) and hprate <= 0.5 and ai:IsFinishTimer(1) == true then + actPerArr[11] = 100 + elseif ai:HasSpecialEffectId(TARGET_SELF, 5400) and 0.5 <= hprate and ai:IsFinishTimer(1) == true then + actPerArr[12] = 100 + elseif 8 <= targetDist then + actPerArr[1] = 10 + actPerArr[2] = 5 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 80 + actPerArr[6] = 0 + actPerArr[8] = 0 + actPerArr[9] = 0 + actPerArr[10] = 5 + elseif 5 <= targetDist then + if ai:HasSpecialEffectId(TARGET_SELF, 5401) then + actPerArr[4] = 5 + end + actPerArr[1] = 40 + actPerArr[2] = 10 + actPerArr[3] = 0 + actPerArr[5] = 15 + actPerArr[6] = 0 + actPerArr[8] = 0 + actPerArr[9] = 10 + actPerArr[10] = 25 + elseif 3 <= targetDist then + if ai:HasSpecialEffectId(TARGET_SELF, 5401) then + actPerArr[4] = 20 + end + actPerArr[1] = 25 + actPerArr[2] = 35 + actPerArr[3] = 0 + actPerArr[5] = 0 + actPerArr[6] = 10 + actPerArr[8] = 0 + actPerArr[9] = 30 + actPerArr[10] = 0 + else + if ai:HasSpecialEffectId(TARGET_SELF, 5401) then + actPerArr[4] = 15 + end + actPerArr[1] = 0 + actPerArr[2] = 40 + actPerArr[3] = 20 + actPerArr[5] = 0 + actPerArr[6] = 20 + actPerArr[8] = 0 + actPerArr[9] = 20 + actPerArr[10] = 0 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Assassin240000_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Assassin240000_Act02) + local local0 = {Att3004_Dist_max, 0, 3004, DIST_Middle} + defFuncParamTbl[3] = local0 + actFuncArr[4] = REGIST_FUNC(ai, goal, Assassin240000_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, Assassin240000_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, Assassin240000_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, Assassin240000_Act07) + actFuncArr[9] = REGIST_FUNC(ai, goal, Assassin240000_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, Assassin240000_Act10) + actFuncArr[11] = REGIST_FUNC(ai, goal, Assassin240000_Act11) + actFuncArr[12] = REGIST_FUNC(ai, goal, Assassin240000_Act12) + actFuncArr[15] = REGIST_FUNC(ai, goal, Assassin240000_Act15) + local atkAfterFunc = REGIST_FUNC(ai, goal, Assassin240000_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3005_Dist_max +function Assassin240000_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 100 + local AttID = 3005 + local AttDist = DIST_Middle + if ai:HasSpecialEffectId(TARGET_SELF, 5400) then + Odds_Guard = 100 + else + Odds_Guard = 0 + end + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3000_Dist_max +function Assassin240000_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 100 + if ai:HasSpecialEffectId(TARGET_SELF, 5400) then + Odds_Guard = 100 + else + Odds_Guard = 0 + end + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3000, TARGET_ENE_0, DIST_Middle) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3008_Dist_max +function Assassin240000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3008_Dist_max + local DashDist = Att3008_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3008 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3011_Dist_min +Att3000_Dist_min = Att3011_Dist_max +function Assassin240000_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local LeaveDist = Att3011_Dist_min + local AppDist = Att3011_Dist_max + local DashDist = Att3011_Dist_max + 2 + local Odds_Guard = 100 + if ai:HasSpecialEffectId(TARGET_SELF, 5400) then + Odds_Guard = 100 + else + Odds_Guard = 0 + end + Approach_or_Leave_Act(ai, goal, LeaveDist, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3011, TARGET_ENE_0, DIST_None) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_max +function Assassin240000_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 100 + if ai:HasSpecialEffectId(TARGET_SELF, 5400) then + Odds_Guard = 100 + else + Odds_Guard = 0 + end + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 711, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3006, TARGET_ENE_0, DIST_Middle) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Assassin240000_Act07(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + if fate <= 40 then + if ai:HasSpecialEffectId(TARGET_SELF, 5400) then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 4.5, TARGET_ENE_0, true, 9910) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3200, TARGET_ENE_0, DIST_None) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 4.5, TARGET_ENE_0, true, -1) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3200, TARGET_ENE_0, DIST_None) + end + elseif fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 711, TARGET_ENE_0, -1, AI_DIR_TYPE_B, 2.5) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3200, TARGET_ENE_0, DIST_None) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, -1, AI_DIR_TYPE_B, 4) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3200, TARGET_ENE_0, DIST_None) + end + goal:AddSubGoal(GOAL_COMMON_If, 15, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3002_Dist_max +function Assassin240000_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 100 + if ai:HasSpecialEffectId(TARGET_SELF, 5400) then + Odds_Guard = 100 + else + Odds_Guard = 0 + end + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3002, TARGET_ENE_0, DIST_Middle) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3007_Dist_max +function Assassin240000_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 100 + if ai:HasSpecialEffectId(TARGET_SELF, 5400) then + Odds_Guard = 100 + else + Odds_Guard = 0 + end + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 700, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 4) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3007, TARGET_ENE_0, DIST_Middle) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Assassin240000_Act11(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3012, TARGET_SELF, DIST_None) + ai:SetTimer(1, 30) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Assassin240000_Act12(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3013, TARGET_SELF, DIST_None) + ai:SetTimer(1, 30) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3002_Dist_max +function Assassin240000_Act15(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 100 + if ai:HasSpecialEffectId(TARGET_SELF, 5400) then + Odds_Guard = 100 + else + Odds_Guard = 0 + end + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3002, TARGET_ENE_0, DIST_Middle) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return +end + +function Assassin240000_ActAfter_AdjustSpace(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate > 40 then + if fate <= 55 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, -1, AI_DIR_TYPE_B, 4) + else + if fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, -1, AI_DIR_TYPE_L, 4) + return true + elseif fate <= 85 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, -1, AI_DIR_TYPE_R, 4) + return true + elseif ai:HasSpecialEffectId(TARGET_SELF, 5400) then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 6, TARGET_ENE_0, 5, TARGET_ENE_0, true, 9910) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + end + return true + end + end + return false +end + +function Assassin240000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Assassin240000Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3002_Dist_max +function Assassin240000Battle_Interupt(ai, goal) + if ai:IsLadderAct(TARGET_SELF) then + return false + else + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local superStepDist = 3 + local superStepPer = 25 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer) then + return true + else + local distDamagedStep = 3 + local oddsDamagedStep = 35 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 4 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local guardBreakConutDist = 1.7 + local guardBreakConutPer = 25 + if FindGuardBreak_Act(ai, goal, guardBreakConutDist, guardBreakConutPer) then + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3002 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + return true + else + local distMissSwing_Int = 4.1 + local oddsMissSwing_Int = 50 + local targetDist = ai:GetDist(TARGET_ENE_0) + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if 2 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local ParryDist = 3 + local ParryAng = 60 + local ParryThrowDist = 4 + local ParryThrowAng = 60 + if Parry_Act(ai, goal, ParryDist, ParryAng, ParryThrowDist, ParryThrowAng) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + return true + else + local ObserveNo = 0 + local ApproachDist = 1 + local TimerIndex = 0 + local Time = 20 + if Backstab_Act(ai, goal, ObserveNo, ApproachDist, TimerIndex, Time) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + return true + else + local distResNear = 3 + local distResFar = 30 + local oddsResNear = 60 + local oddsResFar = 70 + if ai:IsFinishTimer(1) then + if ai:HasSpecialEffectId(TARGET_SELF, 5401) then + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + if fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3012, TARGET_SELF, DIST_None) + ai:SetTimer(1, 30) + elseif fate <= 55 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3012, TARGET_SELF, DIST_None) + ai:SetTimer(1, 30) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3012, TARGET_SELF, DIST_None) + ai:SetTimer(1, 30) + end + return true + elseif ResBehavID == 2 then + if fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3012, TARGET_SELF, DIST_None) + ai:SetTimer(1, 30) + elseif fate <= 55 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3012, TARGET_SELF, DIST_None) + ai:SetTimer(1, 30) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3012, TARGET_SELF, DIST_None) + ai:SetTimer(1, 30) + end + return true + else + return true + end + else + return true + end + else + local oddsResponse = 35 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 4 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distSuccessGuard_Act = 4.1 + local oddsSuccessGuard_Act = 60 + if SuccessGuard_Act(ai, goal, distSuccessGuard_Act, oddsSuccessGuard_Act) then + if 2 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + return false + end + end + end + end + end + end + end + end + end + end +end + +return diff --git a/scripts_decompiled/240001_battle.lua b/scripts_decompiled/240001_battle.lua new file mode 100644 index 0000000..47630c6 --- /dev/null +++ b/scripts_decompiled/240001_battle.lua @@ -0,0 +1,413 @@ +REGISTER_GOAL(GOAL_Assassin_shot240001_Battle, "Assassin_shot240001Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 1.7 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 2.5 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 0.8 +local Att3005_Dist_min = 2 +local Att3005_Dist_max = 4.1 +local Att3006_Dist_min = 1 +local Att3006_Dist_max = 2.1 +local Att3007_Dist_min = 4 +local Att3007_Dist_max = 5.1 +local Att3008_Dist_min = 0 +local Att3008_Dist_max = 1.7 +local Att3011_Dist_min = 5 +local Att3011_Dist_max = 15 +REGISTER_GOAL_NO_UPDATE(GOAL_Assassin_shot240001_Battle, 1) +function OnIf_240001(ai, goal, codeNo) + if ai:HasSpecialEffectId(TARGET_SELF, 3151) then + ai:SetTimer(0, 120) + else + ai:SetTimer(0, 30) + end + return +end + +Att3000_Dist_min = Att3004_Dist_max +function Assassin_shot240001Battle_Activate(ai, goal) + local ObserveNo = 0 + local BackstabDist = 5 + local BackstabAng = 30 + ObserveAreaForBackstab(ai, goal, ObserveNo, BackstabDist, BackstabAng) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local hprate = ai:GetHpRate(TARGET_SELF) + if hprate <= 0.4 and ai:IsFinishTimer(0) == true then + if 4.5 <= targetDist then + actPerArr[7] = 300 + elseif 3 <= targetDist then + actPerArr[7] = 100 + else + actPerArr[7] = 50 + end + end + if ai:HasSpecialEffectId(TARGET_SELF, 5401) and hprate <= 0.5 and ai:IsFinishTimer(1) == true then + actPerArr[11] = 100 + elseif ai:HasSpecialEffectId(TARGET_SELF, 5400) and 0.5 <= hprate and ai:IsFinishTimer(1) == true then + actPerArr[12] = 100 + elseif 2.5 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 100 + actPerArr[8] = 0 + actPerArr[9] = 0 + actPerArr[10] = 0 + else + if ai:HasSpecialEffectId(TARGET_SELF, 5401) then + actPerArr[4] = 15 + end + actPerArr[1] = 0 + actPerArr[2] = 40 + actPerArr[3] = 20 + actPerArr[5] = 20 + actPerArr[6] = 0 + actPerArr[8] = 0 + actPerArr[9] = 20 + actPerArr[10] = 0 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Assassin_shot240001_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Assassin_shot240001_Act02) + local local0 = {Att3004_Dist_max, 0, 3004, DIST_Middle} + defFuncParamTbl[3] = local0 + actFuncArr[4] = REGIST_FUNC(ai, goal, Assassin_shot240001_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, Assassin_shot240001_Act05) + local0 = {3011, DIST_Far, nil} + defFuncParamTbl[6] = local0 + actFuncArr[7] = REGIST_FUNC(ai, goal, Assassin_shot240001_Act07) + actFuncArr[9] = REGIST_FUNC(ai, goal, Assassin_shot240001_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, Assassin_shot240001_Act10) + actFuncArr[11] = REGIST_FUNC(ai, goal, Assassin_shot240001_Act11) + actFuncArr[12] = REGIST_FUNC(ai, goal, Assassin_shot240001_Act12) + local atkAfterFunc = REGIST_FUNC(ai, goal, Assassin_shot240001_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3005_Dist_max +function Assassin_shot240001_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 100 + local AttID = 3005 + local AttDist = DIST_Middle + if ai:HasSpecialEffectId(TARGET_SELF, 5400) then + Odds_Guard = 100 + else + Odds_Guard = 0 + end + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3000_Dist_max +function Assassin_shot240001_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 100 + if ai:HasSpecialEffectId(TARGET_SELF, 5400) then + Odds_Guard = 100 + else + Odds_Guard = 0 + end + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3000, TARGET_ENE_0, DIST_Middle) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3008_Dist_max +function Assassin_shot240001_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3008_Dist_max + local DashDist = Att3008_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3008 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_max +function Assassin_shot240001_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 100 + if ai:HasSpecialEffectId(TARGET_SELF, 5400) then + Odds_Guard = 100 + else + Odds_Guard = 0 + end + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 711, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3006, TARGET_ENE_0, DIST_Middle) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Assassin_shot240001_Act07(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + if fate <= 40 then + if ai:HasSpecialEffectId(TARGET_SELF, 5400) then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 4.5, TARGET_ENE_0, true, 9910) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3200, TARGET_ENE_0, DIST_None) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 4.5, TARGET_ENE_0, true, -1) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3200, TARGET_ENE_0, DIST_None) + end + elseif fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 711, TARGET_ENE_0, -1, AI_DIR_TYPE_B, 2.5) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3200, TARGET_ENE_0, DIST_None) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, -1, AI_DIR_TYPE_B, 4) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3200, TARGET_ENE_0, DIST_None) + end + goal:AddSubGoal(GOAL_COMMON_If, 15, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3002_Dist_max +function Assassin_shot240001_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 100 + if ai:HasSpecialEffectId(TARGET_SELF, 5400) then + Odds_Guard = 100 + else + Odds_Guard = 0 + end + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3002, TARGET_ENE_0, DIST_Middle) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3007_Dist_max +function Assassin_shot240001_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 100 + if ai:HasSpecialEffectId(TARGET_SELF, 5400) then + Odds_Guard = 100 + else + Odds_Guard = 0 + end + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 700, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 4) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3007, TARGET_ENE_0, DIST_Middle) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Assassin_shot240001_Act11(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3012, TARGET_SELF, DIST_None) + ai:SetTimer(1, 30) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Assassin_shot240001_Act12(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3013, TARGET_SELF, DIST_None) + ai:SetTimer(1, 30) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Assassin_shot240001_ActAfter_AdjustSpace(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate > 40 then + if fate <= 55 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, -1, AI_DIR_TYPE_B, 4) + else + if fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, -1, AI_DIR_TYPE_L, 4) + return true + elseif fate <= 85 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, -1, AI_DIR_TYPE_R, 4) + return true + elseif ai:HasSpecialEffectId(TARGET_SELF, 5400) then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 6, TARGET_ENE_0, 5, TARGET_ENE_0, true, 9910) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + end + return true + end + end + return false +end + +function Assassin_shot240001Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Assassin_shot240001Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3002_Dist_max +function Assassin_shot240001Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local superStepDist = 3 + local superStepPer = 25 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer) then + return true + else + local distDamagedStep = 3 + local oddsDamagedStep = 35 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 4 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local guardBreakConutDist = 1.7 + local guardBreakConutPer = 25 + if FindGuardBreak_Act(ai, goal, guardBreakConutDist, guardBreakConutPer) then + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3002 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + return true + else + local distMissSwing_Int = 4.1 + local oddsMissSwing_Int = 50 + local targetDist = ai:GetDist(TARGET_ENE_0) + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if 2 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local ParryDist = 3 + local ParryAng = 60 + local ParryThrowDist = 4 + local ParryThrowAng = 60 + if Parry_Act(ai, goal, ParryDist, ParryAng, ParryThrowDist, ParryThrowAng) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + return true + else + local ObserveNo = 0 + local ApproachDist = 1 + local TimerIndex = 0 + local Time = 20 + if Backstab_Act(ai, goal, ObserveNo, ApproachDist, TimerIndex, Time) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + return true + else + local distResNear = 3 + local distResFar = 30 + local oddsResNear = 60 + local oddsResFar = 70 + if ai:IsFinishTimer(1) then + if ai:HasSpecialEffectId(TARGET_SELF, 5401) then + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + if fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3012, TARGET_SELF, DIST_None) + ai:SetTimer(1, 30) + elseif fate <= 55 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3012, TARGET_SELF, DIST_None) + ai:SetTimer(1, 30) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3012, TARGET_SELF, DIST_None) + ai:SetTimer(1, 30) + end + return true + elseif ResBehavID == 2 then + if fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3012, TARGET_SELF, DIST_None) + ai:SetTimer(1, 30) + elseif fate <= 55 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3012, TARGET_SELF, DIST_None) + ai:SetTimer(1, 30) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3012, TARGET_SELF, DIST_None) + ai:SetTimer(1, 30) + end + return true + else + return true + end + else + return true + end + else + local oddsResponse = 35 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 4 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distSuccessGuard_Act = 4.1 + local oddsSuccessGuard_Act = 60 + if SuccessGuard_Act(ai, goal, distSuccessGuard_Act, oddsSuccessGuard_Act) then + if 2 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + return false + end + end + end + end + end + end + end + end + end +end + +return diff --git a/scripts_decompiled/241000_battle.lua b/scripts_decompiled/241000_battle.lua new file mode 100644 index 0000000..a9f8e6e --- /dev/null +++ b/scripts_decompiled/241000_battle.lua @@ -0,0 +1,312 @@ +REGISTER_GOAL(GOAL_WhiteKnight_Sword241000_Battle, "WhiteKnight_Sword241000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 3.1 +local Att3004_Dist_min = 3.5 +local Att3004_Dist_max = 5.6 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 2.2 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 3.1 +local Att3007_Dist_min = 0 +local Att3007_Dist_max = 2.6 +local Att3008_Dist_min = 0 +local Att3008_Dist_max = 3.1 +local Att3009_Dist_min = 5 +local Att3009_Dist_max = 6.5 +REGISTER_GOAL_NO_UPDATE(GOAL_WhiteKnight_Sword241000_Battle, 1) +Att3000_Dist_min = Att3005_Dist_max +function WhiteKnight_Sword241000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest() + ai:AddObserveArea(0, TARGET_ENE_0, TARGET_SELF, AI_DIR_TYPE_B, 80, 8) + if ai:IsTargetGuard(TARGET_ENE_0) == true then + if 5.5 <= targetDist then + actPerArr[4] = 20 + elseif 3.2 <= targetDist then + actPerArr[4] = 80 + else + actPerArr[4] = 150 + end + end + if 8 <= targetDist then + actPerArr[1] = 70 + actPerArr[2] = 15 + actPerArr[3] = 0 + actPerArr[5] = 15 + elseif 5.5 <= targetDist then + actPerArr[1] = 55 + actPerArr[2] = 10 + actPerArr[3] = 10 + actPerArr[5] = 25 + elseif 3.2 <= targetDist then + actPerArr[1] = 15 + actPerArr[2] = 35 + actPerArr[3] = 20 + actPerArr[5] = 20 + else + actPerArr[1] = 0 + actPerArr[2] = 50 + actPerArr[3] = 25 + actPerArr[5] = 25 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, WhiteKnight_Sword241000_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, WhiteKnight_Sword241000_Act02) + local local0 = {Att3005_Dist_max, 0, 3005, DIST_Middle} + defFuncParamTbl[3] = local0 + actFuncArr[4] = REGIST_FUNC(ai, goal, WhiteKnight_Sword241000_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, WhiteKnight_Sword241000_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, WhiteKnight_Sword241000_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, WhiteKnight_Sword241000_Act07) + local atkAfterFunc = REGIST_FUNC(ai, goal, WhiteKnight_Sword241000_ActAfter_AdjustSpace) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3004_Dist_max +function WhiteKnight_Sword241000_Act01(ai, goal, paramTbl) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 75 + local fate = ai:GetRandam_Int(1, 100) + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3004, TARGET_ENE_0, DIST_Middle, -1, 25) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3000_Dist_max +function WhiteKnight_Sword241000_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 75 + local fate = ai:GetRandam_Int(1, 100) + if fate <= 20 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 25) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 60 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 25) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + else + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 25) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3007_Dist_max +function WhiteKnight_Sword241000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 75 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_GuardBreakTunable, 10, 3007, TARGET_ENE_0, DIST_Middle, -1, 25) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_max +function WhiteKnight_Sword241000_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 75 + local AttID = 3006 + local AttDist = DIST_Middle + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3008_Dist_max +function WhiteKnight_Sword241000_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3008_Dist_max + local DashDist = Att3008_Dist_max + 2 + local Odds_Guard = 75 + local AttID = 3008 + local AttDist = DIST_Middle + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3008, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3009_Dist_max +function WhiteKnight_Sword241000_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3009_Dist_max + local DashDist = Att3009_Dist_max + 2 + local Odds_Guard = 75 + local AttID = 3009 + local AttDist = DIST_Middle + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function WhiteKnight_Sword241000_ActAfter_AdjustSpace(ai, goal, paramTbl) + local GW_fate = ai:GetRandam_Int(0, 100) + local bRight = ai:GetRandam_Int(0, 1) + local friendNum = ai:GetTeamRecordCount(COORDINATE_TYPE_SideWalk_L + bRight, TARGET_ENE_0, 2) + if GW_fate <= 20 and friendNum < 2 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 2, TARGET_ENE_0, true, 9910) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, bRight, ai:GetRandam_Int(30, 45), true, true, 9910) + elseif GW_fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 3, TARGET_ENE_0, true, 9910) + elseif GW_fate <= 37 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + elseif GW_fate <= 45 then + local fate = ai:GetRandam_Int(1, 100) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + end + return +end + +function WhiteKnight_Sword241000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function WhiteKnight_Sword241000Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3005_Dist_max +Att3000_Dist_min = Att3007_Dist_max +Att3000_Dist_min = Att3009_Dist_max +Att3000_Dist_min = Att3008_Dist_max +function WhiteKnight_Sword241000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distResponse = 3 + local oddsResponse = 10 + local oddsStep = 30 + local bkStepPer = 60 + local leftStepPer = 20 + local rightStepPer = 20 + local safetyDist = 3.5 + local oddsLeaveAndSide = 50 + local oddsSideAndLeave = 25 + local timeSide = 4.5 + local distLeave = 2.5 + if Damaged_Step_or_Guard(ai, goal, distResponse, oddsResponse, oddsStep, bkStepPer, leftStepPer, rightStepPer, safetyDist, oddsLeaveAndSide, oddsSide, oddsSideAndLeave, timeSide, distLeave) then + return true + else + local distMissSwing_Int = 2.7 + local oddsMissSwing_Int = 30 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distUseItem_Act = 6.2 + local oddsUseItem_Act = 60 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if targetDist <= 4 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distResNear = 4 + local distResFar = 18 + local oddsResNear = 40 + local oddsResFar = 50 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + if fate <= 80 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3005_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + elseif ResBehavID == 2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3007_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + return true + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3007_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3007_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local oddsResponse = 35 + local bkStepPer = 60 + local leftStepPer = 20 + local rightStepPer = 20 + local safetyDist = 3.5 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distSuccessGuard_Act = 2.7 + local oddsSuccessGuard_Act = 70 + if SuccessGuard_Act(ai, goal, distSuccessGuard_Act, oddsSuccessGuard_Act) then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + return true + elseif ai:IsInsideObserve(0) and ai:IsFinishTimer(0) == true and targetDist <= 6.5 then + goal:ClearSubGoal() + ai:SetTimer(0, 18) + if 3.1 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3009_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3008_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3008, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + return false + end + end + end + end + end + end +end + +return diff --git a/scripts_decompiled/241001_battle.lua b/scripts_decompiled/241001_battle.lua new file mode 100644 index 0000000..3228884 --- /dev/null +++ b/scripts_decompiled/241001_battle.lua @@ -0,0 +1,310 @@ +REGISTER_GOAL(GOAL_WhiteKnight_Lar_Sw241001_Battle, "WhiteKnight_Lar_Sw241001Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 3.6 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 4.1 +local Att3007_Dist_min = 1.6 +local Att3007_Dist_max = 3.7 +local Att3010_Dist_min = 6.5 +local Att3010_Dist_max = 8.3 +local Att3011_Dist_min = 4.4 +local Att3011_Dist_max = 6.7 +local Att3012_Dist_min = 0 +local Att3012_Dist_max = 1.7 +REGISTER_GOAL_NO_UPDATE(GOAL_WhiteKnight_Lar_Sw241001_Battle, 1) +Att3000_Dist_min = Att3010_Dist_max +Att3000_Dist_min = Att3011_Dist_max +Att3000_Dist_min = Att3012_Dist_max +function WhiteKnight_Lar_Sw241001Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest() + if 6.7 <= targetDist then + actPerArr[1] = 32 + actPerArr[2] = 10 + actPerArr[3] = 32 + actPerArr[4] = 6 + actPerArr[5] = 10 + actPerArr[6] = 10 + elseif 4.4 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 25 + actPerArr[3] = 20 + actPerArr[4] = 10 + actPerArr[5] = 25 + actPerArr[6] = 20 + else + actPerArr[1] = 0 + actPerArr[2] = 45 + actPerArr[3] = 0 + actPerArr[4] = 10 + actPerArr[5] = 20 + actPerArr[6] = 40 + end + local local0 = {Att3010_Dist_max, 75, 3010, DIST_Middle} + defFuncParamTbl[1] = local0 + actFuncArr[2] = REGIST_FUNC(ai, goal, WhiteKnight_Lar_Sw241001_Act02) + local0 = {Att3011_Dist_max, 75, 3011, DIST_Middle} + defFuncParamTbl[3] = local0 + local0 = {Att3012_Dist_max, 75, 3012, DIST_Middle, 3007, DIST_Middle, nil} + defFuncParamTbl[4] = local0 + actFuncArr[5] = REGIST_FUNC(ai, goal, WhiteKnight_Lar_Sw241001_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, WhiteKnight_Lar_Sw241001_Act06) + local atkAfterFunc = REGIST_FUNC(ai, goal, WhiteKnight_Lar_Sw241001_ActAfter_AdjustSpace) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function WhiteKnight_Lar_Sw241001_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 75 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate <= 30 then + if fate2 <= 30 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + elseif fate2 <= 70 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + end + elseif fate <= 70 then + if fate2 <= 33 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + elseif fate2 <= 66 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + else + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3008, TARGET_ENE_0, DIST_Middle, 0) + end + elseif fate2 <= 50 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3007_Dist_max +function WhiteKnight_Lar_Sw241001_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 75 + local AttID = 3007 + local AttDist = DIST_Middle + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3005_Dist_max +function WhiteKnight_Lar_Sw241001_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 75 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate <= 30 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + elseif fate2 <= 33 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + elseif fate2 <= 66 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + else + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3008, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function WhiteKnight_Lar_Sw241001_ActAfter_AdjustSpace(ai, goal, paramTbl) + local GW_fate = ai:GetRandam_Int(0, 100) + local bRight = ai:GetRandam_Int(0, 1) + local friendNum = ai:GetTeamRecordCount(COORDINATE_TYPE_SideWalk_L + bRight, TARGET_ENE_0, 2) + if GW_fate <= 30 and friendNum < 2 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 2, TARGET_ENE_0, true, 9910) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, bRight, ai:GetRandam_Int(30, 45), true, true, 9910) + elseif GW_fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 3, TARGET_ENE_0, true, 9910) + elseif GW_fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + else + local fate = ai:GetRandam_Int(1, 100) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + end + return +end + +function WhiteKnight_Lar_Sw241001Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function WhiteKnight_Lar_Sw241001Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3005_Dist_max +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3010_Dist_max +function WhiteKnight_Lar_Sw241001Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distResponse = 3 + local oddsResponse = 8 + local oddsStep = 30 + local bkStepPer = 60 + local leftStepPer = 20 + local rightStepPer = 20 + local safetyDist = 3.5 + local oddsLeaveAndSide = 50 + local oddsSideAndLeave = 25 + local timeSide = 4.5 + local distLeave = 2.5 + if Damaged_Step_or_Guard(ai, goal, distResponse, oddsResponse, oddsStep, bkStepPer, leftStepPer, rightStepPer, safetyDist, oddsLeaveAndSide, oddsSide, oddsSideAndLeave, timeSide, distLeave) then + return true + else + local distGuardBreak_Act = 3.6 + local oddsGuardBreak_Act = 70 + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distMissSwing_Int = 3.6 + local oddsMissSwing_Int = 30 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distUseItem_Act = 8.3 + local oddsUseItem_Act = 60 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if targetDist <= 6.4 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3005_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3010, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distResNear = 6.4 + local distResFar = 18 + local oddsResNear = 40 + local oddsResFar = 50 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + if fate <= 80 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3005_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + elseif ResBehavID == 2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3010_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3010, TARGET_ENE_0, DIST_Middle, 0) + return true + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3010_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3010, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3010_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3010, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local oddsResponse = 30 + local bkStepPer = 60 + local leftStepPer = 20 + local rightStepPer = 20 + local safetyDist = 3.5 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distSuccessGuard_Act = 3.6 + local oddsSuccessGuard_Act = 70 + if SuccessGuard_Act(ai, goal, distSuccessGuard_Act, oddsSuccessGuard_Act) then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + return false + end + end + end + end + end + end + end +end + +return diff --git a/scripts_decompiled/241002_battle.lua b/scripts_decompiled/241002_battle.lua new file mode 100644 index 0000000..33d031f --- /dev/null +++ b/scripts_decompiled/241002_battle.lua @@ -0,0 +1,260 @@ +REGISTER_GOAL(GOAL_WhiteKnight_Ax241002_Battle, "WhiteKnight_Ax241002Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 3.2 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 2.5 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 2.5 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 1.6 +local Att3008_Dist_min = 3.6 +local Att3008_Dist_max = 4.2 +local Att3009_Dist_min = 5.3 +local Att3009_Dist_max = 6.9 +REGISTER_GOAL_NO_UPDATE(GOAL_WhiteKnight_Ax241002_Battle, 1) +Att3000_Dist_min = Att3008_Dist_max +Att3000_Dist_min = Att3009_Dist_max +Att3000_Dist_min = Att3006_Dist_max +Att3000_Dist_min = Att3005_Dist_max +function WhiteKnight_Ax241002Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest() + if 5.3 <= targetDist then + actPerArr[1] = 15 + actPerArr[2] = 5 + actPerArr[3] = 70 + actPerArr[4] = 0 + actPerArr[5] = 5 + actPerArr[9] = 5 + elseif 3.6 <= targetDist then + actPerArr[1] = 45 + actPerArr[2] = 15 + actPerArr[3] = 0 + actPerArr[4] = 10 + actPerArr[5] = 15 + actPerArr[9] = 15 + else + actPerArr[1] = 0 + actPerArr[2] = 35 + actPerArr[3] = 0 + actPerArr[4] = 15 + actPerArr[5] = 15 + actPerArr[9] = 35 + end + local local0 = {Att3008_Dist_max, 75, 3008, DIST_Middle} + defFuncParamTbl[1] = local0 + actFuncArr[2] = REGIST_FUNC(ai, goal, WhiteKnight_Ax241002_Act02) + local0 = {Att3009_Dist_max, 75, 3009, DIST_Middle} + defFuncParamTbl[3] = local0 + local0 = {Att3006_Dist_max, 75, 3006, DIST_Middle, 3004, DIST_Middle, nil} + defFuncParamTbl[4] = local0 + actFuncArr[5] = REGIST_FUNC(ai, goal, WhiteKnight_Ax241002_Act05) + local0 = {} + local local1, local2 = nil + local0[1] = Att3005_Dist_max + local0[2] = 75 + local0[3] = 20 + local0[4] = 80 + local0[5] = 3005 + local0[6] = 3007 + local0[7] = local1 + local0[8] = local2 + defFuncParamTbl[9] = local0 + local atkAfterFunc = REGIST_FUNC(ai, goal, WhiteKnight_Ax241002_ActAfter_AdjustSpace) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function WhiteKnight_Ax241002_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 75 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate <= 50 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + elseif fate2 <= 50 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + else + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3004_Dist_max +function WhiteKnight_Ax241002_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 75 + local AttID = 3004 + local AttDist = DIST_Middle + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3004, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function WhiteKnight_Ax241002_ActAfter_AdjustSpace(ai, goal, paramTbl) + local GW_fate = ai:GetRandam_Int(0, 100) + local bRight = ai:GetRandam_Int(0, 1) + local friendNum = ai:GetTeamRecordCount(COORDINATE_TYPE_SideWalk_L + bRight, TARGET_ENE_0, 2) + if GW_fate <= 30 and friendNum < 2 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 2, TARGET_ENE_0, true, 9910) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, bRight, ai:GetRandam_Int(30, 45), true, true, 9910) + elseif GW_fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 3, TARGET_ENE_0, true, 9910) + elseif GW_fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + else + local fate = ai:GetRandam_Int(1, 100) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + end + return +end + +function WhiteKnight_Ax241002Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function WhiteKnight_Ax241002Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3004_Dist_max +Att3000_Dist_min = Att3009_Dist_max +function WhiteKnight_Ax241002Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distResponse = 3 + local oddsResponse = 10 + local oddsStep = 30 + local bkStepPer = 60 + local leftStepPer = 20 + local rightStepPer = 20 + local safetyDist = 3.5 + local oddsLeaveAndSide = 50 + local oddsSideAndLeave = 25 + local timeSide = 4.5 + local distLeave = 2.5 + if Damaged_Step_or_Guard(ai, goal, distResponse, oddsResponse, oddsStep, bkStepPer, leftStepPer, rightStepPer, safetyDist, oddsLeaveAndSide, oddsSide, oddsSideAndLeave, timeSide, distLeave) then + return true + else + local distGuardBreak_Act = 2.5 + local oddsGuardBreak_Act = 70 + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distMissSwing_Int = 2.5 + local oddsMissSwing_Int = 35 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distUseItem_Act = 6.9 + local oddsUseItem_Act = 55 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if targetDist <= 5.2 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distResNear = 5.2 + local distResFar = 18 + local oddsResNear = 40 + local oddsResFar = 50 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + if fate <= 80 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3004_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + elseif ResBehavID == 2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3009_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + return true + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3009_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3009_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local oddsResponse = 35 + local bkStepPer = 60 + local leftStepPer = 20 + local rightStepPer = 20 + local safetyDist = 3.5 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distSuccessGuard_Act = 2.5 + local oddsSuccessGuard_Act = 70 + if SuccessGuard_Act(ai, goal, distSuccessGuard_Act, oddsSuccessGuard_Act) then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + return false + end + end + end + end + end + end + end +end + +return diff --git a/scripts_decompiled/241003_battle.lua b/scripts_decompiled/241003_battle.lua new file mode 100644 index 0000000..73902a8 --- /dev/null +++ b/scripts_decompiled/241003_battle.lua @@ -0,0 +1,297 @@ +REGISTER_GOAL(GOAL_WhiteKnight_Spear241003_Battle, "WhiteKnight_Spear241003Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 4.7 +local Att3003_Dist_min = 5 +local Att3003_Dist_max = 7.8 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 2.9 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 3.2 +local Att3007_Dist_min = 0 +local Att3007_Dist_max = 2.9 +local Att3008_Dist_min = 0 +local Att3008_Dist_max = 4.1 +local Att3009_Dist_min = 6 +local Att3009_Dist_max = 7.7 +REGISTER_GOAL_NO_UPDATE(GOAL_WhiteKnight_Spear241003_Battle, 1) +Att3000_Dist_min = Att3003_Dist_max +Att3000_Dist_min = Att3000_Dist_max +function WhiteKnight_Spear241003Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest() + ai:AddObserveArea(0, TARGET_ENE_0, TARGET_SELF, AI_DIR_TYPE_B, 80, 9) + if ai:IsTargetGuard(TARGET_ENE_0) == true then + if 8 <= targetDist then + actPerArr[4] = 20 + elseif 5.5 <= targetDist then + actPerArr[4] = 80 + else + actPerArr[4] = 150 + end + end + if 8 <= targetDist then + actPerArr[1] = 85 + actPerArr[2] = 5 + actPerArr[3] = 5 + actPerArr[9] = 5 + elseif 5.5 <= targetDist then + actPerArr[1] = 30 + actPerArr[2] = 35 + actPerArr[3] = 15 + actPerArr[9] = 20 + else + actPerArr[1] = 0 + actPerArr[2] = 40 + actPerArr[3] = 25 + actPerArr[9] = 35 + end + local local0 = {Att3003_Dist_max, 100, 3003, DIST_Middle} + defFuncParamTbl[1] = local0 + local0 = {} + local local1, local2, local3, local4 = nil + local0[1] = Att3000_Dist_max + local0[2] = 100 + local0[3] = 10 + local0[4] = 30 + local0[5] = local1 + local0[6] = local2 + local0[7] = local3 + local0[8] = local4 + defFuncParamTbl[2] = local0 + actFuncArr[3] = REGIST_FUNC(ai, goal, WhiteKnight_Spear241003_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, WhiteKnight_Spear241003_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, WhiteKnight_Spear241003_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, WhiteKnight_Spear241003_Act06) + actFuncArr[9] = REGIST_FUNC(ai, goal, WhiteKnight_Spear241003_Act09) + local atkAfterFunc = REGIST_FUNC(ai, goal, WhiteKnight_Spear241003_ActAfter_AdjustSpace) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3004_Dist_max +function WhiteKnight_Spear241003_Act03(ai, goal, paramTbl) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 90 + local AttID = 3004 + local AttDist = DIST_Middle + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3004, TARGET_ENE_0, DIST_Middle, -1, 60) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3007_Dist_max +function WhiteKnight_Spear241003_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 90 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_GuardBreakTunable, 10, 3007, TARGET_ENE_0, DIST_Middle, -1, 25) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3008_Dist_max +function WhiteKnight_Spear241003_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3008_Dist_max + local DashDist = Att3008_Dist_max + 2 + local Odds_Guard = 90 + local AttID = 3008 + local AttDist = DIST_Middle + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3008, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3009_Dist_max +function WhiteKnight_Spear241003_Act06(ai, goal, paramTbl) + local AppDist = Att3009_Dist_max + local DashDist = Att3009_Dist_max + 2 + local Odds_Guard = 90 + local AttID = 3009 + local AttDist = DIST_Middle + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_max +function WhiteKnight_Spear241003_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 90 + local AttID = 3006 + local AttDist = DIST_Middle + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, DIST_Middle, -1, 60) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3006, TARGET_ENE_0, DIST_Middle, -1, 60) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function WhiteKnight_Spear241003_ActAfter_AdjustSpace(ai, goal, paramTbl) + local GW_fate = ai:GetRandam_Int(0, 100) + local bRight = ai:GetRandam_Int(0, 1) + local friendNum = ai:GetTeamRecordCount(COORDINATE_TYPE_SideWalk_L + bRight, TARGET_ENE_0, 2) + if GW_fate <= 20 and friendNum < 2 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 2, TARGET_ENE_0, true, 9910) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, bRight, ai:GetRandam_Int(30, 45), true, true, 9910) + elseif GW_fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 3, TARGET_ENE_0, true, 9910) + elseif GW_fate <= 37 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + elseif GW_fate <= 45 then + local fate = ai:GetRandam_Int(1, 100) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + end + return +end + +function WhiteKnight_Spear241003Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function WhiteKnight_Spear241003Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3003_Dist_max +Att3000_Dist_min = Att3009_Dist_max +Att3000_Dist_min = Att3008_Dist_max +function WhiteKnight_Spear241003Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distResponse = 3 + local oddsResponse = 25 + local oddsStep = 30 + local bkStepPer = 60 + local leftStepPer = 20 + local rightStepPer = 20 + local safetyDist = 3.5 + local oddsLeaveAndSide = 50 + local oddsSideAndLeave = 25 + local timeSide = 4.5 + local distLeave = 2.5 + if Damaged_Step_or_Guard(ai, goal, distResponse, oddsResponse, oddsStep, bkStepPer, leftStepPer, rightStepPer, safetyDist, oddsLeaveAndSide, oddsSide, oddsSideAndLeave, timeSide, distLeave) then + return true + else + local distMissSwing_Int = 2.5 + local oddsMissSwing_Int = 35 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distUseItem_Act = 7.5 + local oddsUseItem_Act = 55 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if targetDist <= 5.8 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distResNear = 5.8 + local distResFar = 18 + local oddsResNear = 40 + local oddsResFar = 50 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + if fate <= 80 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3003_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + elseif ResBehavID == 2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3003_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + return true + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3003_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3003_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local oddsResponse = 40 + local bkStepPer = 50 + local leftStepPer = 25 + local rightStepPer = 25 + local safetyDist = 3.5 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distSuccessGuard_Act = 2.5 + local oddsSuccessGuard_Act = 70 + if SuccessGuard_Act(ai, goal, distSuccessGuard_Act, oddsSuccessGuard_Act) then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + return true + elseif ai:IsInsideObserve(0) and ai:IsFinishTimer(0) == true and targetDist <= 7.7 then + goal:ClearSubGoal() + ai:SetTimer(0, 18) + if 4.1 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3009_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3008_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3008, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + return false + end + end + end + end + end + end +end + +return diff --git a/scripts_decompiled/241004_battle.lua b/scripts_decompiled/241004_battle.lua new file mode 100644 index 0000000..3d6f5bd --- /dev/null +++ b/scripts_decompiled/241004_battle.lua @@ -0,0 +1,365 @@ +REGISTER_GOAL(GOAL_WhiteKnight_Bow241004_Battle, "WhiteKnight_Bow241004Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 3.1 +local Att3004_Dist_min = 3.5 +local Att3004_Dist_max = 5.6 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 2.2 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 3.1 +local Att3007_Dist_min = 0 +local Att3007_Dist_max = 2.9 +local Att3008_Dist_min = 0 +local Att3008_Dist_max = 3.1 +local Att3009_Dist_min = 5 +local Att3009_Dist_max = 6.5 +REGISTER_GOAL_NO_UPDATE(GOAL_WhiteKnight_Bow241004_Battle, 1) +Att3000_Dist_min = Att3005_Dist_max +function WhiteKnight_Bow241004Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest() + ai:AddObserveArea(0, TARGET_ENE_0, TARGET_SELF, AI_DIR_TYPE_B, 80, 8) + if ai:HasSpecialEffectId(TARGET_SELF, 5400) then + if 10 <= targetDist then + actPerArr[10] = 100 + else + if ai:IsTargetGuard(TARGET_ENE_0) == true then + if 7 <= targetDist then + actPerArr[4] = 20 + elseif 3.2 <= targetDist then + actPerArr[4] = 80 + else + actPerArr[4] = 150 + end + end + if 7 <= targetDist then + actPerArr[1] = 24 + actPerArr[2] = 3 + actPerArr[3] = 0 + actPerArr[5] = 3 + actPerArr[10] = 70 + elseif 5.5 <= targetDist then + actPerArr[1] = 55 + actPerArr[2] = 10 + actPerArr[3] = 10 + actPerArr[5] = 25 + elseif 3.2 <= targetDist then + actPerArr[1] = 15 + actPerArr[2] = 35 + actPerArr[3] = 20 + actPerArr[5] = 20 + else + actPerArr[1] = 0 + actPerArr[2] = 50 + actPerArr[3] = 25 + actPerArr[5] = 25 + end + end + elseif 15 <= targetDist then + actPerArr[8] = 100 + elseif 12 <= targetDist then + actPerArr[8] = 60 + actPerArr[9] = 40 + else + actPerArr[9] = 100 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, WhiteKnight_Bow241004_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, WhiteKnight_Bow241004_Act02) + local local0 = {Att3005_Dist_max, 0, 3005, DIST_Middle} + defFuncParamTbl[3] = local0 + actFuncArr[4] = REGIST_FUNC(ai, goal, WhiteKnight_Bow241004_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, WhiteKnight_Bow241004_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, WhiteKnight_Bow241004_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, WhiteKnight_Bow241004_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, WhiteKnight_Bow241004_Act08) + actFuncArr[9] = REGIST_FUNC(ai, goal, WhiteKnight_Bow241004_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, WhiteKnight_Bow241004_Act10) + local atkAfterFunc = REGIST_FUNC(ai, goal, WhiteKnight_Bow241004_ActAfter_AdjustSpace) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3004_Dist_max +function WhiteKnight_Bow241004_Act01(ai, goal, paramTbl) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 75 + local fate = ai:GetRandam_Int(1, 100) + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3004, TARGET_ENE_0, DIST_Middle, -1, 25) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3000_Dist_max +function WhiteKnight_Bow241004_Act02(ai, goal, paramTbl) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 75 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + local fate = ai:GetRandam_Int(1, 100) + if fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 25) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 25) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 25) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3007_Dist_max +function WhiteKnight_Bow241004_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 75 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_GuardBreakTunable, 10, 3007, TARGET_ENE_0, DIST_Middle, -1, 25) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_max +function WhiteKnight_Bow241004_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 75 + local AttID = 3006 + local AttDist = DIST_Middle + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3008_Dist_max +function WhiteKnight_Bow241004_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3008_Dist_max + local DashDist = Att3008_Dist_max + 2 + local Odds_Guard = 75 + local AttID = 3008 + local AttDist = DIST_Middle + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3008, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3009_Dist_max +function WhiteKnight_Bow241004_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3009_Dist_max + local DashDist = Att3009_Dist_max + 2 + local Odds_Guard = 75 + local AttID = 3009 + local AttDist = DIST_Middle + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function WhiteKnight_Bow241004_Act08(ai, goal, paramTbl) + local FirstAttID = 3000 + local ComAttID = 3001 + local ShootNum = ai:GetRandam_Int(1, 2) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.2, 0.5), 0, 0, 0, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function WhiteKnight_Bow241004_Act09(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3010, TARGET_SELF, DIST_Middle, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function WhiteKnight_Bow241004_Act10(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3011, TARGET_SELF, DIST_Middle, 0) + local FirstAttID = 3000 + local ComAttID = 3001 + local ShootNum = ai:GetRandam_Int(2, 5) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function WhiteKnight_Bow241004_ActAfter_AdjustSpace(ai, goal, paramTbl) + local GW_fate = ai:GetRandam_Int(0, 100) + local bRight = ai:GetRandam_Int(0, 1) + local friendNum = ai:GetTeamRecordCount(COORDINATE_TYPE_SideWalk_L + bRight, TARGET_ENE_0, 2) + if GW_fate <= 20 and friendNum < 2 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 2, TARGET_ENE_0, true, 9910) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, bRight, ai:GetRandam_Int(30, 45), true, true, 9910) + elseif GW_fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 3, TARGET_ENE_0, true, 9910) + elseif GW_fate <= 37 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + elseif GW_fate <= 45 then + local fate = ai:GetRandam_Int(1, 100) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + end + return +end + +function WhiteKnight_Bow241004Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function WhiteKnight_Bow241004Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3005_Dist_max +Att3000_Dist_min = Att3007_Dist_max +Att3000_Dist_min = Att3009_Dist_max +Att3000_Dist_min = Att3008_Dist_max +function WhiteKnight_Bow241004Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distResponse = 3 + local oddsResponse = 25 + local oddsStep = 30 + local bkStepPer = 60 + local leftStepPer = 20 + local rightStepPer = 20 + local safetyDist = 3.5 + local oddsLeaveAndSide = 50 + local oddsSideAndLeave = 25 + local timeSide = 4.5 + local distLeave = 2.5 + if Damaged_Step_or_Guard(ai, goal, distResponse, oddsResponse, oddsStep, bkStepPer, leftStepPer, rightStepPer, safetyDist, oddsLeaveAndSide, oddsSide, oddsSideAndLeave, timeSide, distLeave) then + return true + elseif ai:HasSpecialEffectId(TARGET_SELF, 5400) then + local distGuardBreak_Act = 2.7 + local oddsGuardBreak_Act = 70 + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distMissSwing_Int = 2.7 + local oddsMissSwing_Int = 30 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distUseItem_Act = 6.2 + local oddsUseItem_Act = 60 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if targetDist <= 4 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distResNear = 4 + local distResFar = 18 + local oddsResNear = 40 + local oddsResFar = 50 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + if fate <= 80 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3005_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + elseif ResBehavID == 2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3007_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + return true + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3007_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3007_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local oddsResponse = 35 + local bkStepPer = 60 + local leftStepPer = 20 + local rightStepPer = 20 + local safetyDist = 3.5 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distSuccessGuard_Act = 2.7 + local oddsSuccessGuard_Act = 70 + if SuccessGuard_Act(ai, goal, distSuccessGuard_Act, oddsSuccessGuard_Act) then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + return true + elseif ai:IsInsideObserve(0) and ai:IsFinishTimer(0) == true and targetDist <= 6.5 then + goal:ClearSubGoal() + ai:SetTimer(0, 18) + if 3.1 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3009_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3008_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3008, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + return false + end + end + end + end + end + end + else + return true + end +end + +return diff --git a/scripts_decompiled/243000_battle.lua b/scripts_decompiled/243000_battle.lua new file mode 100644 index 0000000..5c225cd --- /dev/null +++ b/scripts_decompiled/243000_battle.lua @@ -0,0 +1,68 @@ +REGISTER_GOAL(GOAL_MovingStatue243000_Battle, "MovingStatue243000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 2.5 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 2.2 +REGISTER_GOAL_NO_UPDATE(GOAL_MovingStatue243000_Battle, 1) +function MovingStatue243000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest() + if 8 <= targetDist then + actPerArr[1] = 100 + actPerArr[2] = 0 + elseif 2.5 <= targetDist then + actPerArr[1] = 60 + actPerArr[2] = 40 + else + actPerArr[1] = 30 + actPerArr[2] = 70 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, MovingStatue243000_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, MovingStatue243000_Act02) + local local0 = {0, 70, 0, 0, 30, 0} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function MovingStatue243000_Act01(ai, goal, paramTbl) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3000 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3001_Dist_max +function MovingStatue243000_Act02(ai, goal, paramTbl) + local AppDist = Att3001_Dist_max + local DashDist = Att3001_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3001 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function MovingStatue243000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function MovingStatue243000Battle_Terminate(ai, goal) + return +end + +function MovingStatue243000Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/250000_battle.lua b/scripts_decompiled/250000_battle.lua new file mode 100644 index 0000000..f2abe49 --- /dev/null +++ b/scripts_decompiled/250000_battle.lua @@ -0,0 +1,189 @@ +REGISTER_GOAL(GOAL_Husi250000_Battle, "Husi250000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 1.7 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 1.8 +local Att3004_Dist_min = 2.5 +local Att3004_Dist_max = 4 +local Att3005_Dist_min = 4 +local Att3005_Dist_max = 6 +local Att3006_Dist_min = 6 +local Att3006_Dist_max = 7.5 +local Att3008_Dist_min = 0 +local Att3008_Dist_max = 1 +REGISTER_GOAL_NO_UPDATE(GOAL_Husi250000_Battle, 1) +Att3000_Dist_min = Att3008_Dist_max +Att3000_Dist_min = Att3003_Dist_max +function Husi250000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest() + if eventNo == 10 then + actPerArr[8] = 100 + elseif 8 <= targetDist then + actPerArr[1] = 5 + actPerArr[2] = 5 + actPerArr[3] = 10 + actPerArr[7] = 80 + elseif 4 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 10 + actPerArr[3] = 10 + actPerArr[7] = 60 + elseif 2.5 <= targetDist then + actPerArr[1] = 30 + actPerArr[2] = 30 + actPerArr[3] = 20 + actPerArr[7] = 20 + else + actPerArr[1] = 35 + actPerArr[2] = 35 + actPerArr[3] = 30 + actPerArr[7] = 0 + end + local local0 = {Att3008_Dist_max, 0, 3008, DIST_Middle} + defFuncParamTbl[1] = local0 + actFuncArr[2] = REGIST_FUNC(ai, goal, Husi250000_Act02) + local0 = {Att3003_Dist_max, 0, 3003, DIST_Middle} + defFuncParamTbl[3] = local0 + actFuncArr[7] = REGIST_FUNC(ai, goal, Husi250000_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, Husi250000_Act08) + local0 = {0, 60, 10, 10, 20, 0} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function Husi250000_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_min +Att3000_Dist_min = Att3006_Dist_max +Att3000_Dist_min = Att3005_Dist_min +Att3000_Dist_min = Att3005_Dist_max +Att3000_Dist_min = Att3004_Dist_max +function Husi250000_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if Att3006_Dist_min <= targetDist and fate <= 20 then + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + end + elseif Att3005_Dist_min <= targetDist and fate2 <= 50 then + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + end + else + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + end + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Husi250000_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 1), 0, 0, 0, 0) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 30, POINT_INITIAL, 2, TARGET_SELF, false, -1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Husi250000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Husi250000Battle_Terminate(ai, goal) + return +end + +function Husi250000Battle_Interupt(ai, goal) + if ai:IsLadderAct(TARGET_SELF) then + return false + else + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distDamagedStep = 3 + local oddsDamagedStep = 15 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + local safetyDist = 4 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distMissSwing_Attack = 1.7 + local oddsMissSwing_Attack = 10 + local AttID = 3000 + if MissSwing_Attack(ai, goal, distMissSwing_Attack, oddsMissSwing_Attack, AttID) then + return true + else + local oddsResponse = 10 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + local safetyDist = 4 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end + end + end + end +end + +return diff --git a/scripts_decompiled/250001_battle.lua b/scripts_decompiled/250001_battle.lua new file mode 100644 index 0000000..1ca3bea --- /dev/null +++ b/scripts_decompiled/250001_battle.lua @@ -0,0 +1,149 @@ +REGISTER_GOAL(GOAL_Husi_Torch250001_Battle, "Husi_Torch250001Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 2 +local Att3002_Dist_min = 2 +local Att3002_Dist_max = 6 +local Att3003_Dist_min = 2.9 +local Att3003_Dist_max = 3.9 +local Att3004_Dist_min = 4.6 +local Att3004_Dist_max = 6.1 +local Att3005_Dist_min = 6.7 +local Att3005_Dist_max = 8.2 +local Att3006_Dist_min = 1.35 +local Att3006_Dist_max = 1.6 +REGISTER_GOAL_NO_UPDATE(GOAL_Husi_Torch250001_Battle, 1) +Att3000_Dist_min = Att3006_Dist_max +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3002_Dist_max +function Husi_Torch250001Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if 9 <= targetDist then + actPerArr[1] = 15 + actPerArr[2] = 0 + actPerArr[3] = 25 + actPerArr[7] = 60 + elseif 6 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 5 + actPerArr[3] = 40 + actPerArr[7] = 35 + elseif 3.5 <= targetDist then + actPerArr[1] = 10 + actPerArr[2] = 40 + actPerArr[3] = 25 + actPerArr[7] = 25 + else + actPerArr[1] = 30 + actPerArr[2] = 70 + actPerArr[3] = 0 + actPerArr[7] = 0 + end + local local0 = {Att3006_Dist_max, 0, 3006, DIST_Far, 0} + defFuncParamTbl[1] = local0 + local0 = {} + local local1, local2, local3, local4 = nil + local0[1] = Att3000_Dist_max + local0[2] = 0 + local0[3] = 30 + local0[4] = 70 + local0[5] = local1 + local0[6] = local2 + local0[7] = local3 + local0[8] = local4 + defFuncParamTbl[2] = local0 + local0 = {Att3002_Dist_max, 0, 3002, DIST_Middle} + defFuncParamTbl[3] = local0 + actFuncArr[7] = REGIST_FUNC(ai, goal, Husi_Torch250001_Act07) + local0 = {0, 50, 10, 15, 25, 0} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3005_Dist_min +Att3000_Dist_min = Att3005_Dist_max +Att3000_Dist_min = Att3004_Dist_min +Att3000_Dist_min = Att3004_Dist_max +Att3000_Dist_min = Att3003_Dist_max +function Husi_Torch250001_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if Att3005_Dist_min <= targetDist and fate <= 20 then + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3005 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + elseif Att3004_Dist_min <= targetDist and fate2 <= 50 then + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3004 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + else + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3003 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Husi_Torch250001Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Husi_Torch250001Battle_Terminate(ai, goal) + return +end + +function Husi_Torch250001Battle_Interupt(ai, goal) + if ai:IsLadderAct(TARGET_SELF) then + return false + else + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distDamagedStep = 3 + local oddsDamagedStep = 15 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + local safetyDist = 4 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distMissSwing_Attack = 2 + local oddsMissSwing_Attack = 10 + local AttID = 3000 + if MissSwing_Attack(ai, goal, distMissSwing_Attack, oddsMissSwing_Attack, AttID) then + return true + else + local oddsResponse = 10 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + local safetyDist = 4 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end + end + end + end +end + +return diff --git a/scripts_decompiled/250004_battle.lua b/scripts_decompiled/250004_battle.lua new file mode 100644 index 0000000..07151d3 --- /dev/null +++ b/scripts_decompiled/250004_battle.lua @@ -0,0 +1,84 @@ +REGISTER_GOAL(GOAL_Husi250004_Battle, "Husi250004Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 1.7 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 1.8 +local Att3004_Dist_min = 2.5 +local Att3004_Dist_max = 4 +local Att3005_Dist_min = 4 +local Att3005_Dist_max = 6 +local Att3006_Dist_min = 6 +local Att3006_Dist_max = 7.5 +local Att3008_Dist_min = 0 +local Att3008_Dist_max = 1 +REGISTER_GOAL_NO_UPDATE(GOAL_Husi250004_Battle, 1) +function Husi250004Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if 8 <= targetDist then + actPerArr[1] = 100 + elseif 4 <= targetDist then + actPerArr[1] = 80 + actPerArr[2] = 20 + elseif 2.5 <= targetDist then + actPerArr[1] = 60 + actPerArr[2] = 30 + actPerArr[3] = 10 + else + actPerArr[1] = 20 + actPerArr[2] = 10 + actPerArr[3] = 70 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Husi250004_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Husi250004_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, Husi250004_Act03) + local local0 = {0, 60, 10, 10, 20, 0} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +function Husi250004_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(1, 3), TARGET_ENE_0, 0, 0, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Husi250004_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(1, 3), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, -1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Husi250004_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Float(1, 3), TARGET_ENE_0, 5, TARGET_ENE_0, true, -1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Husi250004Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Husi250004Battle_Terminate(ai, goal) + return +end + +function Husi250004Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + return false +end + +return diff --git a/scripts_decompiled/250005_battle.lua b/scripts_decompiled/250005_battle.lua new file mode 100644 index 0000000..3f0bc5a --- /dev/null +++ b/scripts_decompiled/250005_battle.lua @@ -0,0 +1,120 @@ +REGISTER_GOAL(GOAL_Husi_Bow250005_Battle, "Husi_Bow250005Battle") +REGISTER_GOAL_NO_UPDATE(GOAL_Husi_Bow250005_Battle, 1) +function Husi_Bow250005Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest() + local myThinkId = ai:GetNpcThinkParamID() + local RunawayArea = 0 + if myThinkId == 250021 then + ai:AddObserveRegion(0, TARGET_ENE_0, 1812101) + end + if 15 <= targetDist then + actPerArr[1] = 100 + actPerArr[2] = 0 + actPerArr[3] = 0 + elseif 8 <= targetDist then + actPerArr[1] = 80 + actPerArr[2] = 20 + actPerArr[3] = 0 + elseif 4 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 60 + actPerArr[3] = 20 + else + actPerArr[1] = 0 + actPerArr[2] = 40 + actPerArr[3] = 60 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Husi_Bow250005_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Husi_Bow250005_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, Husi_Bow250005_Act03) + local local0 = {0, 0, 0, 0, 0, 0} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +function Husi_Bow250005_Act02(ai, goal, paramTbl) + local FirstAttID = 3000 + local ComAttID = 3001 + local ShootNum = ai:GetRandam_Int(2, 4) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2, TARGET_ENE_0, 20, TARGET_ENE_0, true, -1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Husi_Bow250005_Act01(ai, goal, paramTbl) + local FirstAttID = 3000 + local ComAttID = 3001 + local ShootNum = ai:GetRandam_Int(1, 2) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 1.5), TARGET_ENE_0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Husi_Bow250005_Act02(ai, goal, paramTbl) + local FirstAttID = 3000 + local ComAttID = 3001 + local ShootNum = ai:GetRandam_Int(1, 2) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 1.5), TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2, TARGET_ENE_0, 20, TARGET_ENE_0, true, -1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Husi_Bow250005_Act03(ai, goal, paramTbl) + local FirstAttID = 3000 + local ComAttID = 3001 + local ShootNum = ai:GetRandam_Int(1, 1) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 1.5), TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 20, TARGET_SELF, false, -1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Husi_Bow250005Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Husi_Bow250005Battle_Terminate(ai, goal) + return +end + +function Husi_Bow250005Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local ThinkID = ai:GetNpcThinkParamID() + if ai:IsInterupt(INTERUPT_Inside_ObserveArea) and ThinkID == 250021 then + local playerRegion = 1812101 + local newhome = 1812102 + if ai:IsInsideTargetRegion(TARGET_ENE_0, playerRegion) then + goal:ClearSubGoal() + ai:SetEventMoveTarget(newhome) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 30, POINT_EVENT, 1, TARGET_SELF, false, -1) + return true + end + end + local distDamagedStep = 3 + local oddsDamagedStep = 15 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + local safetyDist = 4 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/251000_battle.lua b/scripts_decompiled/251000_battle.lua new file mode 100644 index 0000000..ad16785 --- /dev/null +++ b/scripts_decompiled/251000_battle.lua @@ -0,0 +1,111 @@ +REGISTER_GOAL(GOAL_HusibitoKojiki251000_Battle, "HusibitoKojiki251000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 2.3 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 2.3 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 2.6 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 2.2 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 3.8 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 0 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 0 +REGISTER_GOAL_NO_UPDATE(GOAL_HusibitoKojiki251000_Battle, 1) +Att3000_Dist_min = Att3002_Dist_max +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3003_Dist_max +Att3000_Dist_min = Att3004_Dist_max +function HusibitoKojiki251000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest() + if 3.8 <= targetDist then + actPerArr[1] = 5 + actPerArr[2] = 5 + actPerArr[3] = 10 + actPerArr[7] = 80 + else + actPerArr[1] = 30 + actPerArr[2] = 40 + actPerArr[3] = 30 + actPerArr[7] = 0 + end + local local0 = {Att3002_Dist_max, 0, 3002, DIST_Middle} + defFuncParamTbl[1] = local0 + local0 = {} + local local1, local2, local3, local4 = nil + local0[1] = Att3000_Dist_max + local0[2] = 0 + local0[3] = 30 + local0[4] = 70 + local0[5] = local1 + local0[6] = local2 + local0[7] = local3 + local0[8] = local4 + defFuncParamTbl[2] = local0 + local0 = {Att3003_Dist_max, 0, 3003, DIST_Middle} + defFuncParamTbl[3] = local0 + local0 = {Att3004_Dist_max, 0, 3004, DIST_Middle} + defFuncParamTbl[7] = local0 + local0 = {0, 45, 20, 20, 0, 8, 7} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace_IncludeSidestep, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +function HusibitoKojiki251000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function HusibitoKojiki251000Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3004_Dist_max +function HusibitoKojiki251000Battle_Interupt(ai, goal) + if ai:IsLadderAct(TARGET_SELF) then + return false + else + local distDamagedStep = 3 + local oddsDamagedStep = 15 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + local safetyDist = 4 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distMissSwing_Int = 5.8 + local oddsMissSwing_Int = 30 + local targetDist = ai:GetDist(TARGET_ENE_0) + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if 2.4 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3004_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local oddsResponse = 20 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + local safetyDist = 4 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end + end + end + end +end + +return diff --git a/scripts_decompiled/251000_logic.lua b/scripts_decompiled/251000_logic.lua new file mode 100644 index 0000000..92282d3 --- /dev/null +++ b/scripts_decompiled/251000_logic.lua @@ -0,0 +1,16 @@ +REGISTER_LOGIC_FUNC(LOGIC_ID_HusibitoKojiki251000, "HusibitoKojiki251000_Logic", "HusibitoKojiki251000_Interupt") +function HusibitoKojiki251000_Logic(ai) + local eventNo = ai:GetEventRequest(0) + if eventNo == 1 then + ai:AddTopGoal(GOAL_COMMON_ApproachTarget, 10, POINT_INITIAL, 0, TARGET_SELF, false, -1) + else + COMMON_EasySetup3(ai) + end + return +end + +function HusibitoKojiki251000_Interupt(ai, goal) + return +end + +return diff --git a/scripts_decompiled/252000_battle.lua b/scripts_decompiled/252000_battle.lua new file mode 100644 index 0000000..b5eef5e --- /dev/null +++ b/scripts_decompiled/252000_battle.lua @@ -0,0 +1,316 @@ +REGISTER_GOAL(GOAL_Husi_robber252000_Battle, "Husi_robber252000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 1.5 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 1.5 +local Att3005_Dist_min = 3 +local Att3005_Dist_max = 3.9 +local Att3006_Dist_min = 5 +local Att3006_Dist_max = 15 +REGISTER_GOAL_NO_UPDATE(GOAL_Husi_robber252000_Battle, 1) +function OnIf_252000(ai, goal, codeNo) + if ai:HasSpecialEffectId(TARGET_SELF, 3151) then + ai:SetTimer(0, 120) + else + ai:SetTimer(0, 30) + end + return +end + +Att3000_Dist_min = Att3003_Dist_max +function Husi_robber252000Battle_Activate(ai, goal) + local ObserveNo = 0 + local BackstabDist = 5 + local BackstabAng = 30 + ObserveAreaForBackstab(ai, goal, ObserveNo, BackstabDist, BackstabAng) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local hprate = ai:GetHpRate(TARGET_SELF) + if ai:IsLadderAct(TARGET_SELF) then + actPerArr[3] = 100 + elseif hprate <= 0.4 and ai:IsFinishTimer(0) == true then + if 4.5 <= targetDist then + actPerArr[7] = 300 + elseif 3 <= targetDist then + actPerArr[7] = 100 + else + actPerArr[7] = 50 + end + end + if ai:IsLadderAct(TARGET_SELF) then + actPerArr[3] = 100 + elseif 8 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 5 + actPerArr[3] = 5 + actPerArr[5] = 65 + actPerArr[8] = 0 + actPerArr[9] = 5 + elseif 5 <= targetDist then + actPerArr[1] = 50 + actPerArr[2] = 10 + actPerArr[3] = 10 + actPerArr[5] = 20 + actPerArr[8] = 0 + actPerArr[9] = 10 + elseif 3 <= targetDist then + actPerArr[1] = 50 + actPerArr[2] = 20 + actPerArr[3] = 10 + actPerArr[5] = 0 + actPerArr[8] = 0 + actPerArr[9] = 20 + else + actPerArr[1] = 0 + actPerArr[2] = 40 + actPerArr[3] = 0 + actPerArr[5] = 0 + actPerArr[8] = 30 + actPerArr[9] = 30 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Husi_robber252000_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Husi_robber252000_Act02) + local local0 = {Att3003_Dist_max, 0, 3003, DIST_Middle} + defFuncParamTbl[3] = local0 + actFuncArr[5] = REGIST_FUNC(ai, goal, Husi_robber252000_Act05) + actFuncArr[7] = REGIST_FUNC(ai, goal, Husi_robber252000_Act07) + actFuncArr[9] = REGIST_FUNC(ai, goal, Husi_robber252000_Act09) + local0 = {0, 60, 10, 10, 20, 0} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3005_Dist_max +function Husi_robber252000_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 100 + local AttID = 3005 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + if fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + GetWellSpace_Odds = 0 + else + GetWellSpace_Odds = 100 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3000_Dist_max +function Husi_robber252000_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 100 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 50 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_min +Att3000_Dist_min = Att3006_Dist_max +function Husi_robber252000_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local LeaveDist = Att3006_Dist_min + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 100 + Approach_or_Leave_Act(ai, goal, LeaveDist, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3006, TARGET_ENE_0, DIST_None) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Husi_robber252000_Act07(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 4.5, TARGET_ENE_0, true, 9910) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3200, TARGET_ENE_0, DIST_None) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, -1, AI_DIR_TYPE_B, 3) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3200, TARGET_ENE_0, DIST_None) + end + goal:AddSubGoal(GOAL_COMMON_If, 15, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3003_Dist_max +function Husi_robber252000_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 100 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 80 + return GetWellSpace_Odds +end + +function Husi_robber252000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Husi_robber252000Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3003_Dist_max +function Husi_robber252000Battle_Interupt(ai, goal) + if ai:IsLadderAct(TARGET_SELF) then + return false + else + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local superStepDist = 3 + local superStepPer = 25 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer) then + return true + else + local distDamagedStep = 3 + local oddsDamagedStep = 35 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 4 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distGuardBreak_Act = 3.9 + local oddsGuardBreak_Act = 70 + local fate = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distMissSwing_Int = 3.9 + local oddsMissSwing_Int = 50 + local targetDist = ai:GetDist(TARGET_ENE_0) + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3003_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distUseItem_Act = 3.9 + local oddsUseItem_Act = 30 + local targetDist = ai:GetDist(TARGET_ENE_0) + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3003_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local oddsResponse = 35 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 4 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distResNear = 5 + local distResFar = 18 + local oddsResNear = 0 + local oddsResFar = 50 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + return true + elseif ResBehavID == 2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + return true + elseif fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + else + local distSuccessGuard_Act = 3 + local oddsSuccessGuard_Act = 60 + if SuccessGuard_Act(ai, goal, distSuccessGuard_Act, oddsSuccessGuard_Act) then + if targetDist <= 1.5 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local ParryDist = 3 + local ParryAng = 60 + local ParryThrowDist = 4 + local ParryThrowAng = 60 + if Parry_Act(ai, goal, ParryDist, ParryAng, ParryThrowDist, ParryThrowAng) then + return true + else + local ObserveNo = 0 + local ApproachDist = 1 + local TimerIndex = 0 + local Time = 20 + if Backstab_Act(ai, goal, ObserveNo, ApproachDist, TimerIndex, Time) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + return true + else + return false + end + end + end + end + end + end + end + end + end + end + end +end + +return diff --git a/scripts_decompiled/253000_battle.lua b/scripts_decompiled/253000_battle.lua new file mode 100644 index 0000000..2f42671 --- /dev/null +++ b/scripts_decompiled/253000_battle.lua @@ -0,0 +1,162 @@ +REGISTER_GOAL(GOAL_HusiMino_Kon253000_Battle, "HusiMino_Kon253000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 1.5 +local Att3003_Dist_min = 2.5 +local Att3003_Dist_max = 3.5 +local Att3004_Dist_min = 3.5 +local Att3004_Dist_max = 6 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 1.2 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 1 +local Att3007_Dist_min = 4 +local Att3007_Dist_max = 6 +REGISTER_GOAL_NO_UPDATE(GOAL_HusiMino_Kon253000_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3005_Dist_max +function HusiMino_Kon253000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if 8 <= targetDist then + actPerArr[7] = 60 + actPerArr[2] = 10 + actPerArr[3] = 0 + actPerArr[4] = 30 + elseif 5 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[7] = 30 + actPerArr[2] = 10 + actPerArr[3] = 10 + actPerArr[4] = 50 + else + actPerArr[7] = 50 + actPerArr[2] = 20 + actPerArr[3] = 20 + actPerArr[4] = 10 + end + elseif 2.5 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[7] = 10 + actPerArr[2] = 20 + actPerArr[3] = 20 + actPerArr[4] = 50 + else + actPerArr[7] = 30 + actPerArr[2] = 40 + actPerArr[3] = 20 + actPerArr[4] = 10 + end + elseif ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[7] = 0 + actPerArr[2] = 25 + actPerArr[3] = 25 + actPerArr[4] = 50 + else + actPerArr[7] = 0 + actPerArr[2] = 60 + actPerArr[3] = 30 + actPerArr[4] = 10 + end + local local0 = {} + local local1, local2, local3, local4 = nil + local0[1] = Att3000_Dist_max + local0[2] = 0 + local0[3] = 10 + local0[4] = 40 + local0[5] = local1 + local0[6] = local2 + local0[7] = local3 + local0[8] = local4 + defFuncParamTbl[2] = local0 + local0 = {Att3005_Dist_max, 0, 3005, DIST_Middle, nil} + defFuncParamTbl[3] = local0 + actFuncArr[4] = REGIST_FUNC(ai, goal, HusiMino_Kon253000_Act04) + actFuncArr[7] = REGIST_FUNC(ai, goal, HusiMino_Kon253000_Act07) + local0 = {0, 50, 0, 10, 10, 15, 15} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace_IncludeSidestep, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3007_Dist_min +Att3000_Dist_min = Att3007_Dist_max +Att3000_Dist_min = Att3006_Dist_max +function HusiMino_Kon253000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if Att3007_Dist_min <= targetDist then + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3007 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + else + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3006 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3004_Dist_min +Att3000_Dist_min = Att3004_Dist_max +Att3000_Dist_min = Att3003_Dist_max +function HusiMino_Kon253000_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if Att3004_Dist_min <= targetDist and fate <= 40 then + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3004 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + else + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3003 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function HusiMino_Kon253000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function HusiMino_Kon253000Battle_Terminate(ai, goal) + return +end + +function HusiMino_Kon253000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distDamagedStep = 3 + local oddsDamagedStep = 15 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + local safetyDist = 4 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/253001_battle.lua b/scripts_decompiled/253001_battle.lua new file mode 100644 index 0000000..4983f22 --- /dev/null +++ b/scripts_decompiled/253001_battle.lua @@ -0,0 +1,162 @@ +REGISTER_GOAL(GOAL_HusiMino_Poison253001_Battle, "HusiMino_Poison253001Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 1.5 +local Att3003_Dist_min = 2.5 +local Att3003_Dist_max = 3.5 +local Att3004_Dist_min = 3.5 +local Att3004_Dist_max = 6 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 1.5 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 1 +local Att3007_Dist_min = 4 +local Att3007_Dist_max = 6 +REGISTER_GOAL_NO_UPDATE(GOAL_HusiMino_Poison253001_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3005_Dist_max +function HusiMino_Poison253001Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if 8 <= targetDist then + actPerArr[7] = 60 + actPerArr[2] = 10 + actPerArr[3] = 0 + actPerArr[4] = 30 + elseif 5 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[7] = 30 + actPerArr[2] = 10 + actPerArr[3] = 10 + actPerArr[4] = 50 + else + actPerArr[7] = 50 + actPerArr[2] = 20 + actPerArr[3] = 20 + actPerArr[4] = 10 + end + elseif 2.5 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[7] = 10 + actPerArr[2] = 20 + actPerArr[3] = 20 + actPerArr[4] = 50 + else + actPerArr[7] = 30 + actPerArr[2] = 40 + actPerArr[3] = 20 + actPerArr[4] = 10 + end + elseif ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[7] = 0 + actPerArr[2] = 25 + actPerArr[3] = 25 + actPerArr[4] = 50 + else + actPerArr[7] = 0 + actPerArr[2] = 60 + actPerArr[3] = 30 + actPerArr[4] = 10 + end + local local0 = {} + local local1, local2, local3, local4 = nil + local0[1] = Att3000_Dist_max + local0[2] = 0 + local0[3] = 10 + local0[4] = 40 + local0[5] = local1 + local0[6] = local2 + local0[7] = local3 + local0[8] = local4 + defFuncParamTbl[2] = local0 + local0 = {Att3005_Dist_max, 0, 3005, DIST_Middle, nil} + defFuncParamTbl[3] = local0 + actFuncArr[4] = REGIST_FUNC(ai, goal, HusiMino_Poison253001_Act04) + actFuncArr[7] = REGIST_FUNC(ai, goal, HusiMino_Poison253001_Act07) + local0 = {0, 50, 0, 10, 10, 15, 15} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace_IncludeSidestep, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3007_Dist_min +Att3000_Dist_min = Att3007_Dist_max +Att3000_Dist_min = Att3006_Dist_max +function HusiMino_Poison253001_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if Att3007_Dist_min <= targetDist then + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3007 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + else + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3006 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3004_Dist_min +Att3000_Dist_min = Att3004_Dist_max +Att3000_Dist_min = Att3003_Dist_max +function HusiMino_Poison253001_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if Att3004_Dist_min <= targetDist and fate <= 40 then + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3004 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + else + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3003 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function HusiMino_Poison253001Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function HusiMino_Poison253001Battle_Terminate(ai, goal) + return +end + +function HusiMino_Poison253001Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distDamagedStep = 3 + local oddsDamagedStep = 15 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + local safetyDist = 4 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/253002_battle.lua b/scripts_decompiled/253002_battle.lua new file mode 100644 index 0000000..8209898 --- /dev/null +++ b/scripts_decompiled/253002_battle.lua @@ -0,0 +1,131 @@ +REGISTER_GOAL(GOAL_HusiMino_Gun253002_Battle, "HusiMino_Gun253002Battle") +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 1 +local Att3007_Dist_min = 4 +local Att3007_Dist_max = 6 +REGISTER_GOAL_NO_UPDATE(GOAL_HusiMino_Gun253002_Battle, 1) +Att3006_Dist_min = Att3006_Dist_max +function HusiMino_Gun253002Battle_Activate(ai, goal) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local GetWellSpace_Odds = 0 + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + if 20 <= targetDist then + Act01Per = 100 + Act02Per = 0 + Act03Per = 0 + Act04Per = 0 + elseif 10 <= targetDist then + Act01Per = 70 + Act02Per = 30 + Act03Per = 0 + Act04Per = 0 + elseif 5 <= targetDist then + Act01Per = 0 + Act02Per = 60 + Act03Per = 40 + Act04Per = 0 + elseif 1 <= targetDist then + Act01Per = 0 + Act02Per = 20 + Act03Per = 80 + Act04Per = 0 + else + Act01Per = 0 + Act02Per = 0 + Act03Per = 20 + Act04Per = 80 + end + local doAdmirer = ai:GetExcelParam(AI_EXCEL_THINK_PARAM_TYPE__thinkAttr_doAdmirer) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local Odds_Guard = 0 + if doAdmirer == 1 and role == ROLE_TYPE_Torimaki then + Torimaki_Act(ai, goal, Odds_Guard) + elseif doAdmirer == 1 and role == ROLE_TYPE_Kankyaku then + Kankyaku_Act(ai, goal, Odds_Guard) + else + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per) + if fateAct <= Act01Per then + if fate <= 50 then + local FirstAttID = 3000 + local ComAttID = 3001 + local ShootNum = ai:GetRandam_Int(2, 5) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + else + local FirstAttID = 3002 + local ComAttID = 3003 + local ShootNum = ai:GetRandam_Int(2, 5) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + end + elseif fateAct <= Act01Per + Act02Per then + if fate <= 50 then + local FirstAttID = 3000 + local ComAttID = 3001 + local ShootNum = ai:GetRandam_Int(2, 5) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + else + local FirstAttID = 3002 + local ComAttID = 3003 + local ShootNum = ai:GetRandam_Int(2, 5) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + end + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2, TARGET_ENE_0, 20, TARGET_ENE_0, true, -1) + elseif fateAct <= Act01Per + Act02Per + Act03Per then + if fate <= 50 then + local FirstAttID = 3000 + local ComAttID = 3001 + local ShootNum = ai:GetRandam_Int(1, 3) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + else + local FirstAttID = 3002 + local ComAttID = 3003 + local ShootNum = ai:GetRandam_Int(1, 3) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + end + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 20, TARGET_SELF, false, -1) + else + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3006 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 20, TARGET_SELF, false, -1) + end + end + return +end + +function HusiMino_Gun253002Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function HusiMino_Gun253002Battle_Terminate(ai, goal) + return +end + +function HusiMino_Gun253002Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distDamagedStep = 3 + local oddsDamagedStep = 15 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + local safetyDist = 4 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/254000_battle.lua b/scripts_decompiled/254000_battle.lua new file mode 100644 index 0000000..7360180 --- /dev/null +++ b/scripts_decompiled/254000_battle.lua @@ -0,0 +1,257 @@ +REGISTER_GOAL(GOAL_HusiFight_Sword254000_Battle, "HusiFight_Sword254000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 1.6 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 2.2 +local Att3005_Dist_min = 2.9 +local Att3005_Dist_max = 4.2 +local Att3006_Dist_min = 5.7 +local Att3006_Dist_max = 6.8 +local Att3007_Dist_min = 8.4 +local Att3007_Dist_max = 10 +local Att3008_Dist_min = 2 +local Att3008_Dist_max = 5.7 +local Att3010_Dist_min = 1.1 +local Att3010_Dist_max = 2 +REGISTER_GOAL_NO_UPDATE(GOAL_HusiFight_Sword254000_Battle, 1) +Att3000_Dist_min = Att3010_Dist_max +Att3000_Dist_min = Att3000_Dist_max +function HusiFight_Sword254000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest(3) + if eventNo == 1 then + actPerArr[8] = 100 + elseif 8 <= targetDist then + actPerArr[1] = 5 + actPerArr[2] = 35 + actPerArr[3] = 20 + actPerArr[5] = 0 + actPerArr[7] = 40 + elseif 4 <= targetDist then + actPerArr[1] = 10 + actPerArr[2] = 50 + actPerArr[3] = 25 + actPerArr[5] = 0 + actPerArr[7] = 15 + elseif 2.5 <= targetDist then + actPerArr[1] = 30 + actPerArr[2] = 50 + actPerArr[3] = 15 + actPerArr[5] = 0 + actPerArr[7] = 5 + else + actPerArr[1] = 20 + actPerArr[2] = 50 + actPerArr[3] = 30 + actPerArr[5] = 0 + actPerArr[7] = 0 + end + local local0 = {Att3010_Dist_max, 0, 3010, DIST_Middle} + defFuncParamTbl[1] = local0 + local0 = {} + local local1, local2, local3 = nil + local0[1] = Att3000_Dist_max + local0[2] = 50 + local0[3] = 5 + local0[4] = 15 + local0[5] = local1 + local0[6] = local2 + local0[7] = local3 + local0[8] = 80 + defFuncParamTbl[2] = local0 + actFuncArr[3] = REGIST_FUNC(ai, goal, HusiFight_Sword254000_Act03) + actFuncArr[5] = REGIST_FUNC(ai, goal, HusiFight_Sword254000_Act05) + actFuncArr[7] = REGIST_FUNC(ai, goal, HusiFight_Sword254000_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, HusiFight_Sword254000_Act08) + local0 = {100, 75, 9, 8, 0, 4, 4} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace_IncludeSidestep, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3003_Dist_max +function HusiFight_Sword254000_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 50 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 55 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3008_Dist_min +Att3000_Dist_min = Att3008_Dist_max +function HusiFight_Sword254000_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local LeaveDist = Att3008_Dist_min + local AppDist = Att3008_Dist_max + local DashDist = Att3008_Dist_max + 2 + local Odds_Guard = 100 + Approach_or_Leave_Act(ai, goal, LeaveDist, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3008, TARGET_ENE_0, DIST_None) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3007_Dist_min +Att3000_Dist_min = Att3007_Dist_max +Att3000_Dist_min = Att3006_Dist_min +Att3000_Dist_min = Att3006_Dist_max +Att3000_Dist_min = Att3005_Dist_max +function HusiFight_Sword254000_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if Att3007_Dist_min <= targetDist and fate <= 20 then + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 40 + local AttID = 3007 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + elseif Att3006_Dist_min <= targetDist and fate2 <= 50 then + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 40 + local AttID = 3006 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + else + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 40 + local AttID = 3005 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function HusiFight_Sword254000_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_ENE_0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function HusiFight_Sword254000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function HusiFight_Sword254000Battle_Terminate(ai, goal) + return +end + +function HusiFight_Sword254000Battle_Interupt(ai, goal) + if ai:IsLadderAct(TARGET_SELF) then + return false + else + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distResponse = 3 + local oddsResponse = 15 + local oddsStep = 30 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 3.5 + local oddsLeaveAndSide = 50 + local timeSide = 3.5 + local distLeave = 2.5 + if FindAttack_Step_or_Guard(ai, goal, distResponse, oddsResponse, oddsStep, bkStepPer, leftStepPer, rightStepPer, safetyDist, oddsLeaveAndSide, timeSide, distLeave) then + return true + else + local distResponse = 3 + local oddsResponse = 15 + local oddsStep = 30 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 3.5 + local oddsLeaveAndSide = 50 + local timeSide = 3.5 + local distLeave = 2.5 + if Damaged_Step_or_Guard(ai, goal, distResponse, oddsResponse, oddsStep, bkStepPer, leftStepPer, rightStepPer, safetyDist, oddsLeaveAndSide, timeSide, distLeave) then + return true + else + local distMissSwing_Int = 4.2 + local oddsMissSwing_Int = 50 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if targetDist <= 2.2 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_None, 0) + end + return true + else + local distResNear = 5.7 + local distResFar = 15 + local oddsResNear = 0 + local oddsResFar = 30 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + return true + elseif ResBehavID == 2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + return true + elseif fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + else + local oddsResponse = 20 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 3.5 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distSuccessGuard_Act = 4.2 + local oddsSuccessGuard_Act = 30 + if SuccessGuard_Act(ai, goal, distSuccessGuard_Act, oddsSuccessGuard_Act) then + if targetDist <= 2.2 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_None, 0) + end + return true + else + return false + end + end + end + end + end + end + end +end + +return diff --git a/scripts_decompiled/254001_battle.lua b/scripts_decompiled/254001_battle.lua new file mode 100644 index 0000000..cf2eaf8 --- /dev/null +++ b/scripts_decompiled/254001_battle.lua @@ -0,0 +1,249 @@ +REGISTER_GOAL(GOAL_HusiFight_Ax254001_Battle, "HusiFight_Ax254001Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 1.6 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 1.8 +local Att3005_Dist_min = 2.5 +local Att3005_Dist_max = 3.5 +local Att3006_Dist_min = 3.5 +local Att3006_Dist_max = 5.2 +local Att3007_Dist_min = 5 +local Att3007_Dist_max = 7 +local Att3008_Dist_min = 2 +local Att3008_Dist_max = 5.7 +REGISTER_GOAL_NO_UPDATE(GOAL_HusiFight_Ax254001_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +function HusiFight_Ax254001Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest(3) + if eventNo == 1 then + actPerArr[8] = 100 + elseif 8 <= targetDist then + actPerArr[2] = 40 + actPerArr[3] = 20 + actPerArr[5] = 0 + actPerArr[7] = 40 + elseif 4 <= targetDist then + actPerArr[2] = 50 + actPerArr[3] = 30 + actPerArr[5] = 0 + actPerArr[7] = 20 + elseif 2.5 <= targetDist then + actPerArr[2] = 65 + actPerArr[3] = 30 + actPerArr[5] = 0 + actPerArr[7] = 5 + else + actPerArr[2] = 70 + actPerArr[3] = 30 + actPerArr[5] = 0 + actPerArr[7] = 0 + end + local local0 = {} + local local1, local2, local3 = nil + local0[1] = Att3000_Dist_max + local0[2] = 0 + local0[3] = 5 + local0[4] = 15 + local0[5] = local1 + local0[6] = local2 + local0[7] = local3 + local0[8] = 80 + defFuncParamTbl[2] = local0 + actFuncArr[3] = REGIST_FUNC(ai, goal, HusiFight_Ax254001_Act03) + actFuncArr[5] = REGIST_FUNC(ai, goal, HusiFight_Ax254001_Act05) + actFuncArr[7] = REGIST_FUNC(ai, goal, HusiFight_Ax254001_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, HusiFight_Ax254001_Act08) + local0 = {0, 80, 0, 0, 0, 10, 10} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace_IncludeSidestep, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3003_Dist_max +function HusiFight_Ax254001_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 55 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3008_Dist_min +Att3000_Dist_min = Att3008_Dist_max +function HusiFight_Ax254001_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local LeaveDist = Att3008_Dist_min + local AppDist = Att3008_Dist_max + local DashDist = Att3008_Dist_max + 2 + local Odds_Guard = 100 + Approach_or_Leave_Act(ai, goal, LeaveDist, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3008, TARGET_ENE_0, DIST_None) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3007_Dist_min +Att3000_Dist_min = Att3007_Dist_max +Att3000_Dist_min = Att3006_Dist_min +Att3000_Dist_min = Att3006_Dist_max +Att3000_Dist_min = Att3005_Dist_max +function HusiFight_Ax254001_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if Att3007_Dist_min <= targetDist and fate <= 20 then + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3007 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + if fate3 <= 30 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3010, TARGET_ENE_0, DIST_Middle, 0) + end + elseif Att3006_Dist_min <= targetDist and fate2 <= 50 then + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3006 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + if fate3 <= 30 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3010, TARGET_ENE_0, DIST_Middle, 0) + end + else + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3005 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + if fate3 <= 30 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3010, TARGET_ENE_0, DIST_Middle, 0) + end + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function HusiFight_Ax254001_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_ENE_0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function HusiFight_Ax254001Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function HusiFight_Ax254001Battle_Terminate(ai, goal) + return +end + +function HusiFight_Ax254001Battle_Interupt(ai, goal) + if ai:IsLadderAct(TARGET_SELF) then + return false + end + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest(3) + local superStepDist = 3 + local superStepPer = 15 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer) then + return true + end + local distDamagedStep = 3 + local oddsDamagedStep = 15 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 3.5 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + end + local distMissSwing_Int = 3.5 + local oddsMissSwing_Int = 50 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if 1.8 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + local distResNear = 7.5 + local distResFar = 15 + local oddsResNear = 0 + local oddsResFar = 20 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 3.5) + elseif ResBehavID == 2 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 3.5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 3.5) + end + return true + end + local oddsResponse = 20 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 3.5 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distSuccessGuard_Act = 3.5 + local oddsSuccessGuard_Act = 30 + if SuccessGuard_Act(ai, goal, distSuccessGuard_Act, oddsSuccessGuard_Act) then + if 1.8 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + return false + end + end +end + +return diff --git a/scripts_decompiled/254002_battle.lua b/scripts_decompiled/254002_battle.lua new file mode 100644 index 0000000..4977ab1 --- /dev/null +++ b/scripts_decompiled/254002_battle.lua @@ -0,0 +1,265 @@ +REGISTER_GOAL(GOAL_HusiFight_FireBom254002_Battle, "HusiFight_FireBom254002Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 1.6 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 1.9 +local Att3005_Dist_min = 2.5 +local Att3005_Dist_max = 3.8 +local Att3006_Dist_min = 3.5 +local Att3006_Dist_max = 5.5 +local Att3007_Dist_min = 5 +local Att3007_Dist_max = 7.5 +local Att3008_Dist_min = 2 +local Att3008_Dist_max = 5.7 +REGISTER_GOAL_NO_UPDATE(GOAL_HusiFight_FireBom254002_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +function HusiFight_FireBom254002Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local targetDistY = ai:GetDistYSigned(TARGET_ENE_0) + local eventNo = ai:GetEventRequest(3) + local absDistY = math.abs(targetDistY) + if eventNo == 1 then + actPerArr[8] = 100 + elseif 5 <= targetDist and targetDistY < -3 then + actPerArr[2] = 0 + actPerArr[3] = 0 + actPerArr[5] = 0 + actPerArr[6] = 100 + actPerArr[7] = 0 + elseif 8 <= targetDist then + actPerArr[2] = 3 + actPerArr[3] = 3 + actPerArr[5] = 91 + actPerArr[6] = 0 + actPerArr[7] = 3 + elseif 4 <= targetDist then + actPerArr[2] = 10 + actPerArr[3] = 5 + actPerArr[5] = 80 + actPerArr[6] = 0 + actPerArr[7] = 5 + elseif 2.5 <= targetDist then + actPerArr[2] = 10 + actPerArr[3] = 10 + actPerArr[5] = 75 + actPerArr[6] = 0 + actPerArr[7] = 5 + else + actPerArr[2] = 40 + actPerArr[3] = 40 + actPerArr[5] = 20 + actPerArr[6] = 0 + actPerArr[7] = 0 + end + local local0 = {} + local local1, local2, local3, local4 = nil + local0[1] = Att3000_Dist_max + local0[2] = 0 + local0[3] = 5 + local0[4] = 15 + local0[5] = local1 + local0[6] = local2 + local0[7] = local3 + local0[8] = local4 + defFuncParamTbl[2] = local0 + actFuncArr[3] = REGIST_FUNC(ai, goal, HusiFight_FireBom254002_Act03) + actFuncArr[5] = REGIST_FUNC(ai, goal, HusiFight_FireBom254002_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, HusiFight_FireBom254002_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, HusiFight_FireBom254002_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, HusiFight_FireBom254002_Act08) + local0 = {0, 70, 0, 0, 0, 15, 15} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace_IncludeSidestep, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3003_Dist_max +function HusiFight_FireBom254002_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3008_Dist_max +Att3000_Dist_min = Att3008_Dist_min +function HusiFight_FireBom254002_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if Att3008_Dist_max <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, Att3008_Dist_max, TARGET_SELF, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, Att3008_Dist_min, TARGET_ENE_0, true, -1) + end + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3008, TARGET_ENE_0, DIST_None, 0) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 2), TARGET_ENE_0, 0, 0, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function HusiFight_FireBom254002_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3008, TARGET_ENE_0, DIST_None, 0) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 2), TARGET_ENE_0, 0, 0, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3007_Dist_min +Att3000_Dist_min = Att3007_Dist_max +Att3000_Dist_min = Att3006_Dist_min +Att3000_Dist_min = Att3006_Dist_max +Att3000_Dist_min = Att3005_Dist_max +function HusiFight_FireBom254002_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if Att3007_Dist_min <= targetDist and fate <= 20 then + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3007 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + elseif Att3006_Dist_min <= targetDist and fate2 <= 50 then + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3006 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + else + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3005 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function HusiFight_FireBom254002_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + ai:SetEventMoveTarget(1022711) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, POINT_EVENT, 0.8, TARGET_SELF, True, -1) + goal:AddSubGoal(GOAL_COMMON_If, 10, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3008_Dist_max +function OnIf_254002(ai, goal, codeNo) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if codeNo == 0 then + if Att3008_Dist_max + 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 2), TARGET_ENE_0, 0, 0, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3008, TARGET_ENE_0, DIST_None, 0) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 2), TARGET_ENE_0, 0, 0, 0) + goal:AddSubGoal(GOAL_COMMON_Turn, 2, TARGET_ENE_0, 0, 0, 0) + end + end + return +end + +function HusiFight_FireBom254002Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function HusiFight_FireBom254002Battle_Terminate(ai, goal) + return +end + +function HusiFight_FireBom254002Battle_Interupt(ai, goal) + if ai:IsLadderAct(TARGET_SELF) then + return false + else + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local superStepDist = 3 + local superStepPer = 15 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer) then + return true + else + local distDamagedStep = 3 + local oddsDamagedStep = 15 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 4 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distMissSwing_Int = 5.7 + local oddsMissSwing_Int = 30 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if targetDist <= 1.9 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3008, TARGET_ENE_0, DIST_None, 0) + end + return true + else + local distResNear = 5.7 + local distResFar = 15 + local oddsResNear = 0 + local oddsResFar = 15 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + return true + elseif ResBehavID == 2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + else + local oddsResponse = 20 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 3.5 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end + end + end + end + end + end +end + +return diff --git a/scripts_decompiled/255000_battle.lua b/scripts_decompiled/255000_battle.lua new file mode 100644 index 0000000..6b01825 --- /dev/null +++ b/scripts_decompiled/255000_battle.lua @@ -0,0 +1,356 @@ +REGISTER_GOAL(GOAL_HusiHeavy_Spear255000_Battle, "HusiHeavy_Spear255000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 2.8 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 2 +local Att3005_Dist_min = 2.5 +local Att3005_Dist_max = 4.4 +local Att3007_Dist_min = 0 +local Att3007_Dist_max = 3.15 +local Att3008_Dist_min = 2.5 +local Att3008_Dist_max = 4.5 +local Att3009_Dist_min = 0 +local Att3009_Dist_max = 1.8 +REGISTER_GOAL_NO_UPDATE(GOAL_HusiHeavy_Spear255000_Battle, 1) +Att3000_Dist_min = Att3009_Dist_max +Att3000_Dist_min = Att3007_Dist_max +function OnIf_255000(ai, goal, codeNo) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if codeNo == 0 then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + if fate <= 20 and targetDist <= 2.8 then + local AppDist = Att3009_Dist_max + local DashDist = Att3009_Dist_max + 2 + local Odds_Guard = 100 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_GuardBreakAttack, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3007_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 3.5), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 9910) + end + elseif 4.4 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 3.5), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 9910) + elseif 2.8 <= targetDist then + if fate <= 30 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + end + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 3.5), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 9910) + end + elseif 1.5 <= targetDist then + if fate <= 60 then + if fate2 <= 30 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + elseif fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + end + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 3.5), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 9910) + end + elseif fate <= 95 then + if fate2 <= 20 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + end + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 3.5), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 9910) + end + elseif codeNo == 1 then + if 2.5 <= targetDist then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + end + elseif fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + end + elseif codeNo == 2 then + if ai:HasSpecialEffectId(TARGET_SELF, 3151) then + ai:SetTimer(1, 120) + else + ai:SetTimer(1, 30) + end + end + return +end + +Att3000_Dist_min = Att3003_Dist_max +Att3000_Dist_min = Att3007_Dist_max +Att3000_Dist_min = Att3009_Dist_max +function HusiHeavy_Spear255000Battle_Activate(ai, goal) + local hprate = ai:GetHpRate(TARGET_SELF) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + local Berserk = ai:GetTimer(0) + local est = ai:GetTimer(1) + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + if hprate <= 0.4 and ai:IsFinishTimer(1) == true then + if 8 <= targetDist then + Act06Per = 200 + elseif 2.5 <= targetDist then + Act06Per = 100 + else + Act06Per = 50 + end + end + if Berserk <= 0 then + Act01Per = 100 + elseif ai:IsTargetGuard(TARGET_ENE_0) == true then + if 8 <= targetDist then + Act02Per = 30 + Act03Per = 30 + Act04Per = 40 + Act05Per = 0 + elseif 2.5 <= targetDist then + Act02Per = 35 + Act03Per = 35 + Act04Per = 20 + Act05Per = 10 + else + Act02Per = 40 + Act03Per = 40 + Act04Per = 0 + Act05Per = 20 + end + elseif 8 <= targetDist then + Act02Per = 25 + Act03Per = 15 + Act04Per = 60 + Act05Per = 0 + elseif 2.5 <= targetDist then + Act02Per = 30 + Act03Per = 50 + Act04Per = 20 + Act05Per = 0 + else + Act02Per = 40 + Act03Per = 60 + Act04Per = 0 + Act05Per = 0 + end + local doAdmirer = ai:GetExcelParam(AI_EXCEL_THINK_PARAM_TYPE__thinkAttr_doAdmirer) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local Odds_Guard = 100 + if doAdmirer == 1 and role == ROLE_TYPE_Torimaki then + Torimaki_Act(ai, goal, Odds_Guard) + elseif doAdmirer == 1 and role == ROLE_TYPE_Kankyaku then + Kankyaku_Act(ai, goal, Odds_Guard) + else + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per) + if fateAct <= Act01Per then + local fateLeave = ai:GetRandam_Int(1, 100) + if 4.5 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, ai:GetRandam_Float(3, 4), TARGET_SELF, true, 9910) + elseif targetDist <= 1.5 and fateLeave <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Float(3, 3.5), TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 9910) + elseif targetDist <= 0.5 and fateLeave <= 90 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Float(3, 3.5), TARGET_ENE_0, ai:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 9910) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 3.5), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 9910) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(3, 3.5), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, 9910) + goal:AddSubGoal(GOAL_COMMON_If, 10, 0) + elseif fateAct <= Act01Per + Act02Per then + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 0 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 25 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3003, TARGET_ENE_0, DIST_Middle, -1, 60) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3003, TARGET_ENE_0, DIST_Middle, -1, 60) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + HusiHeavy_Spear255000_AfterAttackAct01(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per then + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 0 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3007, TARGET_ENE_0, DIST_Middle, -1, 15) + HusiHeavy_Spear255000_AfterAttackAct01(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 0 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3008, TARGET_ENE_0, DIST_Middle, -1, 30) + HusiHeavy_Spear255000_AfterAttackAct01(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + local AppDist = Att3009_Dist_max + local DashDist = Att3009_Dist_max + 0 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_GuardBreakAttack, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3007_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + HusiHeavy_Spear255000_AfterAttackAct01(ai, goal) + else + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 4.5, TARGET_ENE_0, true, 9910) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3200, TARGET_ENE_0, DIST_None) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, -1, AI_DIR_TYPE_B, 3.6) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3200, TARGET_ENE_0, DIST_None) + end + goal:AddSubGoal(GOAL_COMMON_If, 15, 2) + end + end + return +end + +function HusiHeavy_Spear255000_AfterAttackAct01(ai, goal) + local Odds_Guard = 0 + local Odds_NoAct = 85 + local Odds_BackAndSide = 0 + local Odds_Back = 0 + local Odds_BitWait = 0 + local Odds_Backstep = 5 + local Odds_Sidestep = 10 + GetWellSpace_Act_IncludeSidestep(ai, goal, Odds_Guard, Odds_NoAct, Odds_BackAndSide, Odds_Back, Odds_BitWait, Odds_Backstep, Odds_Sidestep) + return +end + +function HusiHeavy_Spear255000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function HusiHeavy_Spear255000Battle_Terminate(ai, goal) + return +end + +function HusiHeavy_Spear255000Battle_Interupt(ai, goal) + if ai:IsLadderAct(TARGET_SELF) then + return false + end + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local hprate = ai:GetHpRate(TARGET_SELF) + if ai:IsInterupt(INTERUPT_Damaged) then + local Berserk = ai:GetTimer(0) + if 0.15 <= hprate and hprate <= 0.9 then + goal:ClearSubGoal() + ai:SetTimer(0, 11) + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_SELF) + return true + elseif targetDist <= 3 and fate <= 40 then + goal:ClearSubGoal() + local Odds_Guard = 100 + local Odds_NoAct = 0 + local Odds_BackAndSide = 30 + local Odds_Back = 40 + local Odds_BitWait = 0 + local Odds_Backstep = 15 + local Odds_Sidestep = 15 + GetWellSpace_Act_IncludeSidestep(ai, goal, Odds_Guard, Odds_NoAct, Odds_BackAndSide, Odds_Back, Odds_BitWait, Odds_Backstep, Odds_Sidestep) + return true + end + end + if ai:IsInterupt(INTERUPT_SuccessGuard) then + local Berserk = ai:GetTimer(0) + if Berserk <= 0 and targetDist <= 4.4 and fate <= 50 then + goal:ClearSubGoal() + if 2.5 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + end + local distResponse = 3 + local oddsResponse = 15 + local oddsStep = 30 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 3.5 + local oddsLeaveAndSide = 50 + local timeSide = 3.5 + local distLeave = 2.5 + if FindAttack_Step_or_Guard(ai, goal, distResponse, oddsResponse, oddsStep, bkStepPer, leftStepPer, rightStepPer, safetyDist, oddsLeaveAndSide, timeSide, distLeave) then + return true + else + local distMissSwing_Int = 4.4 + local oddsMissSwing_Int = 30 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if targetDist <= 2 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distResNear = 12 + local distResFar = 20 + local oddsResNear = 0 + local oddsResFar = 30 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + return true + elseif ResBehavID == 2 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + return true + else + local oddsResponse = 20 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 3.5 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end + end + end + end +end + +return diff --git a/scripts_decompiled/255001_battle.lua b/scripts_decompiled/255001_battle.lua new file mode 100644 index 0000000..4639dde --- /dev/null +++ b/scripts_decompiled/255001_battle.lua @@ -0,0 +1,281 @@ +REGISTER_GOAL(GOAL_HusiHeavy_Long255001_Battle, "HusiHeavy_Long255001Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 2.1 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 2 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 2 +local Att3005_Dist_min = 2.5 +local Att3005_Dist_max = 4.1 +local Att3009_Dist_min = 0 +local Att3009_Dist_max = 1.8 +REGISTER_GOAL_NO_UPDATE(GOAL_HusiHeavy_Long255001_Battle, 1) +function OnIf_255001(ai, goal, codeNo) + if ai:HasSpecialEffectId(TARGET_SELF, 3151) then + ai:SetTimer(0, 120) + else + ai:SetTimer(0, 30) + end + return +end + +Att3000_Dist_min = Att3003_Dist_max +Att3000_Dist_min = Att3004_Dist_max +Att3000_Dist_min = Att3009_Dist_max +function HusiHeavy_Long255001Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local hprate = ai:GetHpRate(TARGET_SELF) + local eventNo = ai:GetEventRequest(3) + if eventNo == 1 then + actPerArr[8] = 100 + elseif hprate <= 0.4 and ai:IsFinishTimer(0) == true then + if 4.5 <= targetDist then + actPerArr[7] = 10 + actPerArr[2] = 5 + actPerArr[1] = 5 + actPerArr[3] = 5 + actPerArr[4] = 0 + actPerArr[5] = 75 + elseif 3 <= targetDist then + actPerArr[7] = 10 + actPerArr[2] = 15 + actPerArr[1] = 15 + actPerArr[3] = 10 + actPerArr[4] = 0 + actPerArr[5] = 50 + else + actPerArr[7] = 0 + actPerArr[2] = 20 + actPerArr[1] = 15 + actPerArr[3] = 20 + actPerArr[4] = 10 + actPerArr[5] = 35 + end + elseif 8 <= targetDist then + actPerArr[7] = 80 + actPerArr[2] = 10 + actPerArr[1] = 10 + actPerArr[3] = 0 + actPerArr[4] = 0 + elseif 4 <= targetDist then + actPerArr[7] = 50 + actPerArr[2] = 20 + actPerArr[1] = 20 + actPerArr[3] = 10 + actPerArr[4] = 0 + elseif 2.5 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[7] = 15 + actPerArr[2] = 10 + actPerArr[1] = 10 + actPerArr[3] = 15 + actPerArr[4] = 50 + else + actPerArr[7] = 30 + actPerArr[2] = 30 + actPerArr[1] = 30 + actPerArr[3] = 10 + actPerArr[4] = 0 + end + elseif ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[7] = 0 + actPerArr[2] = 10 + actPerArr[1] = 10 + actPerArr[3] = 10 + actPerArr[4] = 70 + else + actPerArr[7] = 0 + actPerArr[2] = 40 + actPerArr[1] = 20 + actPerArr[3] = 40 + actPerArr[4] = 0 + end + local local0 = {Att3003_Dist_max, 75, 3003, DIST_Middle, nil} + defFuncParamTbl[1] = local0 + actFuncArr[2] = REGIST_FUNC(ai, goal, HusiHeavy_Long255001_Act02) + local0 = {Att3004_Dist_max, 75, 3004, DIST_Middle, nil} + defFuncParamTbl[3] = local0 + local0 = {Att3009_Dist_max, 75, 3009, DIST_Middle, 3004, DIST_Middle, nil} + defFuncParamTbl[4] = local0 + actFuncArr[5] = REGIST_FUNC(ai, goal, HusiHeavy_Long255001_Act05) + actFuncArr[7] = REGIST_FUNC(ai, goal, HusiHeavy_Long255001_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, HusiHeavy_Long255001_Act08) + local0 = {100, 60, 10, 10, 0, 10, 10} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace_IncludeSidestep, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function HusiHeavy_Long255001_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 75 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 85 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function HusiHeavy_Long255001_Act05(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 4.5, TARGET_ENE_0, true, 9910) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3200, TARGET_ENE_0, DIST_None) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, -1, AI_DIR_TYPE_B, 3.6) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3200, TARGET_ENE_0, DIST_None) + end + goal:AddSubGoal(GOAL_COMMON_If, 15, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3005_Dist_max +function HusiHeavy_Long255001_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 75 + local AttID = 3005 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function HusiHeavy_Long255001_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_ENE_0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function HusiHeavy_Long255001Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function HusiHeavy_Long255001Battle_Terminate(ai, goal) + return +end + +function HusiHeavy_Long255001Battle_Interupt(ai, goal) + if ai:IsLadderAct(TARGET_SELF) then + return false + else + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest(3) + local distResponse = 3 + local oddsResponse = 15 + local oddsStep = 30 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 3.5 + local oddsLeaveAndSide = 50 + local timeSide = 3.5 + local distLeave = 2.5 + if FindAttack_Step_or_Guard(ai, goal, distResponse, oddsResponse, oddsStep, bkStepPer, leftStepPer, rightStepPer, safetyDist, oddsLeaveAndSide, timeSide, distLeave) then + return true + else + local distResponse = 3 + local oddsResponse = 15 + local oddsStep = 30 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 3.5 + local oddsLeaveAndSide = 50 + local timeSide = 3.5 + local distLeave = 2.5 + if Damaged_Step_or_Guard(ai, goal, distResponse, oddsResponse, oddsStep, bkStepPer, leftStepPer, rightStepPer, safetyDist, oddsLeaveAndSide, timeSide, distLeave) then + return true + else + local distGuardBreak_Act = 2 + local oddsGuardBreak_Act = 30 + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distResNear = 10.5 + local distResFar = 18 + local oddsResNear = 10 + local oddsResFar = 15 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + return true + elseif ResBehavID == 2 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + return true + else + local distMissSwing_Int = 4.1 + local oddsMissSwing_Int = 50 + if not eventNo == 1 and MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if targetDist <= 2 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local oddsResponse = 20 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 3.5 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distSuccessGuard_Act = 2 + local oddsSuccessGuard_Act = 30 + if SuccessGuard_Act(ai, goal, distSuccessGuard_Act, oddsSuccessGuard_Act) then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + return false + end + end + end + end + end + end + end + end +end + +return diff --git a/scripts_decompiled/255002_battle.lua b/scripts_decompiled/255002_battle.lua new file mode 100644 index 0000000..5291bf9 --- /dev/null +++ b/scripts_decompiled/255002_battle.lua @@ -0,0 +1,328 @@ +REGISTER_GOAL(GOAL_HusiHeavy_Bow255002_Battle, "HusiHeavy_Bow255002Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 2.2 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 2.4 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 2.3 +local Att3005_Dist_min = 2.5 +local Att3005_Dist_max = 4.5 +REGISTER_GOAL_NO_UPDATE(GOAL_HusiHeavy_Bow255002_Battle, 1) +function OnIf_255002(ai, goal, codeNo) + if ai:HasSpecialEffectId(TARGET_SELF, 3151) then + ai:SetTimer(0, 120) + else + ai:SetTimer(0, 30) + end + return +end + +function HusiHeavy_Bow255002Battle_Activate(ai, goal) + ai:AddObserveArea(0, TARGET_ENE_0, TARGET_SELF, AI_DIR_TYPE_F, 180, 3) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local chan_to_bow1 = 10 + local chan_to_bow2 = 8 + local hprate = ai:GetHpRate(TARGET_SELF) + if ai:HasSpecialEffectId(TARGET_SELF, 5401) then + if hprate <= 0.4 and ai:IsFinishTimer(0) == true then + if chan_to_bow1 <= targetDist then + actPerArr[4] = 25 + actPerArr[6] = 0 + actPerArr[7] = 0 + actPerArr[8] = 0 + actPerArr[9] = 0 + actPerArr[10] = 75 + elseif 4.5 <= targetDist then + actPerArr[4] = 5 + actPerArr[6] = 5 + actPerArr[7] = 5 + actPerArr[8] = 5 + actPerArr[9] = 5 + actPerArr[10] = 75 + elseif 3 <= targetDist then + actPerArr[6] = 15 + actPerArr[7] = 15 + actPerArr[8] = 10 + actPerArr[9] = 10 + actPerArr[10] = 50 + else + actPerArr[6] = 25 + actPerArr[7] = 20 + actPerArr[8] = 20 + actPerArr[9] = 0 + actPerArr[10] = 35 + end + elseif chan_to_bow1 <= targetDist then + actPerArr[4] = 100 + elseif chan_to_bow2 <= targetDist then + actPerArr[4] = 70 + actPerArr[6] = 5 + actPerArr[7] = 5 + actPerArr[8] = 5 + actPerArr[9] = 15 + else + actPerArr[6] = 40 + actPerArr[7] = 30 + actPerArr[8] = 30 + actPerArr[9] = 0 + end + elseif hprate <= 0.4 and ai:IsFinishTimer(0) == true then + if 12 <= targetDist then + actPerArr[1] = 25 + actPerArr[2] = 0 + actPerArr[10] = 75 + elseif 4.5 <= targetDist then + actPerArr[1] = 15 + actPerArr[2] = 10 + actPerArr[10] = 75 + elseif 3 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 10 + actPerArr[5] = 20 + actPerArr[10] = 50 + else + actPerArr[5] = 65 + actPerArr[10] = 35 + end + elseif 12 <= targetDist then + actPerArr[1] = 100 + elseif 5 <= targetDist then + actPerArr[1] = 70 + actPerArr[2] = 30 + elseif 3 <= targetDist then + actPerArr[1] = 30 + actPerArr[2] = 40 + actPerArr[5] = 30 + else + actPerArr[5] = 100 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, HusiHeavy_Bow255002_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, HusiHeavy_Bow255002_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, HusiHeavy_Bow255002_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, HusiHeavy_Bow255002_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, HusiHeavy_Bow255002_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, HusiHeavy_Bow255002_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, HusiHeavy_Bow255002_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, HusiHeavy_Bow255002_Act08) + actFuncArr[9] = REGIST_FUNC(ai, goal, HusiHeavy_Bow255002_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, HusiHeavy_Bow255002_Act10) + local local0 = {0, 60, 0, 0, 0, 20, 20} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace_IncludeSidestep, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +function HusiHeavy_Bow255002_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if fate <= 50 then + local FirstAttID = 3000 + local ComAttID = 3001 + local ShootNum = ai:GetRandam_Int(1, 3) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + else + local FirstAttID = 3002 + local ComAttID = 3003 + local ShootNum = ai:GetRandam_Int(1, 3) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + end + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(1, 2), 0, 0, 0, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function HusiHeavy_Bow255002_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if fate <= 50 then + local FirstAttID = 3000 + local ComAttID = 3001 + local ShootNum = ai:GetRandam_Int(1, 3) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + else + local FirstAttID = 3002 + local ComAttID = 3003 + local ShootNum = ai:GetRandam_Int(1, 3) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + end + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(1, 2), 0, 0, 0, 0) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2, TARGET_ENE_0, 20, TARGET_ENE_0, true, -1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function HusiHeavy_Bow255002_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if fate <= 50 then + local FirstAttID = 3000 + local ComAttID = 3001 + local ShootNum = ai:GetRandam_Int(1, 3) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + else + local FirstAttID = 3002 + local ComAttID = 3003 + local ShootNum = ai:GetRandam_Int(1, 3) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + end + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(1, 2), 0, 0, 0, 0) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 20, TARGET_SELF, false, -1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function HusiHeavy_Bow255002_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3010, TARGET_SELF, DIST_Middle, 0) + if fate <= 50 then + local FirstAttID = 3000 + local ComAttID = 3001 + local ShootNum = ai:GetRandam_Int(2, 5) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + else + local FirstAttID = 3002 + local ComAttID = 3003 + local ShootNum = ai:GetRandam_Int(2, 5) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + end + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function HusiHeavy_Bow255002_Act05(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3011, TARGET_SELF, DIST_None) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3000_Dist_max +function HusiHeavy_Bow255002_Act06(ai, goal, paramTbl) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 85 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3003_Dist_max +function HusiHeavy_Bow255002_Act07(ai, goal, paramTbl) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3004_Dist_max +function HusiHeavy_Bow255002_Act08(ai, goal, paramTbl) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3005_Dist_max +function HusiHeavy_Bow255002_Act09(ai, goal, paramTbl) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function HusiHeavy_Bow255002_Act10(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 4.5, TARGET_ENE_0, true, -1) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3200, TARGET_ENE_0, DIST_None) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, -1, AI_DIR_TYPE_B, 3.6) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3200, TARGET_ENE_0, DIST_None) + end + goal:AddSubGoal(GOAL_COMMON_If, 15, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function HusiHeavy_Bow255002Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function HusiHeavy_Bow255002Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function HusiHeavy_Bow255002Battle_Interupt(ai, goal) + if ai:IsLadderAct(TARGET_SELF) then + return false + else + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if ai:IsInterupt(INTERUPT_Inside_ObserveArea) and ai:HasSpecialEffectId(TARGET_SELF, 5401) == false and ai:IsFinishTimer(0) == true and ai:HasSpecialEffectId(TARGET_SELF, 5401) == false then + ai:SetTimer(0, 5) + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3011, TARGET_SELF, DIST_None) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + if fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + end + return true + else + local superStepDist = 3 + local superStepPer = 10 + local bkStepPer = 50 + local leftStepPer = 25 + local rightStepPer = 25 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer) then + return true + else + local distDamagedStep = 3 + local oddsDamagedStep = 10 + local bkStepPer = 50 + local leftStepPer = 25 + local rightStepPer = 25 + local safetyDist = 4 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end + end + end + end +end + +return diff --git a/scripts_decompiled/255003_battle.lua b/scripts_decompiled/255003_battle.lua new file mode 100644 index 0000000..ecd7d31 --- /dev/null +++ b/scripts_decompiled/255003_battle.lua @@ -0,0 +1,61 @@ +REGISTER_GOAL(GOAL_HusiHeavy_Bow255003_Battle, "HusiHeavy_Bow255003Battle") +REGISTER_GOAL_NO_UPDATE(GOAL_HusiHeavy_Bow255003_Battle, 1) +function HusiHeavy_Bow255003Battle_Activate(ai, goal) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + ai:AddObserveRegion(0, TARGET_ENE_0, 1812101) + local FirstAttID = 3000 + local ComAttID = 3001 + local ShootNum = ai:GetRandam_Int(2, 5) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + return +end + +function HusiHeavy_Bow255003Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function HusiHeavy_Bow255003Battle_Terminate(ai, goal) + return +end + +function HusiHeavy_Bow255003Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local playerRegion = 1812101 + local newhome = 1812102 + if ai:IsInterupt(INTERUPT_Inside_ObserveArea) and ai:IsInsideTargetRegion(TARGET_ENE_0, playerRegion) then + goal:ClearSubGoal() + ai:SetEventMoveTarget(newhome) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 30, POINT_EVENT, 1, TARGET_SELF, false, -1) + return true + else + local superStepDist = 3 + local superStepPer = 10 + local bkStepPer = 50 + local leftStepPer = 25 + local rightStepPer = 25 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer) then + return true + else + local distDamagedStep = 3 + local oddsDamagedStep = 15 + local bkStepPer = 50 + local leftStepPer = 25 + local rightStepPer = 25 + local safetyDist = 4 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end + end + end +end + +return diff --git a/scripts_decompiled/255006_battle.lua b/scripts_decompiled/255006_battle.lua new file mode 100644 index 0000000..f3dde2f --- /dev/null +++ b/scripts_decompiled/255006_battle.lua @@ -0,0 +1,193 @@ +REGISTER_GOAL(GOAL_HusiHeavy_Bow_only255006_Battle, "HusiHeavy_Bow_only255006Battle") +REGISTER_GOAL_NO_UPDATE(GOAL_HusiHeavy_Bow_only255006_Battle, 1) +function OnIf_255006(ai, goal, codeNo) + if ai:HasSpecialEffectId(TARGET_SELF, 3151) then + ai:SetTimer(0, 120) + else + ai:SetTimer(0, 30) + end + return +end + +function HusiHeavy_Bow_only255006Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local hprate = ai:GetHpRate(TARGET_SELF) + local myThinkId = ai:GetNpcThinkParamID() + if hprate <= 0.4 and ai:IsFinishTimer(0) == true then + if 20 <= targetDist then + actPerArr[1] = 25 + actPerArr[2] = 0 + actPerArr[3] = 0 + actPerArr[4] = 75 + elseif 10 <= targetDist then + actPerArr[1] = 15 + actPerArr[2] = 10 + actPerArr[3] = 0 + actPerArr[4] = 75 + elseif 4.5 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 15 + actPerArr[3] = 10 + actPerArr[4] = 75 + elseif 3 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 15 + actPerArr[3] = 35 + actPerArr[4] = 50 + else + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 65 + actPerArr[4] = 35 + end + elseif 20 <= targetDist then + actPerArr[1] = 100 + elseif 10 <= targetDist then + actPerArr[1] = 70 + actPerArr[2] = 30 + elseif 5 <= targetDist then + actPerArr[2] = 60 + actPerArr[3] = 40 + else + actPerArr[3] = 100 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, HusiHeavy_Bow_only255006_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, HusiHeavy_Bow_only255006_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, HusiHeavy_Bow_only255006_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, HusiHeavy_Bow_only255006_Act04) + local local0 = {0, 100, 0, 0, 0, 0, 0} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace_IncludeSidestep, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +function HusiHeavy_Bow_only255006_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local myThinkId = ai:GetNpcThinkParamID() + if myThinkId == 255004 then + if fate <= 50 then + local FirstAttID = 3000 + local ComAttID = 3001 + local ShootNum = ai:GetRandam_Int(2, 5) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + else + local FirstAttID = 3002 + local ComAttID = 3003 + local ShootNum = ai:GetRandam_Int(2, 5) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + end + else + local FirstAttID = 3000 + local ComAttID = 3001 + local ShootNum = ai:GetRandam_Int(2, 5) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + end + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function HusiHeavy_Bow_only255006_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local myThinkId = ai:GetNpcThinkParamID() + if myThinkId == 255004 then + if fate <= 50 then + local FirstAttID = 3000 + local ComAttID = 3001 + local ShootNum = ai:GetRandam_Int(2, 5) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + else + local FirstAttID = 3002 + local ComAttID = 3003 + local ShootNum = ai:GetRandam_Int(2, 5) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + end + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2, TARGET_ENE_0, 20, TARGET_ENE_0, true, -1) + else + local FirstAttID = 3000 + local ComAttID = 3001 + local ShootNum = ai:GetRandam_Int(2, 5) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2, TARGET_ENE_0, 20, TARGET_ENE_0, true, -1) + end + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function HusiHeavy_Bow_only255006_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local myThinkId = ai:GetNpcThinkParamID() + if myThinkId == 255004 then + if fate <= 50 then + local FirstAttID = 3000 + local ComAttID = 3001 + local ShootNum = ai:GetRandam_Int(1, 3) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + else + local FirstAttID = 3002 + local ComAttID = 3003 + local ShootNum = ai:GetRandam_Int(1, 3) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + end + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 20, TARGET_SELF, false, -1) + else + local FirstAttID = 3000 + local ComAttID = 3001 + local ShootNum = ai:GetRandam_Int(1, 3) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + end + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function HusiHeavy_Bow_only255006_Act04(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 4.5, TARGET_ENE_0, true, -1) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3200, TARGET_ENE_0, DIST_None) + goal:AddSubGoal(GOAL_COMMON_If, 15, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function HusiHeavy_Bow_only255006Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function HusiHeavy_Bow_only255006Battle_Terminate(ai, goal) + return +end + +function HusiHeavy_Bow_only255006Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local superStepDist = 3 + local superStepPer = 10 + local bkStepPer = 50 + local leftStepPer = 25 + local rightStepPer = 25 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer) then + return true + else + local distDamagedStep = 3 + local oddsDamagedStep = 15 + local bkStepPer = 50 + local leftStepPer = 25 + local rightStepPer = 25 + local safetyDist = 4 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end + end +end + +return diff --git a/scripts_decompiled/256000_battle.lua b/scripts_decompiled/256000_battle.lua new file mode 100644 index 0000000..7209be4 --- /dev/null +++ b/scripts_decompiled/256000_battle.lua @@ -0,0 +1,260 @@ +REGISTER_GOAL(GOAL_LightKnight_Sword256000_Battle, "LightKnight_Sword256000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 2.2 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 2.4 +local Att3004_Dist_min = 2.5 +local Att3004_Dist_max = 4.5 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 2.3 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 1.1 +REGISTER_GOAL_NO_UPDATE(GOAL_LightKnight_Sword256000_Battle, 1) +function OnIf_256000(ai, goal, codeNo) + if ai:HasSpecialEffectId(TARGET_SELF, 3151) then + ai:SetTimer(0, 120) + else + ai:SetTimer(0, 30) + end + return +end + +Att3000_Dist_min = Att3005_Dist_max +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3003_Dist_max +Att3000_Dist_min = Att3006_Dist_max +Att3000_Dist_min = Att3004_Dist_max +function LightKnight_Sword256000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local hprate = ai:GetHpRate(TARGET_SELF) + if ai:IsLadderAct(TARGET_SELF) then + actPerArr[3] = 100 + elseif hprate <= 0.4 and ai:IsFinishTimer(0) == true then + if 4.5 <= targetDist then + actPerArr[1] = 7 + actPerArr[2] = 5 + actPerArr[3] = 8 + actPerArr[7] = 5 + actPerArr[8] = 75 + elseif 3 <= targetDist then + actPerArr[1] = 15 + actPerArr[2] = 15 + actPerArr[3] = 11 + actPerArr[7] = 9 + actPerArr[8] = 50 + else + actPerArr[1] = 25 + actPerArr[2] = 25 + actPerArr[3] = 15 + actPerArr[7] = 0 + actPerArr[8] = 35 + end + elseif 4 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 20 + actPerArr[2] = 15 + actPerArr[3] = 25 + actPerArr[4] = 25 + actPerArr[7] = 15 + else + actPerArr[1] = 25 + actPerArr[2] = 25 + actPerArr[3] = 15 + actPerArr[4] = 0 + actPerArr[7] = 35 + end + elseif 2.5 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 15 + actPerArr[2] = 10 + actPerArr[3] = 25 + actPerArr[4] = 40 + actPerArr[7] = 10 + else + actPerArr[1] = 30 + actPerArr[2] = 30 + actPerArr[3] = 25 + actPerArr[4] = 0 + actPerArr[7] = 15 + end + elseif ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 10 + actPerArr[2] = 10 + actPerArr[3] = 20 + actPerArr[4] = 60 + actPerArr[7] = 0 + else + actPerArr[1] = 35 + actPerArr[2] = 35 + actPerArr[3] = 30 + actPerArr[4] = 0 + actPerArr[7] = 0 + end + local local0 = {Att3005_Dist_max, 75, 3005, DIST_Middle, nil} + defFuncParamTbl[1] = local0 + local0 = {} + local local1, local2, local3, local4 = nil + local0[1] = Att3000_Dist_max + local0[2] = 75 + local0[3] = 10 + local0[4] = 30 + local0[5] = local1 + local0[6] = local2 + local0[7] = local3 + local0[8] = local4 + defFuncParamTbl[2] = local0 + local0 = {Att3003_Dist_max, 75, 3003, DIST_Middle, nil} + defFuncParamTbl[3] = local0 + local0 = {Att3006_Dist_max, 75, 3006, DIST_Middle, 3003, DIST_Middle, nil} + defFuncParamTbl[4] = local0 + local0 = {Att3004_Dist_max, 75, 3004, DIST_Middle, nil} + defFuncParamTbl[7] = local0 + actFuncArr[8] = REGIST_FUNC(ai, goal, LightKnight_Sword256000_Act08) + local0 = {100, 60, 10, 10, 0, 10, 10} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace_IncludeSidestep, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3005_Dist_max +function LightKnight_Sword256000_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3008, TARGET_SELF, DIST_None) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3005_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle) + if fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + end + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function LightKnight_Sword256000_Act06(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3008, TARGET_SELF, DIST_None) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function LightKnight_Sword256000_Act08(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 4.5, TARGET_ENE_0, true, 9910) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3200, TARGET_ENE_0, DIST_None) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, -1, AI_DIR_TYPE_B, 2.5) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3200, TARGET_ENE_0, DIST_None) + end + goal:AddSubGoal(GOAL_COMMON_If, 15, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function LightKnight_Sword256000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function LightKnight_Sword256000Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3004_Dist_max +function LightKnight_Sword256000Battle_Interupt(ai, goal) + if ai:IsLadderAct(TARGET_SELF) then + return false + end + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distResponse = 3 + local oddsResponse = 25 + local oddsStep = 20 + local bkStepPer = 60 + local leftStepPer = 20 + local rightStepPer = 20 + local safetyDist = 2.8 + local oddsLeaveAndSide = 50 + local timeSide = 3.5 + local distLeave = 2.5 + if FindAttack_Step_or_Guard(ai, goal, distResponse, oddsResponse, oddsStep, bkStepPer, leftStepPer, rightStepPer, safetyDist, oddsLeaveAndSide, timeSide, distLeave) then + return true + end + local distResponse = 3 + local oddsResponse = 25 + local oddsStep = 30 + local bkStepPer = 60 + local leftStepPer = 20 + local rightStepPer = 20 + local safetyDist = 2.8 + local oddsLeaveAndSide = 50 + local timeSide = 3.5 + local distLeave = 2.5 + if Damaged_Step_or_Guard(ai, goal, distResponse, oddsResponse, oddsStep, bkStepPer, leftStepPer, rightStepPer, safetyDist, oddsLeaveAndSide, timeSide, distLeave) then + return true + end + local distGuardBreak_Act = 2.4 + local oddsGuardBreak_Act = 30 + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + return true + end + local distMissSwing_Int = 6.5 + local oddsMissSwing_Int = 60 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if 2.5 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3004_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + local distUseItem_Act = 6.5 + local oddsUseItem_Act = 30 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if 2.5 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3004_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + local distResNear = 4.5 + local distResFar = 13 + local oddsResNear = 0 + local oddsResFar = 50 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + elseif ResBehavID == 2 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + end + local oddsResponse = 50 + local bkStepPer = 60 + local leftStepPer = 20 + local rightStepPer = 20 + local safetyDist = 2.8 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distSuccessGuard_Act = 2.4 + local oddsSuccessGuard_Act = 50 + if SuccessGuard_Act(ai, goal, distSuccessGuard_Act, oddsSuccessGuard_Act) then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + return true + else + return false + end + end +end + +return diff --git a/scripts_decompiled/256001_battle.lua b/scripts_decompiled/256001_battle.lua new file mode 100644 index 0000000..b123940 --- /dev/null +++ b/scripts_decompiled/256001_battle.lua @@ -0,0 +1,191 @@ +REGISTER_GOAL(GOAL_LightKnight_Bow256001_Battle, "LightKnight_Bow256001Battle") +REGISTER_GOAL_NO_UPDATE(GOAL_LightKnight_Bow256001_Battle, 1) +function OnIf_256001(ai, goal, codeNo) + if ai:HasSpecialEffectId(TARGET_SELF, 3151) then + ai:SetTimer(0, 120) + else + ai:SetTimer(0, 30) + end + return +end + +function LightKnight_Bow256001Battle_Activate(ai, goal) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local targetDist = ai:GetDist(TARGET_ENE_0) + local hprate = ai:GetHpRate(TARGET_SELF) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local GetWellSpace_Odds = 0 + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + if hprate <= 0.4 and ai:IsFinishTimer(0) == true then + if 20 <= targetDist then + Act01Per = 25 + Act02Per = 0 + Act03Per = 0 + Act04Per = 75 + elseif 10 <= targetDist then + Act01Per = 20 + Act02Per = 5 + Act03Per = 0 + Act04Per = 75 + elseif 4.5 <= targetDist then + Act01Per = 0 + Act02Per = 25 + Act03Per = 0 + Act04Per = 75 + elseif 3 <= targetDist then + Act01Per = 0 + Act02Per = 40 + Act03Per = 10 + Act04Per = 50 + else + Act01Per = 0 + Act02Per = 25 + Act03Per = 40 + Act04Per = 35 + end + elseif 20 <= targetDist then + Act01Per = 100 + Act02Per = 0 + Act03Per = 0 + elseif 10 <= targetDist then + Act01Per = 70 + Act02Per = 30 + Act03Per = 0 + elseif 5 <= targetDist then + Act01Per = 0 + Act02Per = 60 + Act03Per = 40 + else + Act01Per = 0 + Act02Per = 0 + Act03Per = 100 + end + local doAdmirer = ai:GetExcelParam(AI_EXCEL_THINK_PARAM_TYPE__thinkAttr_doAdmirer) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local Odds_Guard = 0 + if doAdmirer == 1 and role == ROLE_TYPE_Torimaki then + Torimaki_Act(ai, goal, Odds_Guard) + elseif doAdmirer == 1 and role == ROLE_TYPE_Kankyaku then + Kankyaku_Act(ai, goal, Odds_Guard) + else + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per) + if fateAct <= Act01Per then + if fate <= 50 then + local FirstAttID = 3000 + local ComAttID = 3001 + local ShootNum = ai:GetRandam_Int(2, 5) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + else + local FirstAttID = 3002 + local ComAttID = 3003 + local ShootNum = ai:GetRandam_Int(2, 5) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + end + elseif fateAct <= Act01Per + Act02Per then + if fate <= 50 then + local FirstAttID = 3000 + local ComAttID = 3001 + local ShootNum = ai:GetRandam_Int(2, 5) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + else + local FirstAttID = 3002 + local ComAttID = 3003 + local ShootNum = ai:GetRandam_Int(2, 5) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + end + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2, TARGET_ENE_0, 20, TARGET_ENE_0, true, -1) + elseif fateAct <= Act01Per + Act02Per + Act03Per then + if fate <= 50 then + local FirstAttID = 3000 + local ComAttID = 3001 + local ShootNum = ai:GetRandam_Int(1, 3) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + else + local FirstAttID = 3002 + local ComAttID = 3003 + local ShootNum = ai:GetRandam_Int(1, 3) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + end + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 20, TARGET_SELF, false, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 4.5, TARGET_ENE_0, true, -1) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3200, TARGET_ENE_0, DIST_None) + goal:AddSubGoal(GOAL_COMMON_If, 15, 0) + end + end + return +end + +function LightKnight_Bow256001Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function LightKnight_Bow256001Battle_Terminate(ai, goal) + return +end + +function LightKnight_Bow256001Battle_Interupt(ai, goal) + if ai:IsLadderAct(TARGET_SELF) then + return false + else + local fate = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local superStepDist = 3 + local superStepPer = 15 + local bkStepPer = 50 + local leftStepPer = 25 + local rightStepPer = 25 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer) then + return true + else + local distDamagedStep = 3 + local oddsDamagedStep = 25 + local bkStepPer = 50 + local leftStepPer = 25 + local rightStepPer = 25 + local safetyDist = 4 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distUseItem_Act = 20 + local oddsUseItem_Act = 15 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if 8 <= targetDist then + if fate <= 50 then + local FirstAttID = 3000 + local ComAttID = 3001 + local ShootNum = ai:GetRandam_Int(2, 5) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + else + local FirstAttID = 3002 + local ComAttID = 3003 + local ShootNum = ai:GetRandam_Int(2, 5) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + end + return true + elseif fate <= 50 then + local FirstAttID = 3000 + local ComAttID = 3001 + local ShootNum = ai:GetRandam_Int(1, 3) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + else + local FirstAttID = 3002 + local ComAttID = 3003 + local ShootNum = ai:GetRandam_Int(1, 3) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + end + return true + else + return false + end + end + end + end +end + +return diff --git a/scripts_decompiled/256002_battle.lua b/scripts_decompiled/256002_battle.lua new file mode 100644 index 0000000..d5f4a5d --- /dev/null +++ b/scripts_decompiled/256002_battle.lua @@ -0,0 +1,247 @@ +REGISTER_GOAL(GOAL_LightKnight_Rapier256002_Battle, "LightKnight_Rapier256002Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 2.1 +local Att3003_Dist_min = 3.5 +local Att3003_Dist_max = 5.5 +local Att3004_Dist_min = 1.5 +local Att3004_Dist_max = 2.4 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 1.3 +REGISTER_GOAL_NO_UPDATE(GOAL_LightKnight_Rapier256002_Battle, 1) +function OnIf_256002(ai, goal, codeNo) + if ai:HasSpecialEffectId(TARGET_SELF, 3151) then + ai:SetTimer(0, 120) + else + ai:SetTimer(0, 30) + end + return +end + +Att3000_Dist_min = Att3004_Dist_max +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3005_Dist_max +Att3000_Dist_min = Att3003_Dist_max +function LightKnight_Rapier256002Battle_Activate(ai, goal) + local ObserveNo = 0 + local BackstabDist = 5 + local BackstabAng = 30 + ObserveAreaForBackstab(ai, goal, ObserveNo, BackstabDist, BackstabAng) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local hprate = ai:GetHpRate(TARGET_SELF) + if ai:IsLadderAct(TARGET_SELF) then + actPerArr[2] = 100 + elseif hprate <= 0.4 and ai:IsFinishTimer(0) == true then + if 4.5 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 15 + actPerArr[3] = 10 + actPerArr[4] = 75 + actPerArr[7] = 0 + actPerArr[8] = 0 + elseif 3 <= targetDist then + actPerArr[1] = 7 + actPerArr[2] = 20 + actPerArr[3] = 8 + actPerArr[4] = 50 + actPerArr[7] = 15 + actPerArr[8] = 0 + else + actPerArr[1] = 0 + actPerArr[2] = 35 + actPerArr[3] = 20 + actPerArr[4] = 35 + actPerArr[7] = 0 + actPerArr[8] = 10 + end + elseif 8 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 15 + actPerArr[3] = 15 + actPerArr[7] = 70 + actPerArr[8] = 0 + elseif 3.5 <= targetDist then + actPerArr[1] = 15 + actPerArr[2] = 40 + actPerArr[3] = 15 + actPerArr[7] = 30 + actPerArr[8] = 0 + elseif 1.5 <= targetDist then + actPerArr[1] = 35 + actPerArr[2] = 35 + actPerArr[3] = 15 + actPerArr[7] = 0 + actPerArr[8] = 25 + else + actPerArr[1] = 0 + actPerArr[2] = 65 + actPerArr[3] = 20 + actPerArr[7] = 0 + actPerArr[8] = 15 + end + local local0 = {Att3004_Dist_max, 75, 3004, DIST_Middle, nil} + defFuncParamTbl[1] = local0 + local0 = {} + local local1, local2, local3, local4 = nil + local0[1] = Att3000_Dist_max + local0[2] = 75 + local0[3] = 10 + local0[4] = 30 + local0[5] = local1 + local0[6] = local2 + local0[7] = local3 + local0[8] = local4 + defFuncParamTbl[2] = local0 + local0 = {Att3005_Dist_max, 100, 3005, DIST_Middle, nil} + defFuncParamTbl[3] = local0 + actFuncArr[4] = REGIST_FUNC(ai, goal, LightKnight_Rapier256002_Act04) + local0 = {Att3003_Dist_max, 75, 3003, DIST_Middle, nil} + defFuncParamTbl[7] = local0 + local0 = {nil} + defFuncParamTbl[8] = local0 + local0 = {100, 60, 5, 5, 0, 15, 15} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace_IncludeSidestep, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +function LightKnight_Rapier256002_Act04(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 4.5, TARGET_ENE_0, true, 9910) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3200, TARGET_ENE_0, DIST_None) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, -1, AI_DIR_TYPE_B, 2.5) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3200, TARGET_ENE_0, DIST_None) + end + goal:AddSubGoal(GOAL_COMMON_If, 15, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function LightKnight_Rapier256002Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function LightKnight_Rapier256002Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3003_Dist_max +function LightKnight_Rapier256002Battle_Interupt(ai, goal) + if ai:IsLadderAct(TARGET_SELF) then + return false + end + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distResponse = 3 + local oddsResponse = 25 + local oddsStep = 20 + local bkStepPer = 60 + local leftStepPer = 20 + local rightStepPer = 20 + local safetyDist = 2.8 + local oddsLeaveAndSide = 50 + local timeSide = 3.5 + local distLeave = 2.5 + if FindAttack_Step_or_Guard(ai, goal, distResponse, oddsResponse, oddsStep, bkStepPer, leftStepPer, rightStepPer, safetyDist, oddsLeaveAndSide, timeSide, distLeave) then + return true + end + local distResponse = 3 + local oddsResponse = 25 + local oddsStep = 40 + local bkStepPer = 60 + local leftStepPer = 20 + local rightStepPer = 20 + local safetyDist = 2.8 + local oddsLeaveAndSide = 50 + local timeSide = 3.5 + local distLeave = 2.5 + if Damaged_Step_or_Guard(ai, goal, distResponse, oddsResponse, oddsStep, bkStepPer, leftStepPer, rightStepPer, safetyDist, oddsLeaveAndSide, timeSide, distLeave) then + return true + end + local distGuardBreak_Act = 2.1 + local oddsGuardBreak_Act = 30 + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + return true + end + local distMissSwing_Int = 5.5 + local oddsMissSwing_Int = 60 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if targetDist <= 3.5 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + local distUseItem_Act = 8 + local oddsUseItem_Act = 15 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if targetDist <= 3.5 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3003_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + local distResNear = 4.5 + local distResFar = 13 + local oddsResNear = 0 + local oddsResFar = 50 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + elseif ResBehavID == 2 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + end + local oddsResponse = 50 + local bkStepPer = 60 + local leftStepPer = 20 + local rightStepPer = 20 + local safetyDist = 2.8 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distSuccessGuard_Act = 2.1 + local oddsSuccessGuard_Act = 50 + if SuccessGuard_Act(ai, goal, distSuccessGuard_Act, oddsSuccessGuard_Act) then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + return true + else + local ParryDist = 3 + local ParryAng = 60 + local ParryThrowDist = 4 + local ParryThrowAng = 60 + if Parry_Act(ai, goal, ParryDist, ParryAng, ParryThrowDist, ParryThrowAng) then + return true + else + local ObserveNo = 0 + local ApproachDist = 1 + local TimerIndex = 0 + local Time = 20 + if Backstab_Act(ai, goal, ObserveNo, ApproachDist, TimerIndex, Time) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + return true + else + return false + end + end + end + end +end + +return diff --git a/scripts_decompiled/257000_battle.lua b/scripts_decompiled/257000_battle.lua new file mode 100644 index 0000000..bb71e09 --- /dev/null +++ b/scripts_decompiled/257000_battle.lua @@ -0,0 +1,263 @@ +REGISTER_GOAL(GOAL_HeavyKnight_Sword257000_Battle, "HeavyKnight_Sword257000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 3.3 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 3.9 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 3 +local Att3005_Dist_min = 6 +local Att3005_Dist_max = 7.8 +local Att3007_Dist_min = 0 +local Att3007_Dist_max = 1.2 +REGISTER_GOAL_NO_UPDATE(GOAL_HeavyKnight_Sword257000_Battle, 1) +function OnIf_257000(ai, goal, codeNo) + if ai:HasSpecialEffectId(TARGET_SELF, 3151) then + ai:SetTimer(0, 120) + else + ai:SetTimer(0, 30) + end + return +end + +function HeavyKnight_Sword257000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local hprate = ai:GetHpRate(TARGET_SELF) + if hprate <= 0.4 and ai:IsFinishTimer(0) == true then + if 6.5 <= targetDist then + actPerArr[5] = 200 + elseif 3 <= targetDist then + actPerArr[5] = 100 + else + actPerArr[5] = 50 + end + end + if 12 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 5 + actPerArr[4] = 20 + actPerArr[6] = 0 + actPerArr[7] = 75 + else + actPerArr[1] = 10 + actPerArr[2] = 10 + actPerArr[3] = 10 + actPerArr[4] = 0 + actPerArr[6] = 0 + actPerArr[7] = 70 + end + elseif 6.5 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 5 + actPerArr[2] = 5 + actPerArr[3] = 10 + actPerArr[4] = 50 + actPerArr[6] = 0 + actPerArr[7] = 30 + else + actPerArr[1] = 20 + actPerArr[2] = 20 + actPerArr[3] = 20 + actPerArr[4] = 0 + actPerArr[6] = 0 + actPerArr[7] = 40 + end + elseif ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 20 + actPerArr[2] = 20 + actPerArr[3] = 10 + actPerArr[4] = 50 + actPerArr[6] = 0 + actPerArr[7] = 0 + else + actPerArr[1] = 40 + actPerArr[2] = 40 + actPerArr[3] = 20 + actPerArr[4] = 0 + actPerArr[6] = 0 + actPerArr[7] = 0 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, HeavyKnight_Sword257000_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, HeavyKnight_Sword257000_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, HeavyKnight_Sword257000_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, HeavyKnight_Sword257000_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, HeavyKnight_Sword257000_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, HeavyKnight_Sword257000_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, HeavyKnight_Sword257000_Act07) + local local0 = {100, 80, 10, 10, 0, 0} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function HeavyKnight_Sword257000_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 100 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3003_Dist_max +function HeavyKnight_Sword257000_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 100 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3003, TARGET_ENE_0, DIST_Middle, -1, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3003, TARGET_ENE_0, DIST_Middle, -1, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3001_Dist_max +function HeavyKnight_Sword257000_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3001_Dist_max + local DashDist = Att3001_Dist_max + 2 + local Odds_Guard = 100 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3001, TARGET_ENE_0, DIST_Middle, -1, 40) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3007_Dist_max +function HeavyKnight_Sword257000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 100 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_GuardBreakTunable, 10, 3007, TARGET_ENE_0, DIST_Middle, -1, 40) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function HeavyKnight_Sword257000_Act05(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 4.5, TARGET_ENE_0, true, 9910) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3200, TARGET_ENE_0, DIST_None) + goal:AddSubGoal(GOAL_COMMON_If, 15, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3007_Dist_max +function HeavyKnight_Sword257000_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3005_Dist_max +function HeavyKnight_Sword257000_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 100 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3005, TARGET_ENE_0, DIST_Middle, -1, 60) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function HeavyKnight_Sword257000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function HeavyKnight_Sword257000Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3003_Dist_max +Att3000_Dist_min = Att3005_Dist_max +function HeavyKnight_Sword257000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distGuard = 3 + local oddsGuard = 5 + local oddsLeaveAndSide = 50 + local timeSide = 4.5 + local distLeave = 2.5 + if Damaged_Guard(ai, goal, distGuard, oddsGuard, oddsLeaveAndSide, timeSide, distLeave) then + + end + local distUseItem_Act = 10 + local oddsUseItem_Act = 60 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if targetDist <= 5.9 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3003_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3005_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + local distResNear = 7.8 + local distResFar = 14 + local oddsResNear = 0 + local oddsResFar = 60 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + elseif ResBehavID == 2 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + end + local distSuccessGuard_Act = 3 + local oddsSuccessGuard_Act = 50 + if SuccessGuard_Act(ai, goal, distSuccessGuard_Act, oddsSuccessGuard_Act) then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/257001_battle.lua b/scripts_decompiled/257001_battle.lua new file mode 100644 index 0000000..fbfd22a --- /dev/null +++ b/scripts_decompiled/257001_battle.lua @@ -0,0 +1,290 @@ +REGISTER_GOAL(GOAL_HeavyKnight_Mace257001_Battle, "HeavyKnight_Mace257001Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 3.2 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 3.3 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 2.4 +local Att3005_Dist_min = 6 +local Att3005_Dist_max = 7.8 +local Att3007_Dist_min = 0 +local Att3007_Dist_max = 1.2 +REGISTER_GOAL_NO_UPDATE(GOAL_HeavyKnight_Mace257001_Battle, 1) +function OnIf_257001(ai, goal, codeNo) + if ai:HasSpecialEffectId(TARGET_SELF, 3151) then + ai:SetTimer(0, 120) + else + ai:SetTimer(0, 30) + end + return +end + +function HeavyKnight_Mace257001Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local hprate = ai:GetHpRate(TARGET_SELF) + local kisou = 0 + local myThinkId = ai:GetNpcThinkParamID() + if myThinkId == 257012 then + ai:AddObserveRegion(0, TARGET_ENE_0, 1502723) + if not not ai:IsInsideTargetRegion(TARGET_ENE_0, 1502721) or ai:IsInsideTargetRegion(TARGET_ENE_0, 1502722) then + kisou = 0 + else + actPerArr[1] = 100 + kisou = 1 + end + end + if kisou == 0 then + if hprate <= 0.4 and ai:IsFinishTimer(0) == true then + if 6.5 <= targetDist then + actPerArr[5] = 200 + elseif 3 <= targetDist then + actPerArr[5] = 100 + else + actPerArr[5] = 50 + end + end + if 12 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[2] = 0 + actPerArr[3] = 5 + actPerArr[4] = 20 + actPerArr[6] = 0 + actPerArr[7] = 75 + actPerArr[9] = 0 + else + actPerArr[2] = 10 + actPerArr[3] = 10 + actPerArr[4] = 0 + actPerArr[6] = 0 + actPerArr[7] = 70 + actPerArr[9] = 10 + end + elseif 6.5 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[2] = 5 + actPerArr[3] = 10 + actPerArr[4] = 50 + actPerArr[6] = 0 + actPerArr[7] = 30 + actPerArr[9] = 5 + else + actPerArr[2] = 20 + actPerArr[3] = 20 + actPerArr[4] = 0 + actPerArr[6] = 0 + actPerArr[7] = 40 + actPerArr[9] = 20 + end + elseif ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[2] = 10 + actPerArr[3] = 20 + actPerArr[4] = 50 + actPerArr[6] = 0 + actPerArr[7] = 0 + actPerArr[9] = 10 + else + actPerArr[2] = 40 + actPerArr[3] = 20 + actPerArr[4] = 0 + actPerArr[6] = 0 + actPerArr[7] = 0 + actPerArr[9] = 40 + end + end + actFuncArr[1] = REGIST_FUNC(ai, goal, HeavyKnight_Mace257001_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, HeavyKnight_Mace257001_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, HeavyKnight_Mace257001_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, HeavyKnight_Mace257001_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, HeavyKnight_Mace257001_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, HeavyKnight_Mace257001_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, HeavyKnight_Mace257001_Act07) + actFuncArr[9] = REGIST_FUNC(ai, goal, HeavyKnight_Mace257001_Act09) + local local0 = {100, 80, 10, 10, 0, 0} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +function HeavyKnight_Mace257001_Act01(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, POINT_INITIAL, 2, TARGET_ENE_0, true, 9910) + goal:AddSubGoal(GOAL_COMMON_Wait, 3, TARGET_ENE_0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3000_Dist_max +function HeavyKnight_Mace257001_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 100 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3002_Dist_max +function HeavyKnight_Mace257001_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 100 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, DIST_Middle, -1, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3007_Dist_max +function HeavyKnight_Mace257001_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 100 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_GuardBreakTunable, 10, 3007, TARGET_ENE_0, DIST_Middle, -1, 40) + goal:AddSubGoal(GOAL_COMMON_Wait, 1.5, TARGET_ENE_0, 0, 0, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function HeavyKnight_Mace257001_Act05(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 4.5, TARGET_ENE_0, true, 9910) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3200, TARGET_ENE_0, DIST_None) + goal:AddSubGoal(GOAL_COMMON_If, 15, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3007_Dist_max +function HeavyKnight_Mace257001_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3005_Dist_max +function HeavyKnight_Mace257001_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3005, TARGET_ENE_0, DIST_Middle, -1, 60) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3000_Dist_max +function HeavyKnight_Mace257001_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 100 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3003, TARGET_ENE_0, DIST_Middle, -1, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3003, TARGET_ENE_0, DIST_Middle, -1, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function HeavyKnight_Mace257001Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function HeavyKnight_Mace257001Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3003_Dist_max +Att3000_Dist_min = Att3005_Dist_max +function HeavyKnight_Mace257001Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distGuard = 3 + local oddsGuard = 10 + local oddsLeaveAndSide = 50 + local timeSide = 4.5 + local distLeave = 2.5 + if Damaged_Guard(ai, goal, distGuard, oddsGuard, oddsLeaveAndSide, timeSide, distLeave) then + + end + local distGuardBreak_Act = 3 + local oddsGuardBreak_Act = 65 + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + local distResNear = 7.8 + local distResFar = 14 + local oddsResNear = 0 + local oddsResFar = 60 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + elseif ResBehavID == 2 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + end + local distUseItem_Act = 10 + local oddsUseItem_Act = 50 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if targetDist <= 5.9 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3003_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3005_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + return true + elseif ai:IsInterupt(INTERUPT_Inside_ObserveArea) and ai:IsFinishTimer(0) == true then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, POINT_INITIAL, 2, TARGET_ENE_0, true, 9910) + goal:AddSubGoal(GOAL_COMMON_Wait, 3, TARGET_ENE_0) + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/264000_battle.lua b/scripts_decompiled/264000_battle.lua new file mode 100644 index 0000000..b3a49fd --- /dev/null +++ b/scripts_decompiled/264000_battle.lua @@ -0,0 +1,285 @@ +REGISTER_GOAL(GOAL_KajiyaAndre264000_Battle, "KajiyaAndre264000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 0.5 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 0.5 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 1.3 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 1.2 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 1.1 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 0.8 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 1.1 +local Att3007_Dist_min = 1 +local Att3007_Dist_max = 2.5 +REGISTER_GOAL_NO_UPDATE(GOAL_KajiyaAndre264000_Battle, 1) +Att3000_Dist_min = Att3006_Dist_max +function KajiyaAndre264000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest() + if 4.2 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 80 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 0 + else + actPerArr[1] = 0 + actPerArr[2] = 20 + actPerArr[3] = 20 + actPerArr[4] = 20 + actPerArr[5] = 20 + actPerArr[6] = 20 + end + local local0 = {Att3006_Dist_max, 0, 3006, DIST_Near} + defFuncParamTbl[1] = local0 + actFuncArr[2] = REGIST_FUNC(ai, goal, KajiyaAndre264000_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, KajiyaAndre264000_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, KajiyaAndre264000_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, KajiyaAndre264000_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, KajiyaAndre264000_Act06) + local atkAfterFunc = REGIST_FUNC(ai, goal, KajiyaAndre264000_ActAfter_AdjustSpace) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3007_Dist_max +function KajiyaAndre264000_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 3, 3007, TARGET_ENE_0, DIST_Near, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3000_Dist_max +function KajiyaAndre264000_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, DIST_Near, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3001, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Near, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3000_Dist_max +function KajiyaAndre264000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Near, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3001, TARGET_ENE_0, DIST_Near, 0) + end + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3000, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, DIST_Near, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Near, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3000_Dist_max +function KajiyaAndre264000_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 0 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3004, TARGET_ENE_0, DIST_Near, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3005, TARGET_ENE_0, DIST_Near, 0) + end + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3004, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, DIST_Near, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3005, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Near, 0) + end + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3006, TARGET_ENE_0, DIST_Near, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3000_Dist_max +function KajiyaAndre264000_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + local fate5 = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 25 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3005, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Near, 0) + elseif fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3001, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3004, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, DIST_Near, 0) + elseif fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3005, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3006, TARGET_ENE_0, DIST_Near, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3001, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3004, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3006, TARGET_ENE_0, DIST_Near, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function KajiyaAndre264000_ActAfter_AdjustSpace(ai, goal, paramTbl) + local GW_fate = ai:GetRandam_Int(0, 100) + local bRight = ai:GetRandam_Int(0, 1) + local friendNum = ai:GetTeamRecordCount(COORDINATE_TYPE_SideWalk_L + bRight, TARGET_ENE_0, 2) + if GW_fate <= 30 and friendNum < 2 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 2, TARGET_ENE_0, true, -1) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, bRight, ai:GetRandam_Int(30, 45), true, true, -1) + elseif GW_fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 3, TARGET_ENE_0, true, -1) + elseif GW_fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + else + local fate = ai:GetRandam_Int(1, 100) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + end + return +end + +function KajiyaAndre264000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function KajiyaAndre264000Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3006_Dist_max +Att3000_Dist_min = Att3007_Dist_max +function KajiyaAndre264000Battle_Interupt(ai, goal) + local superStepDist = 3 + local superStepPer = 35 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer) then + return true + else + local distDamagedStep = 3 + local oddsDamagedStep = 25 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + local safetyDist = 4 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distGuardBreak_Act = 2 + local oddsGuardBreak_Act = 35 + local fate = ai:GetRandam_Int(1, 100) + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3006_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3007_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distUseItem_Act = 5 + local oddsUseItem_Act = 30 + local fate = ai:GetRandam_Int(1, 100) + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3006_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3007_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distResNear = 8.5 + local distResFar = 18 + local oddsResNear = 0 + local oddsResFar = 30 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + return true + elseif ResBehavID == 2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3007_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + return true + elseif fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + else + local oddsResponse = 20 + local bkStepPer = 60 + local leftStepPer = 20 + local rightStepPer = 20 + local safetyDist = 4 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end + end + end + end + end + end +end + +return diff --git a/scripts_decompiled/265000_battle.lua b/scripts_decompiled/265000_battle.lua new file mode 100644 index 0000000..cadfa7f --- /dev/null +++ b/scripts_decompiled/265000_battle.lua @@ -0,0 +1,83 @@ +REGISTER_GOAL(GOAL_Husi_Haka265000_Battle, "Husi_Haka265000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 6 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 1 +REGISTER_GOAL_NO_UPDATE(GOAL_Husi_Haka265000_Battle, 1) +function Husi_Haka265000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest() + if eventNo == 10 and targetDist <= 11 and 2 <= targetDist then + actPerArr[4] = 100 + elseif 11 <= targetDist then + actPerArr[1] = 30 + actPerArr[2] = 0 + actPerArr[5] = 70 + elseif 6 <= targetDist then + actPerArr[1] = 30 + actPerArr[2] = 20 + actPerArr[5] = 50 + else + actPerArr[1] = 20 + actPerArr[2] = 80 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Husi_Haka265000_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Husi_Haka265000_Act02) + actFuncArr[4] = REGIST_FUNC(ai, goal, Husi_Haka265000_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, Husi_Haka265000_Act05) + local local0 = {0, 70, 0, 0, 30, 0} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +function Husi_Haka265000_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Husi_Haka265000_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_None, 0) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2, TARGET_ENE_0, 20, TARGET_ENE_0, true, -1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Husi_Haka265000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, POINT_INITIAL, 0.5, TARGET_SELF, false, -1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Husi_Haka265000_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(1.5, 3), TARGET_ENE_0, 0, 0, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Husi_Haka265000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Husi_Haka265000Battle_Terminate(ai, goal) + return +end + +function Husi_Haka265000Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/266000_battle.lua b/scripts_decompiled/266000_battle.lua new file mode 100644 index 0000000..a5c8fa1 --- /dev/null +++ b/scripts_decompiled/266000_battle.lua @@ -0,0 +1,175 @@ +REGISTER_GOAL(GOAL_Husi_Chef266000_Battle, "Husi_Chef266000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 3.2 +local Att3002_Dist_min = 5.5 +local Att3002_Dist_max = 7.5 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 3.3 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 0.8 +local Att3007_Dist_min = 0 +local Att3007_Dist_max = 0.8 +REGISTER_GOAL_NO_UPDATE(GOAL_Husi_Chef266000_Battle, 1) +Att3000_Dist_min = Att3007_Dist_max +Att3000_Dist_min = Att3003_Dist_max +Att3000_Dist_min = Att3002_Dist_max +function Husi_Chef266000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if 8 <= targetDist then + actPerArr[1] = 10 + actPerArr[2] = 5 + actPerArr[3] = 5 + actPerArr[4] = 5 + actPerArr[7] = 75 + elseif 4 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 20 + actPerArr[3] = 15 + actPerArr[4] = 15 + actPerArr[7] = 30 + else + actPerArr[1] = 30 + actPerArr[2] = 20 + actPerArr[3] = 20 + actPerArr[4] = 30 + actPerArr[7] = 0 + end + local local0 = {Att3007_Dist_max, 0, 3007, DIST_Middle} + defFuncParamTbl[1] = local0 + actFuncArr[2] = REGIST_FUNC(ai, goal, Husi_Chef266000_Act02) + local0 = {Att3003_Dist_max, 0, 3003, DIST_Middle} + defFuncParamTbl[3] = local0 + actFuncArr[4] = REGIST_FUNC(ai, goal, Husi_Chef266000_Act04) + local0 = {Att3002_Dist_max, 0, 3002, DIST_Middle} + defFuncParamTbl[7] = local0 + local0 = {0, 70, 5, 5, 5, 15} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function Husi_Chef266000_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3005_Dist_max +function Husi_Chef266000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3005 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Husi_Chef266000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Husi_Chef266000Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3002_Dist_max +Att3000_Dist_min = Att3000_Dist_max +function Husi_Chef266000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distDamagedStep = 3 + local oddsDamagedStep = 15 + local bkStepPer = 100 + local leftStepPer = 0 + local rightStepPer = 0 + local safetyDist = 3 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distGuardBreak_Act = 2.6 + local oddsGuardBreak_Act = 50 + local fate = ai:GetRandam_Int(1, 100) + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distUseItem_Act = 9.5 + local oddsUseItem_Act = 15 + local targetDist = ai:GetDist(TARGET_ENE_0) + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if 5.5 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3002_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distResNear = 5.5 + local distResFar = 18 + local oddsResNear = 20 + local oddsResFar = 30 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + return true + elseif ResBehavID == 2 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3002_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + return true + else + local oddsResponse = 20 + local bkStepPer = 100 + local leftStepPer = 0 + local rightStepPer = 0 + local safetyDist = 4 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end + end + end + end + end +end + +return diff --git a/scripts_decompiled/267000_battle.lua b/scripts_decompiled/267000_battle.lua new file mode 100644 index 0000000..4571e7e --- /dev/null +++ b/scripts_decompiled/267000_battle.lua @@ -0,0 +1,172 @@ +REGISTER_GOAL(GOAL_Ghost_Male267000_Battle, "Ghost_Male267000Battle") +local Att3000_Dist_min = 3.2 +local Att3000_Dist_max = 4.1 +local Att3001_Dist_min = 3.2 +local Att3001_Dist_max = 4.4 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 1.5 +local Att3003_Dist_min = 2.6 +local Att3003_Dist_max = 4 +local Att3004_Dist_min = 5 +local Att3004_Dist_max = 10 +local Att3008_Dist_min = 0 +local Att3008_Dist_max = 2 +REGISTER_GOAL_NO_UPDATE(GOAL_Ghost_Male267000_Battle, 1) +function Ghost_Male267000Battle_Activate(ai, goal) + local myThinkId = ai:GetNpcThinkParamID() + local DoObserveRegion = 0 + local ObserveRegion01 = 0 + local ObserveRegion02 = 0 + if myThinkId == 267010 or myThinkId == 267011 then + ObserveRegion01 = 1602850 + ObserveRegion02 = 1602850 + DoObserveRegion = 1 + elseif myThinkId == 267020 or myThinkId == 267021 then + ObserveRegion01 = 1602851 + ObserveRegion02 = 1602851 + DoObserveRegion = 1 + elseif myThinkId == 267030 or myThinkId == 267031 then + ObserveRegion01 = 1602852 + ObserveRegion02 = 1602852 + DoObserveRegion = 1 + elseif myThinkId == 267040 or myThinkId == 267041 then + ObserveRegion01 = 1602853 + ObserveRegion02 = 1602853 + DoObserveRegion = 1 + elseif myThinkId == 267050 then + ObserveRegion01 = 1602854 + ObserveRegion02 = 1602854 + DoObserveRegion = 1 + end + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local Kisou = 0 + if DoObserveRegion == 1 then + if not ai:IsInsideTargetRegion(TARGET_SELF, ObserveRegion01) and not ai:IsInsideTargetRegion(TARGET_SELF, ObserveRegion02) then + actPerArr[8] = 100 + Kisou = 1 + elseif not ai:IsInsideTargetRegion(TARGET_ENE_0, ObserveRegion01) and not ai:IsInsideTargetRegion(TARGET_ENE_0, ObserveRegion02) then + actPerArr[8] = 100 + Kisou = 1 + end + end + if Kisou == 0 then + if 8 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 40 + actPerArr[3] = 30 + actPerArr[7] = 10 + elseif 5 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 30 + actPerArr[2] = 35 + actPerArr[3] = 25 + actPerArr[7] = 10 + else + actPerArr[1] = 30 + actPerArr[2] = 35 + actPerArr[3] = 25 + actPerArr[7] = 10 + end + elseif 2.6 <= targetDist then + if ai:IsTargetGuard(TARGET_ENE_0) == true then + actPerArr[1] = 15 + actPerArr[2] = 15 + actPerArr[3] = 60 + actPerArr[7] = 10 + else + actPerArr[1] = 0 + actPerArr[2] = 35 + actPerArr[3] = 30 + actPerArr[7] = 35 + end + else + actPerArr[1] = 0 + actPerArr[2] = 50 + actPerArr[7] = 50 + end + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Ghost_Male267000_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Ghost_Male267000_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, Ghost_Male267000_Act03) + actFuncArr[7] = REGIST_FUNC(ai, goal, Ghost_Male267000_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, Ghost_Male267000_Act08) + local local0 = {0, 60, 20, 10, 10, 0} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3002_Dist_max +function Ghost_Male267000_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, Att3002_Dist_max, TARGET_SELF, true, 0) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3002, TARGET_ENE_0, DIST_Middle) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3000_Dist_max +function Ghost_Male267000_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, true, 0) + if fate <= 25 then + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3000, TARGET_ENE_0, DIST_Middle) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3003_Dist_max +function Ghost_Male267000_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, Att3003_Dist_max, TARGET_SELF, true, 0) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3003, TARGET_ENE_0, DIST_Middle) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3000_Dist_max +function Ghost_Male267000_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, true, 0) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3008, TARGET_ENE_0, DIST_Middle) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3008, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Ghost_Male267000_Act08(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, POINT_INITIAL, 2, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Wait, 2, TARGET_ENE_0, 0, 0, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Ghost_Male267000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Ghost_Male267000Battle_Terminate(ai, goal) + return +end + +function Ghost_Male267000Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/267000_logic.lua b/scripts_decompiled/267000_logic.lua new file mode 100644 index 0000000..2e7a044 --- /dev/null +++ b/scripts_decompiled/267000_logic.lua @@ -0,0 +1,45 @@ +REGISTER_LOGIC_FUNC(LOGIC_ID_Ghost_Runaway267000, "Ghost_Runaway267000_Logic", "Ghost_Runaway267000_Interupt") +function Ghost_Runaway267000_Logic(ai) + local myThinkId = ai:GetNpcThinkParamID() + local DoObserveRegion = 0 + local ObserveRegion01 = 0 + local ObserveRegion02 = 0 + if myThinkId == 267010 or myThinkId == 267011 then + ObserveRegion01 = 1602850 + ObserveRegion02 = 1602850 + DoObserveRegion = 1 + elseif myThinkId == 267020 or myThinkId == 267021 then + ObserveRegion01 = 1602851 + ObserveRegion02 = 1602851 + DoObserveRegion = 1 + elseif myThinkId == 267030 or myThinkId == 267031 then + ObserveRegion01 = 1602852 + ObserveRegion02 = 1602852 + DoObserveRegion = 1 + elseif myThinkId == 267040 or myThinkId == 267041 then + ObserveRegion01 = 1602853 + ObserveRegion02 = 1602853 + DoObserveRegion = 1 + elseif myThinkId == 267050 then + ObserveRegion01 = 1602854 + ObserveRegion02 = 1602854 + DoObserveRegion = 1 + end + if DoObserveRegion == 1 then + if not ai:IsInsideTargetRegion(TARGET_SELF, ObserveRegion01) and not ai:IsInsideTargetRegion(TARGET_SELF, ObserveRegion02) then + ai:AddTopGoal(GOAL_COMMON_ApproachTarget, 10, POINT_INITIAL, 2, TARGET_SELF, false, -1) + ai:AddTopGoal(GOAL_COMMON_Wait, 2, TARGET_ENE_0, 0, 0, 0) + else + COMMON_EasySetup3(ai) + end + else + COMMON_EasySetup3(ai) + end + return +end + +function Ghost_Runaway267000_Interupt(ai, goal) + return +end + +return diff --git a/scripts_decompiled/268000_battle.lua b/scripts_decompiled/268000_battle.lua new file mode 100644 index 0000000..575298e --- /dev/null +++ b/scripts_decompiled/268000_battle.lua @@ -0,0 +1,148 @@ +REGISTER_GOAL(GOAL_Ghost_Female268000_Battle, "Ghost_Female268000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 1 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 1.4 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 3.2 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 10 +REGISTER_GOAL_NO_UPDATE(GOAL_Ghost_Female268000_Battle, 1) +function Ghost_Female268000Battle_Activate(ai, goal) + local DoObserveRegion = 0 + local ObserveRegion01 = 0 + local ObserveRegion02 = 0 + ObserveRegion01 = 1602860 + ObserveRegion02 = 1602860 + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest(0) + local targetDist = ai:GetDist(TARGET_ENE_0) + local Kisou = 0 + if 1 == 1 then + if not ai:IsInsideTargetRegion(TARGET_SELF, ObserveRegion01) and not ai:IsInsideTargetRegion(TARGET_SELF, ObserveRegion02) then + actPerArr[8] = 100 + Kisou = 1 + elseif not ai:IsInsideTargetRegion(TARGET_ENE_0, ObserveRegion01) and not ai:IsInsideTargetRegion(TARGET_ENE_0, ObserveRegion02) then + actPerArr[8] = 100 + Kisou = 1 + end + end + if Kisou == 0 then + if ai:IsFinishTimer(0) == true then + actPerArr[9] = 100 + elseif 8 <= targetDist then + actPerArr[1] = 0 + actPerArr[7] = 0 + actPerArr[3] = 5 + actPerArr[6] = 95 + elseif 5 <= targetDist then + actPerArr[1] = 5 + actPerArr[7] = 5 + actPerArr[3] = 25 + actPerArr[6] = 65 + elseif 2.5 <= targetDist then + actPerArr[1] = 15 + actPerArr[7] = 15 + actPerArr[3] = 30 + actPerArr[6] = 40 + else + actPerArr[1] = 40 + actPerArr[7] = 40 + actPerArr[3] = 10 + actPerArr[6] = 10 + end + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Ghost_Female268000_Act01) + actFuncArr[3] = REGIST_FUNC(ai, goal, Ghost_Female268000_Act03) + actFuncArr[6] = REGIST_FUNC(ai, goal, Ghost_Female268000_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, Ghost_Female268000_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, Ghost_Female268000_Act08) + actFuncArr[9] = REGIST_FUNC(ai, goal, Ghost_Female268000_Act09) + local local0 = {0, 60, 10, 30, 0, 0} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function Ghost_Female268000_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, true, 0) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3000, TARGET_ENE_0, DIST_Middle) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3002_Dist_max +function Ghost_Female268000_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, Att3002_Dist_max, TARGET_SELF, true, 0) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3002, TARGET_ENE_0, DIST_Middle) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3003_Dist_max +function Ghost_Female268000_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, Att3003_Dist_max, TARGET_SELF, true, 0) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3003, TARGET_ENE_0, DIST_Middle) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(1, 3), TARGET_ENE_0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3000_Dist_max +function Ghost_Female268000_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, true, 0) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3000, TARGET_ENE_0, DIST_Middle) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Ghost_Female268000_Act08(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, POINT_INITIAL, 2, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Wait, 2, TARGET_ENE_0, 0, 0, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Ghost_Female268000_Act09(ai, goal, paramTbl) + ai:SetTimer(0, 9999) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3004, TARGET_SELF, DIST_Middle, 0, -1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Ghost_Female268000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Ghost_Female268000Battle_Terminate(ai, goal) + return +end + +function Ghost_Female268000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local combRunDist = 5 + local combRunPer = 30 + if Damaged_Act(ai, goal, combRunDist, combRunPer) then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, combRunDist, TARGET_ENE_0, false, -1) + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/268000_logic.lua b/scripts_decompiled/268000_logic.lua new file mode 100644 index 0000000..b243496 --- /dev/null +++ b/scripts_decompiled/268000_logic.lua @@ -0,0 +1,24 @@ +REGISTER_LOGIC_FUNC(LOGIC_ID_Ghost_Runaway268000, "Ghost_Runaway268000_Logic", "Ghost_Runaway268000_Interupt") +function Ghost_Runaway268000_Logic(ai) + local myThinkId = ai:GetNpcThinkParamID() + local DoObserveRegion = 0 + local ObserveRegion01 = 0 + local ObserveRegion02 = 0 + if 1 == 1 then + if not ai:IsInsideTargetRegion(TARGET_SELF, 1602860) and not ai:IsInsideTargetRegion(TARGET_SELF, 1602860) then + ai:AddTopGoal(GOAL_COMMON_ApproachTarget, 10, POINT_INITIAL, 2, TARGET_SELF, false, -1) + ai:AddTopGoal(GOAL_COMMON_Wait, 2, TARGET_ENE_0, 0, 0, 0) + else + COMMON_EasySetup3(ai) + end + else + COMMON_EasySetup3(ai) + end + return +end + +function Ghost_Runaway268000_Interupt(ai, goal) + return +end + +return diff --git a/scripts_decompiled/269000_battle.lua b/scripts_decompiled/269000_battle.lua new file mode 100644 index 0000000..5e6df09 --- /dev/null +++ b/scripts_decompiled/269000_battle.lua @@ -0,0 +1,251 @@ +REGISTER_GOAL(GOAL_HebibitoA269000_Battle, "HebibitoA269000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 3.2 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 3.6 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 3.5 +local Att3006_Dist_min = 10 +local Att3006_Dist_max = 11.4 +local Att3007_Dist_min = 0 +local Att3007_Dist_max = 2.5 +local Att3008_Dist_min = 0 +local Att3008_Dist_max = 20 +REGISTER_GOAL_NO_UPDATE(GOAL_HebibitoA269000_Battle, 1) +function HebibitoA269000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest() + local fate = ai:GetRandam_Int(30, 60) + if ai:IsLadderAct(TARGET_SELF) then + actPerArr[3] = 100 + elseif 12 <= targetDist then + if ai:IsFinishTimer(0) == true then + ai:SetTimer(0, fate) + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 0 + actPerArr[4] = 100 + actPerArr[9] = 0 + actPerArr[7] = 0 + else + actPerArr[1] = 0 + actPerArr[2] = 10 + actPerArr[3] = 20 + actPerArr[4] = 0 + actPerArr[9] = 20 + actPerArr[7] = 50 + end + elseif 10 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 25 + actPerArr[3] = 20 + actPerArr[4] = 0 + actPerArr[9] = 30 + actPerArr[7] = 25 + elseif 3.5 <= targetDist then + actPerArr[1] = 15 + actPerArr[2] = 25 + actPerArr[3] = 30 + actPerArr[4] = 0 + actPerArr[9] = 30 + actPerArr[7] = 0 + else + actPerArr[1] = 20 + actPerArr[2] = 20 + actPerArr[3] = 20 + actPerArr[4] = 0 + actPerArr[9] = 30 + actPerArr[7] = 0 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, HebibitoA269000_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, HebibitoA269000_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, HebibitoA269000_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, HebibitoA269000_Act04) + actFuncArr[7] = REGIST_FUNC(ai, goal, HebibitoA269000_Act07) + actFuncArr[9] = REGIST_FUNC(ai, goal, HebibitoA269000_Act09) + local local0 = {100, 50, 10, 10, 0, 15, 15} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace_IncludeSidestep, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3007_Dist_max +function HebibitoA269000_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 100 + if fate <= 20 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 3, 3007, TARGET_ENE_0, DIST_Near, 40) + else + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 3, 3007, TARGET_ENE_0, DIST_Middle, 40) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 3, 3009, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3000_Dist_max +function HebibitoA269000_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 100 + if fate <= 20 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 3, 3000, TARGET_ENE_0, DIST_Near, 0, 30) + elseif fate <= 60 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 3, 3000, TARGET_ENE_0, DIST_Middle, 0, 30) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 3, 3001, TARGET_ENE_0, DIST_Middle, 0, 30) + else + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 3, 3000, TARGET_ENE_0, DIST_Middle, 0, 30) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3001, TARGET_ENE_0, DIST_Middle, 0, 30) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 3, 3002, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3005_Dist_max +function HebibitoA269000_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 100 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 3, 3005, TARGET_ENE_0, DIST_Middle, 0, 10) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function HebibitoA269000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3008, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_max +function HebibitoA269000_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 100 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3006, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3003_Dist_max +function HebibitoA269000_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 100 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3003, TARGET_ENE_0, DIST_Middle, -1, 30, 0, 10) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3003, TARGET_ENE_0, DIST_Middle, -1, 30, 0, 10) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function HebibitoA269000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function HebibitoA269000Battle_Terminate(ai, goal) + return +end + +function HebibitoA269000Battle_Interupt(ai, goal) + if ai:IsLadderAct(TARGET_SELF) then + return false + else + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local distResponse = 3.5 + local oddsResponse = 15 + local oddsStep = 50 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 3.5 + local oddsLeaveAndSide = 50 + local timeSide = 4 + local distLeave = 3.5 + if FindAttack_Step_or_Guard(ai, goal, distResponse, oddsResponse, oddsStep, bkStepPer, leftStepPer, rightStepPer, safetyDist, oddsLeaveAndSide, timeSide, distLeave) then + return true + else + local distResponse = 3.5 + local oddsResponse = 15 + local oddsStep = 50 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 3.5 + local oddsLeaveAndSide = 50 + local timeSide = 4.5 + local distLeave = 3.5 + if Damaged_Step_or_Guard(ai, goal, distResponse, oddsResponse, oddsStep, bkStepPer, leftStepPer, rightStepPer, safetyDist, oddsLeaveAndSide, timeSide, distLeave) then + return true + else + local distResNear = 6.5 + local distResFar = 18 + local oddsResNear = 0 + local oddsResFar = 25 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + return true + elseif ResBehavID == 2 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + return true + else + local oddsResponse = 20 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 3.5 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distSuccessGuard_Act = 3.5 + local oddsSuccessGuard_Act = 100 + local fate = ai:GetRandam_Int(1, 100) + if SuccessGuard_Act(ai, goal, distSuccessGuard_Act, oddsSuccessGuard_Act) then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + return false + end + end + end + end + end + end +end + +return diff --git a/scripts_decompiled/270000_battle.lua b/scripts_decompiled/270000_battle.lua new file mode 100644 index 0000000..fb37a2e --- /dev/null +++ b/scripts_decompiled/270000_battle.lua @@ -0,0 +1,262 @@ +REGISTER_GOAL(GOAL_HebibitoB270000_Battle, "HebibitoB270000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 1 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 1.5 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 1 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 3.5 +local Att3006_Dist_min = 3 +local Att3006_Dist_max = 5.6 +local Att3007_Dist_min = 4 +local Att3007_Dist_max = 14 +local Att3008_Dist_min = 0 +local Att3008_Dist_max = 0.9 +local Att3009_Dist_min = 0 +local Att3009_Dist_max = 20 +REGISTER_GOAL_NO_UPDATE(GOAL_HebibitoB270000_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3004_Dist_max +function HebibitoB270000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest() + local fate = ai:GetRandam_Int(30, 60) + if ai:IsLadderAct(TARGET_SELF) then + actPerArr[3] = 100 + elseif 10 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 5 + actPerArr[3] = 5 + actPerArr[4] = 10 + actPerArr[5] = 0 + actPerArr[6] = 80 + actPerArr[7] = 0 + elseif 8 <= targetDist then + if ai:IsFinishTimer(0) == true then + ai:SetTimer(0, fate) + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 0 + actPerArr[4] = 5 + actPerArr[5] = 0 + actPerArr[6] = 15 + actPerArr[7] = 0 + actPerArr[9] = 80 + else + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 0 + actPerArr[4] = 20 + actPerArr[5] = 0 + actPerArr[6] = 80 + actPerArr[7] = 0 + actPerArr[9] = 0 + end + elseif 5.7 <= targetDist then + if ai:IsFinishTimer(0) == true then + ai:SetTimer(0, fate) + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 0 + actPerArr[4] = 10 + actPerArr[5] = 0 + actPerArr[6] = 0 + actPerArr[7] = 0 + actPerArr[9] = 90 + else + actPerArr[1] = 10 + actPerArr[2] = 10 + actPerArr[3] = 10 + actPerArr[4] = 40 + actPerArr[5] = 20 + actPerArr[6] = 10 + actPerArr[7] = 0 + end + elseif 3 <= targetDist then + actPerArr[1] = 5 + actPerArr[2] = 10 + actPerArr[3] = 10 + actPerArr[4] = 15 + actPerArr[5] = 25 + actPerArr[6] = 0 + actPerArr[7] = 35 + else + actPerArr[1] = 20 + actPerArr[2] = 25 + actPerArr[3] = 25 + actPerArr[4] = 0 + actPerArr[5] = 30 + actPerArr[6] = 0 + actPerArr[7] = 0 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, HebibitoB270000_Act01) + local local0 = {} + local local1, local2, local3, local4 = nil + local0[1] = Att3000_Dist_max + local0[2] = 0 + local0[3] = 0 + local0[4] = 0 + local0[5] = local1 + local0[6] = local2 + local0[7] = local3 + local0[8] = local4 + defFuncParamTbl[2] = local0 + local0 = {Att3004_Dist_max, 0, 3004, DIST_Middle} + defFuncParamTbl[3] = local0 + actFuncArr[4] = REGIST_FUNC(ai, goal, HebibitoB270000_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, HebibitoB270000_Act05) + local0 = {3007, DIST_Far, nil} + defFuncParamTbl[6] = local0 + actFuncArr[7] = REGIST_FUNC(ai, goal, HebibitoB270000_Act07) + actFuncArr[9] = REGIST_FUNC(ai, goal, HebibitoB270000_Act09) + local0 = {0, 50, 5, 5, 0, 20, 20} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace_IncludeSidestep, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3003_Dist_max +function HebibitoB270000_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3003, TARGET_ENE_0, DIST_Middle, -1, 5) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3005_Dist_max +function HebibitoB270000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3008_Dist_max +function HebibitoB270000_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3008_Dist_max + local DashDist = Att3008_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3008, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function HebibitoB270000_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function HebibitoB270000_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3009, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function HebibitoB270000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function HebibitoB270000Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3003_Dist_max +function HebibitoB270000Battle_Interupt(ai, goal) + if ai:IsLadderAct(TARGET_SELF) then + return false + end + local superStepDist = 3 + local superStepPer = 25 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer) then + return true + end + local distDamagedStep = 3 + local oddsDamagedStep = 25 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + local safetyDist = 3 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + end + local distGuardBreak_Act = 10 + local oddsGuardBreak_Act = 50 + local fate = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if 5 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3003_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + local distUseItem_Act = 10 + local oddsUseItem_Act = 40 + local targetDist = ai:GetDist(TARGET_ENE_0) + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if 5 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3003_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + local distResNear = 10.5 + local distResFar = 20 + local oddsResNear = 0 + local oddsResFar = 40 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + elseif ResBehavID == 2 then + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + local local0 = true + return true + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + end + local oddsResponse = 15 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + local safetyDist = 3 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/270001_battle.lua b/scripts_decompiled/270001_battle.lua new file mode 100644 index 0000000..3745382 --- /dev/null +++ b/scripts_decompiled/270001_battle.lua @@ -0,0 +1,257 @@ +REGISTER_GOAL(GOAL_HebibitoB_shot270001_Battle, "HebibitoB_shot270001Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 1 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 1.5 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 1 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 3.5 +local Att3006_Dist_min = 3 +local Att3006_Dist_max = 5.6 +local Att3007_Dist_min = 4 +local Att3007_Dist_max = 14 +local Att3008_Dist_min = 0 +local Att3008_Dist_max = 0.9 +local Att3009_Dist_min = 0 +local Att3009_Dist_max = 20 +REGISTER_GOAL_NO_UPDATE(GOAL_HebibitoB_shot270001_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3004_Dist_max +function HebibitoB_shot270001Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest() + local fate = ai:GetRandam_Int(30, 60) + if 10 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 100 + actPerArr[7] = 0 + elseif 8 <= targetDist then + if ai:IsFinishTimer(0) == true then + ai:SetTimer(0, fate) + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 15 + actPerArr[7] = 0 + actPerArr[9] = 85 + else + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 100 + actPerArr[7] = 0 + actPerArr[9] = 0 + end + elseif 5.7 <= targetDist then + if ai:IsFinishTimer(0) == true then + ai:SetTimer(0, fate) + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 10 + actPerArr[7] = 0 + actPerArr[9] = 90 + else + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 100 + actPerArr[7] = 0 + end + elseif 2.5 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 100 + actPerArr[7] = 0 + else + actPerArr[1] = 20 + actPerArr[2] = 25 + actPerArr[3] = 25 + actPerArr[4] = 0 + actPerArr[5] = 25 + actPerArr[6] = 0 + actPerArr[7] = 5 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, HebibitoB_shot270001_Act01) + local local0 = {} + local local1, local2, local3, local4 = nil + local0[1] = Att3000_Dist_max + local0[2] = 0 + local0[3] = 0 + local0[4] = 0 + local0[5] = local1 + local0[6] = local2 + local0[7] = local3 + local0[8] = local4 + defFuncParamTbl[2] = local0 + local0 = {Att3004_Dist_max, 0, 3004, DIST_Middle} + defFuncParamTbl[3] = local0 + actFuncArr[4] = REGIST_FUNC(ai, goal, HebibitoB_shot270001_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, HebibitoB_shot270001_Act05) + local0 = {3007, DIST_Far, nil} + defFuncParamTbl[6] = local0 + actFuncArr[7] = REGIST_FUNC(ai, goal, HebibitoB_shot270001_Act07) + actFuncArr[9] = REGIST_FUNC(ai, goal, HebibitoB_shot270001_Act09) + local0 = {0, 50, 5, 5, 0, 20, 20} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace_IncludeSidestep, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3003_Dist_max +function HebibitoB_shot270001_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3003, TARGET_ENE_0, DIST_Middle, -1, 5) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3005_Dist_max +function HebibitoB_shot270001_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3008_Dist_max +function HebibitoB_shot270001_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3008_Dist_max + local DashDist = Att3008_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3008, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function HebibitoB_shot270001_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function HebibitoB_shot270001_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3009, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function HebibitoB_shot270001Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function HebibitoB_shot270001Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3003_Dist_max +function HebibitoB_shot270001Battle_Interupt(ai, goal) + local superStepDist = 3 + local superStepPer = 25 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer) then + return true + end + local distDamagedStep = 3 + local oddsDamagedStep = 25 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + local safetyDist = 3 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + end + local distGuardBreak_Act = 10 + local oddsGuardBreak_Act = 50 + local fate = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if 2.5 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3003_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + local distUseItem_Act = 10 + local oddsUseItem_Act = 40 + local targetDist = ai:GetDist(TARGET_ENE_0) + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if 2.5 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3003_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + local distResNear = 10.5 + local distResFar = 20 + local oddsResNear = 0 + local oddsResFar = 40 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + elseif ResBehavID == 2 then + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + local local0 = true + return true + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + end + local oddsResponse = 15 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + local safetyDist = 3 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/271000_battle.lua b/scripts_decompiled/271000_battle.lua new file mode 100644 index 0000000..73b024d --- /dev/null +++ b/scripts_decompiled/271000_battle.lua @@ -0,0 +1,246 @@ +REGISTER_GOAL(GOAL_Crystal271000_Battle, "Crystal271000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 1.3 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 1.8 +local Att3003_Dist_min = 0.5 +local Att3003_Dist_max = 1.5 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 2.8 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 0.6 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 4 +local Att3007_Dist_min = 3.2 +local Att3007_Dist_max = 6.1 +local Att3008_Dist_min = 6.3 +local Att3008_Dist_max = 9.2 +REGISTER_GOAL_NO_UPDATE(GOAL_Crystal271000_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3005_Dist_max +function Crystal271000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if 9.2 <= targetDist then + actPerArr[1] = 5 + actPerArr[2] = 5 + actPerArr[3] = 5 + actPerArr[4] = 5 + actPerArr[5] = 20 + actPerArr[6] = 0 + actPerArr[7] = 60 + elseif 6.1 <= targetDist then + actPerArr[1] = 5 + actPerArr[2] = 5 + actPerArr[3] = 5 + actPerArr[4] = 5 + actPerArr[5] = 30 + actPerArr[6] = 0 + actPerArr[7] = 50 + elseif 4 <= targetDist then + actPerArr[1] = 15 + actPerArr[2] = 15 + actPerArr[3] = 15 + actPerArr[4] = 15 + actPerArr[5] = 40 + actPerArr[6] = 0 + actPerArr[7] = 0 + elseif 2.8 <= targetDist then + actPerArr[1] = 10 + actPerArr[2] = 20 + actPerArr[3] = 20 + actPerArr[4] = 10 + actPerArr[5] = 30 + actPerArr[6] = 10 + actPerArr[7] = 0 + elseif 1.3 <= targetDist then + actPerArr[1] = 10 + actPerArr[2] = 15 + actPerArr[3] = 20 + actPerArr[4] = 10 + actPerArr[5] = 25 + actPerArr[6] = 20 + actPerArr[7] = 0 + else + actPerArr[1] = 20 + actPerArr[2] = 20 + actPerArr[3] = 20 + actPerArr[4] = 20 + actPerArr[5] = 0 + actPerArr[6] = 20 + actPerArr[7] = 0 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Crystal271000_Act01) + local local0 = {} + local local1, local2, local3, local4 = nil + local0[1] = Att3000_Dist_max + local0[2] = 0 + local0[3] = 30 + local0[4] = 70 + local0[5] = local1 + local0[6] = local2 + local0[7] = local3 + local0[8] = local4 + defFuncParamTbl[2] = local0 + local0 = {Att3005_Dist_max, 0, 3005, DIST_Middle, nil} + defFuncParamTbl[3] = local0 + actFuncArr[4] = REGIST_FUNC(ai, goal, Crystal271000_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, Crystal271000_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, Crystal271000_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, Crystal271000_Act07) + local atkAfterFunc = REGIST_FUNC(ai, goal, Crystal271000_ActAfter_AdjustSpace) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3002_Dist_max +function Crystal271000_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3002 + local AttDist = DIST_Middle + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, DIST_Middle, 2.5, 5) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3003_Dist_max +function Crystal271000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3003 + local AttDist = DIST_Middle + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3003, TARGET_ENE_0, DIST_Middle, 2.5, 24) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_max +function Crystal271000_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3006 + local AttDist = DIST_Middle + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, DIST_Middle, 2.5, 33) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3004_Dist_max +function Crystal271000_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3004 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3008_Dist_min +Att3000_Dist_min = Att3008_Dist_max +Att3000_Dist_min = Att3007_Dist_max +function Crystal271000_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if Att3008_Dist_min <= targetDist and fate <= 40 then + local AppDist = Att3008_Dist_max + local DashDist = Att3008_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3008 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + else + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3007 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Crystal271000_ActAfter_AdjustSpace(ai, goal, paramTbl) + local GW_fate = ai:GetRandam_Int(0, 100) + local bRight = ai:GetRandam_Int(0, 1) + local friendNum = ai:GetTeamRecordCount(COORDINATE_TYPE_SideWalk_L + bRight, TARGET_ENE_0, 2) + if GW_fate > 60 then + if GW_fate <= 65 and friendNum < 2 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 2, TARGET_ENE_0, true, -1) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, bRight, ai:GetRandam_Int(30, 45), true, true, -1) + elseif GW_fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 3, TARGET_ENE_0, true, -1) + elseif GW_fate <= 85 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + else + local fate = ai:GetRandam_Int(1, 100) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + end + end + return +end + +function Crystal271000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Crystal271000Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3002_Dist_max +Att3000_Dist_min = Att3007_Dist_max +function Crystal271000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distGuardBreak_Act = 1.8 + local oddsGuardBreak_Act = 20 + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + return true + else + local distUseItem_Act = 7 + local oddsUseItem_Act = 10 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if targetDist <= 3.1 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3002_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3007_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + return false + end + end +end + +return diff --git a/scripts_decompiled/271100_battle.lua b/scripts_decompiled/271100_battle.lua new file mode 100644 index 0000000..3ffa683 --- /dev/null +++ b/scripts_decompiled/271100_battle.lua @@ -0,0 +1,230 @@ +REGISTER_GOAL(GOAL_CrystalAmber271100_Battle, "CrystalAmber271100Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 1.8 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 2 +local Att3003_Dist_min = 0.5 +local Att3003_Dist_max = 2.5 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 5 +local Att3005_Dist_min = 0.5 +local Att3005_Dist_max = 2.6 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 5.1 +local Att3007_Dist_min = 4.5 +local Att3007_Dist_max = 8.3 +local Att3008_Dist_min = 7.5 +local Att3008_Dist_max = 11.5 +REGISTER_GOAL_NO_UPDATE(GOAL_CrystalAmber271100_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3005_Dist_max +function CrystalAmber271100Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if 11.5 <= targetDist then + actPerArr[1] = 5 + actPerArr[2] = 5 + actPerArr[3] = 5 + actPerArr[4] = 5 + actPerArr[5] = 20 + actPerArr[6] = 0 + actPerArr[7] = 60 + elseif 8.3 <= targetDist then + actPerArr[1] = 5 + actPerArr[2] = 5 + actPerArr[3] = 5 + actPerArr[4] = 5 + actPerArr[5] = 30 + actPerArr[6] = 0 + actPerArr[7] = 50 + elseif 5.1 <= targetDist then + actPerArr[1] = 10 + actPerArr[2] = 10 + actPerArr[3] = 10 + actPerArr[4] = 10 + actPerArr[5] = 30 + actPerArr[6] = 10 + actPerArr[7] = 20 + else + actPerArr[1] = 20 + actPerArr[2] = 20 + actPerArr[3] = 20 + actPerArr[4] = 20 + actPerArr[5] = 0 + actPerArr[6] = 20 + actPerArr[7] = 0 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, CrystalAmber271100_Act01) + local local0 = {} + local local1, local2, local3, local4 = nil + local0[1] = Att3000_Dist_max + local0[2] = 0 + local0[3] = 30 + local0[4] = 70 + local0[5] = local1 + local0[6] = local2 + local0[7] = local3 + local0[8] = local4 + defFuncParamTbl[2] = local0 + local0 = {Att3005_Dist_max, 0, 3005, DIST_Middle, nil} + defFuncParamTbl[3] = local0 + actFuncArr[4] = REGIST_FUNC(ai, goal, CrystalAmber271100_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, CrystalAmber271100_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, CrystalAmber271100_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, CrystalAmber271100_Act07) + local atkAfterFunc = REGIST_FUNC(ai, goal, CrystalAmber271100_ActAfter_AdjustSpace) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3002_Dist_max +function CrystalAmber271100_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3002 + local AttDist = DIST_Middle + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, DIST_Middle, 2.5, 5) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3003_Dist_max +function CrystalAmber271100_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3003 + local AttDist = DIST_Middle + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3003, TARGET_ENE_0, DIST_Middle, 2.5, 22) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_max +function CrystalAmber271100_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3006 + local AttDist = DIST_Middle + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, DIST_Middle, 2.5, 37) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3004_Dist_max +function CrystalAmber271100_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3004 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3008_Dist_min +Att3000_Dist_min = Att3008_Dist_max +Att3000_Dist_min = Att3007_Dist_max +function CrystalAmber271100_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if Att3008_Dist_min <= targetDist and fate <= 40 then + local AppDist = Att3008_Dist_max + local DashDist = Att3008_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3008 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + else + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3007 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function CrystalAmber271100_ActAfter_AdjustSpace(ai, goal, paramTbl) + local GW_fate = ai:GetRandam_Int(0, 100) + local bRight = ai:GetRandam_Int(0, 1) + local friendNum = ai:GetTeamRecordCount(COORDINATE_TYPE_SideWalk_L + bRight, TARGET_ENE_0, 2) + if GW_fate > 60 then + if GW_fate <= 65 and friendNum < 2 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 2, TARGET_ENE_0, true, -1) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, bRight, ai:GetRandam_Int(30, 45), true, true, -1) + elseif GW_fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 3, TARGET_ENE_0, true, -1) + elseif GW_fate <= 85 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + else + local fate = ai:GetRandam_Int(1, 100) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + end + end + return +end + +function CrystalAmber271100Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function CrystalAmber271100Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3002_Dist_max +Att3000_Dist_min = Att3007_Dist_max +function CrystalAmber271100Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distGuardBreak_Act = 2 + local oddsGuardBreak_Act = 30 + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + return true + else + local distUseItem_Act = 8 + local oddsUseItem_Act = 25 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if targetDist <= 4.4 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3002_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3007_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + return false + end + end +end + +return diff --git a/scripts_decompiled/273000_battle.lua b/scripts_decompiled/273000_battle.lua new file mode 100644 index 0000000..5c94b79 --- /dev/null +++ b/scripts_decompiled/273000_battle.lua @@ -0,0 +1,287 @@ +REGISTER_GOAL(GOAL_Heroine273000_Battle, "Heroine273000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 3.1 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 1.3 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 3.9 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 1.8 +local Att3004_Dist_min = 4.7 +local Att3004_Dist_max = 5.7 +local Att3005_Dist_min = 4.3 +local Att3005_Dist_max = 5.3 +local Att3006_Dist_min = -0.2 +local Att3006_Dist_max = 0.8 +REGISTER_GOAL_NO_UPDATE(GOAL_Heroine273000_Battle, 1) +function Heroine273000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local targetDistY = ai:GetDistYSigned(TARGET_ENE_0) + local eventNo = ai:GetEventRequest() + local hprate = ai:GetHpRate(TARGET_SELF) + local flag = ai:GetNumber(0) + ai:AddObserveRegion(2, TARGET_ENE_0, 1102700) + ai:AddObserveRegion(3, TARGET_ENE_0, 1102701) + ai:AddObserveRegion(4, TARGET_ENE_0, 1102702) + ai:AddObserveRegion(5, TARGET_ENE_0, 1102703) + ai:AddObserveRegion(6, TARGET_ENE_0, 1102704) + ai:AddObserveRegion(7, TARGET_ENE_0, 1102705) + ai:AddObserveRegion(8, TARGET_ENE_0, 1102706) + ai:AddObserveRegion(9, TARGET_ENE_0, 1102707) + ai:AddObserveRegion(10, TARGET_ENE_0, 1102708) + local Bliz = 0 + if ai:IsFinishTimer(0) == true then + Bliz = 1 + end + if flag == 0 then + actPerArr[7] = 100 + elseif targetDistY < -2 then + actPerArr[8] = 100 + elseif not not ai:IsInsideTargetRegion(TARGET_ENE_0, 1102700) or not not ai:IsInsideTargetRegion(TARGET_ENE_0, 1102701) or not not ai:IsInsideTargetRegion(TARGET_ENE_0, 1102702) or not not ai:IsInsideTargetRegion(TARGET_ENE_0, 1102703) or not not ai:IsInsideTargetRegion(TARGET_ENE_0, 1102704) or not not ai:IsInsideTargetRegion(TARGET_ENE_0, 1102705) or not not ai:IsInsideTargetRegion(TARGET_ENE_0, 1102706) or not not ai:IsInsideTargetRegion(TARGET_ENE_0, 1102707) or ai:IsInsideTargetRegion(TARGET_ENE_0, 1102708) then + actPerArr[8] = 100 + elseif ai:HasSpecialEffectId(TARGET_SELF, 5162) then + if 3.6 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 50 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 50 + actPerArr[6] = 0 + elseif 0.8 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 30 + actPerArr[3] = 0 + actPerArr[4] = 40 + actPerArr[5] = 30 + actPerArr[6] = 0 + else + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 0 + actPerArr[4] = 35 + actPerArr[5] = 0 + actPerArr[6] = 65 + end + elseif 4.4 <= targetDist then + actPerArr[1] = 30 + actPerArr[2] = 20 + actPerArr[3] = 30 + actPerArr[4] = 0 + actPerArr[5] = 20 + actPerArr[6] = 0 + elseif 4 <= targetDist then + actPerArr[1] = 10 + actPerArr[2] = 25 + actPerArr[3] = 40 + actPerArr[4] = 0 + actPerArr[5] = 25 + actPerArr[6] = 0 + elseif 3.6 <= targetDist then + actPerArr[1] = 10 + actPerArr[2] = 30 + actPerArr[3] = 10 + actPerArr[4] = 0 + actPerArr[5] = 30 + actPerArr[6] = 0 + actPerArr[7] = 20 * Bliz + elseif 0.8 <= targetDist then + actPerArr[1] = 5 + actPerArr[2] = 35 + actPerArr[3] = 5 + actPerArr[4] = 0 + actPerArr[5] = 35 + actPerArr[6] = 0 + actPerArr[7] = 10 * Bliz + else + actPerArr[1] = 5 + actPerArr[2] = 25 + actPerArr[3] = 5 + actPerArr[4] = 0 + actPerArr[5] = 30 + actPerArr[6] = 25 + actPerArr[7] = 10 * Bliz + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Heroine273000_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Heroine273000_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, Heroine273000_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, Heroine273000_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, Heroine273000_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, Heroine273000_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, Heroine273000_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, Heroine273000_Act08) + local local0 = {0, 70, 0, 30, 0, 0} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3004_Dist_max +function Heroine273000_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local DashDist = Att3004_Dist_max + 100 + local AppDist = Att3004_Dist_max + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3004, TARGET_ENE_0, DIST_Middle, 3, 30) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3000_Dist_max +function Heroine273000_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local DashDist = Att3000_Dist_max + 100 + local AppDist = Att3000_Dist_max + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(30, 60) + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 15, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 15, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 15, 3001, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3005_Dist_max +function Heroine273000_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local DashDist = Att3005_Dist_max + 100 + local AppDist = Att3005_Dist_max + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 15, 3005, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3005_Dist_max +function Heroine273000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local DashDist = Att3005_Dist_max + 0 + local AppDist = Att3005_Dist_max + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 4, TARGET_ENE_0, 3.6, TARGET_ENE_0, true, -1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3002_Dist_max +function Heroine273000_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local DashDist = Att3002_Dist_max + 100 + local AppDist = Att3002_Dist_max + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(30, 60) + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 15, 3002, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 15, 3002, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 15, 3003, TARGET_ENE_0, DIST_Near, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_max +function Heroine273000_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local DashDist = Att3006_Dist_max + 100 + local AppDist = Att3006_Dist_max + local Odds_Guard = 0 + goal:AddSubGoal(GOAL_COMMON_Attack, 15, 3006, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Heroine273000_Act07(ai, goal, paramTbl) + local flag = ai:GetNumber(0) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 15, 3007, TARGET_ENE_0, DIST_Middle, 0, -1) + ai:SetNumber(0, 1) + ai:SetTimer(0, 60) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Heroine273000_Act08(ai, goal, paramTbl) + if ai:IsInsideTargetRegion(TARGET_SELF, 1102760) then + ai:SetEventMoveTarget(1102750) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 4, POINT_EVENT, 0, TARGET_ENE_0, True, -1) + goal:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_ENE_0) + elseif ai:IsInsideTargetRegion(TARGET_SELF, 1102761) then + ai:SetEventMoveTarget(1102751) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 4, POINT_EVENT, 0, TARGET_ENE_0, True, -1) + goal:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_ENE_0) + else + ai:SetEventMoveTarget(1102752) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 4, POINT_EVENT, 0, TARGET_ENE_0, True, -1) + goal:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_ENE_0) + end + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Heroine273000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Heroine273000Battle_Terminate(ai, goal) + return +end + +function Heroine273000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local flag = ai:GetNumber(0) + if ai:IsInterupt(INTERUPT_Inside_ObserveArea) and ai:IsFinishTimer(2) == true then + if ai:IsInsideTargetRegion(TARGET_SELF, 1102760) then + goal:ClearSubGoal() + ai:SetTimer(2, 1) + ai:SetEventMoveTarget(1102750) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 4, POINT_EVENT, 0, TARGET_ENE_0, True, -1) + goal:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_ENE_0) + return true + elseif ai:IsInsideTargetRegion(TARGET_SELF, 1102761) then + goal:ClearSubGoal() + ai:SetTimer(2, 1) + ai:SetEventMoveTarget(1102751) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 4, POINT_EVENT, 0, TARGET_ENE_0, True, -1) + goal:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_ENE_0) + return true + else + goal:ClearSubGoal() + ai:SetTimer(2, 1) + ai:SetEventMoveTarget(1102752) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 4, POINT_EVENT, 0, TARGET_ENE_0, True, -1) + goal:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_ENE_0) + return true + end + elseif ai:IsInterupt(INTERUPT_Damaged) and ai:IsFinishTimer(0) == true then + if fate <= 10 and not ai:HasSpecialEffectId(TARGET_SELF, 5162) then + goal:AddSubGoal(GOAL_COMMON_Attack, 15, 3007, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + local distGuardBreak_Act = 3.6 + local oddsGuardBreak_Act = 40 + local targetDist = ai:GetDist(TARGET_ENE_0) + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + end + local distUseItem_Act = 3.6 + local oddsUseItem_Act = 15 + local targetDist = ai:GetDist(TARGET_ENE_0) + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + end + return false +end + +return diff --git a/scripts_decompiled/278000_battle.lua b/scripts_decompiled/278000_battle.lua new file mode 100644 index 0000000..babe183 --- /dev/null +++ b/scripts_decompiled/278000_battle.lua @@ -0,0 +1,251 @@ +REGISTER_GOAL(GOAL_Mimic278000_Battle, "Mimic278000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 4.2 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 6.1 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 4.5 +local Att3003_Dist_min = 5 +local Att3003_Dist_max = 9.8 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 2.7 +REGISTER_GOAL_NO_UPDATE(GOAL_Mimic278000_Battle, 1) +function Mimic278000Battle_Activate(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local EventNo = ai:GetEventRequest() + local Act00Per = 0 + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act08Per = 0 + local Act09Per = 0 + local Act10Per = 0 + local GetWellSpace_Odds = 0 + if ai:HasSpecialEffectId(TARGET_SELF, 5420) then + if EventNo == 210 then + Act05Per = 100 + elseif 10 <= targetDist then + Act00Per = 10 + Act01Per = 10 + Act02Per = 20 + Act03Per = 50 + Act04Per = 10 + GetWellSpace_Odds = 100 + elseif 5 <= targetDist then + Act00Per = 20 + Act01Per = 20 + Act02Per = 20 + Act03Per = 30 + Act04Per = 10 + GetWellSpace_Odds = 100 + elseif 2.5 <= targetDist then + Act00Per = 20 + Act01Per = 40 + Act02Per = 20 + Act03Per = 0 + Act04Per = 20 + GetWellSpace_Odds = 100 + else + Act00Per = 40 + Act01Per = 20 + Act02Per = 10 + Act03Per = 0 + Act04Per = 30 + GetWellSpace_Odds = 100 + end + elseif ai:HasSpecialEffectId(TARGET_SELF, 5421) then + if EventNo == 200 then + Act09Per = 100 + elseif EventNo == 10 then + Act06Per = 100 + elseif EventNo == 100 then + Act10Per = 100 + else + Act07Per = 100 + end + elseif ai:HasSpecialEffectId(TARGET_SELF, 5422) then + if EventNo == 100 then + Act10Per = 100 + elseif EventNo == 201 then + Act08Per = 100 + else + Act07Per = 100 + end + elseif ai:HasSpecialEffectId(TARGET_SELF, 5423) then + if EventNo == 100 then + Act10Per = 100 + elseif EventNo == 211 then + Act08Per = 100 + else + Act07Per = 100 + end + else + goal:AddSubGoal(GOAL_COMMON_Wait, 10000, TARGET_SELF, 0, 0, 0) + end + local fateAct = ai:GetRandam_Int(1, Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per) + if fateAct <= Act00Per then + Mimic278000_Act00(ai, goal) + elseif fateAct <= Act00Per + Act01Per then + Mimic278000_Act01(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per then + Mimic278000_Act02(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per then + Mimic278000_Act03(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per then + Mimic278000_Act04(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + Mimic278000_Act05(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + Mimic278000_Act06(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + Mimic278000_Act07(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per then + Mimic278000_Act08(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per then + Mimic278000_Act09(ai, goal) + else + Mimic278000_Act10(ai, goal) + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + local Odds_Guard = 0 + local Odds_NoAct = 60 + local Odds_BackAndSide = 5 + local Odds_Back = 5 + local Odds_BitWait = 0 + local Odds_Backstep = 30 + GetWellSpace_Act(ai, goal, Odds_Guard, Odds_NoAct, Odds_BackAndSide, Odds_Back, Odds_BitWait, Odds_Backstep) + end + return +end + +Att3000_Dist_min = Att3000_Dist_max +function Mimic278000_Act00(ai, goal) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3000 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + return +end + +Att3000_Dist_min = Att3001_Dist_max +function Mimic278000_Act01(ai, goal) + local AppDist = Att3001_Dist_max + local DashDist = Att3001_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3001 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + return +end + +Att3000_Dist_min = Att3002_Dist_max +function Mimic278000_Act02(ai, goal) + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3002 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + return +end + +Att3000_Dist_min = Att3003_Dist_max +function Mimic278000_Act03(ai, goal) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3003 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + return +end + +Att3000_Dist_min = Att3004_Dist_max +function Mimic278000_Act04(ai, goal) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3004 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + return +end + +function Mimic278000_Act05(ai, goal) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_SELF, DIST_None, 0) + return +end + +function Mimic278000_Act06(ai, goal) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, DIST_None, 0, -1) + return +end + +function Mimic278000_Act07(ai, goal) + goal:AddSubGoal(GOAL_COMMON_Wait, 300, TARGET_SELF, 0, 0, 0) + return +end + +function Mimic278000_Act08(ai, goal) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_SELF, DIST_None, 0) + return +end + +function Mimic278000_Act09(ai, goal) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_SELF, DIST_None, 0) + return +end + +function Mimic278000_Act10(ai, goal) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3001, TARGET_SELF, DIST_None, 0) + return +end + +function Mimic278000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Mimic278000Battle_Terminate(ai, goal) + return +end + +function Mimic278000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if ai:HasSpecialEffectId(TARGET_SELF, 5420) then + local distDamagedStep = 3 + local oddsDamagedStep = 10 + local bkStepPer = 50 + local leftStepPer = 25 + local rightStepPer = 25 + local safetyDist = 3 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + end + local distGuardBreak_Act = 4.2 + local oddsGuardBreak_Act = 50 + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/279000_battle.lua b/scripts_decompiled/279000_battle.lua new file mode 100644 index 0000000..d1a1719 --- /dev/null +++ b/scripts_decompiled/279000_battle.lua @@ -0,0 +1,251 @@ +REGISTER_GOAL(GOAL_BlackKnight_Sword279000_Battle, "BlackKnight_Sword279000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 3.2 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 2.7 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 1.6 +local Att3007_Dist_min = 4.1 +local Att3007_Dist_max = 6.2 +REGISTER_GOAL_NO_UPDATE(GOAL_BlackKnight_Sword279000_Battle, 1) +function BlackKnight_Sword279000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest() + local MoveAttackOdds = 1 + if not not ai:IsRideEdgeFlag(TARGET_SELF) or ai:IsRideEdgeFlag(TARGET_ENE_0) then + MoveAttackOdds = 0 + end + if ai:IsTargetGuard(TARGET_ENE_0) == true then + if 8 <= targetDist then + actPerArr[4] = 20 + elseif 4.1 <= targetDist then + actPerArr[4] = 80 + else + actPerArr[4] = 150 + end + end + if 8 <= targetDist then + actPerArr[1] = 5 + actPerArr[2] = 5 + actPerArr[5] = 90 * MoveAttackOdds + elseif 4.1 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 45 + actPerArr[5] = 35 * MoveAttackOdds + actPerArr[6] = 5 + elseif 1.7 <= targetDist then + actPerArr[1] = 30 + actPerArr[2] = 45 + actPerArr[5] = 0 + actPerArr[6] = 25 + else + actPerArr[1] = 20 + actPerArr[2] = 35 + actPerArr[5] = 0 + actPerArr[6] = 45 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, BlackKnight_Sword279000_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, BlackKnight_Sword279000_Act02) + actFuncArr[4] = REGIST_FUNC(ai, goal, BlackKnight_Sword279000_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, BlackKnight_Sword279000_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, BlackKnight_Sword279000_Act06) + local atkAfterFunc = REGIST_FUNC(ai, goal, BlackKnight_Sword279000_ActAfter_AdjustSpace) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3005_Dist_max +function BlackKnight_Sword279000_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 75 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3005, TARGET_ENE_0, DIST_Middle, -1, 25) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3000_Dist_max +function BlackKnight_Sword279000_Act02(ai, goal, paramTbl) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 75 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + local fate = ai:GetRandam_Int(1, 100) + if fate <= 25 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 25) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 25) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 25) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_max +function BlackKnight_Sword279000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 75 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_GuardBreakTunable, 10, 3006, TARGET_ENE_0, DIST_Middle, -1, 25) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3007_Dist_max +function BlackKnight_Sword279000_Act05(ai, goal, paramTbl) + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 75 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function BlackKnight_Sword279000_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = 1.5 + local DashDist = 3.5 + local Odds_Guard = 75 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Turn, 3, TARGET_ENE_0, 45, 0, 0) + if fate <= 25 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3004, TARGET_ENE_0, DIST_Middle, -1, 30) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3007, TARGET_ENE_0, DIST_Middle, -1, 60) + end + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function BlackKnight_Sword279000_ActAfter_AdjustSpace(ai, goal, paramTbl) + local GW_fate = ai:GetRandam_Int(0, 100) + local bRight = ai:GetRandam_Int(0, 1) + local friendNum = ai:GetTeamRecordCount(COORDINATE_TYPE_SideWalk_L + bRight, TARGET_ENE_0, 2) + if GW_fate <= 20 and friendNum < 2 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 2, TARGET_ENE_0, true, 9910) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, bRight, ai:GetRandam_Int(30, 45), true, true, 9910) + elseif GW_fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 3, TARGET_ENE_0, true, 9910) + elseif GW_fate <= 37 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + elseif GW_fate <= 45 then + local fate = ai:GetRandam_Int(1, 100) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + end + return +end + +function BlackKnight_Sword279000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function BlackKnight_Sword279000Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function BlackKnight_Sword279000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distResponse = 3 + local oddsResponse = 25 + local oddsStep = 30 + local bkStepPer = 60 + local leftStepPer = 20 + local rightStepPer = 20 + local safetyDist = 3.5 + local oddsLeaveAndSide = 50 + local oddsSideAndLeave = 25 + local timeSide = 4.5 + local distLeave = 2.5 + if Damaged_Step_or_Guard(ai, goal, distResponse, oddsResponse, oddsStep, bkStepPer, leftStepPer, rightStepPer, safetyDist, oddsLeaveAndSide, oddsSide, oddsSideAndLeave, timeSide, distLeave) then + return true + else + local distMissSwing_Int = 2.7 + local oddsMissSwing_Int = 30 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distUseItem_Act = 6.2 + local oddsUseItem_Act = 60 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if targetDist <= 4 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + elseif not ai:IsRideEdgeFlag(TARGET_SELF) and not ai:IsRideEdgeFlag(TARGET_ENE_0) then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distResNear = 6 + local distResFar = 18 + local oddsResNear = 40 + local oddsResFar = 50 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + return true + elseif ResBehavID == 2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + elseif fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + else + local oddsResponse = 35 + local bkStepPer = 60 + local leftStepPer = 20 + local rightStepPer = 20 + local safetyDist = 3.5 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end + end + end + end + end +end + +return diff --git a/scripts_decompiled/279001_battle.lua b/scripts_decompiled/279001_battle.lua new file mode 100644 index 0000000..b288055 --- /dev/null +++ b/scripts_decompiled/279001_battle.lua @@ -0,0 +1,331 @@ +REGISTER_GOAL(GOAL_BlackKnight_Lar_Sw279001_Battle, "BlackKnight_Lar_Sw279001Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 3.6 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 4.1 +local Att3007_Dist_min = 1.6 +local Att3007_Dist_max = 3.7 +local Att3010_Dist_min = 6.5 +local Att3010_Dist_max = 8.3 +local Att3011_Dist_min = 4.4 +local Att3011_Dist_max = 6.7 +local Att3012_Dist_min = 0 +local Att3012_Dist_max = 1.7 +local Att3013_Dist_min = 0 +local Att3013_Dist_max = 3 +local Att3014_Dist_min = 0 +local Att3014_Dist_max = 3 +REGISTER_GOAL_NO_UPDATE(GOAL_BlackKnight_Lar_Sw279001_Battle, 1) +Att3000_Dist_min = Att3011_Dist_max +function BlackKnight_Lar_Sw279001Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest() + local MoveAttackOdds = 1 + if not not ai:IsRideEdgeFlag(TARGET_SELF) or ai:IsRideEdgeFlag(TARGET_ENE_0) then + MoveAttackOdds = 0 + end + if ai:IsTargetGuard(TARGET_ENE_0) == true then + if 7 <= targetDist then + actPerArr[4] = 20 + elseif 3 <= targetDist then + actPerArr[4] = 80 + else + actPerArr[4] = 150 + end + end + if 6.7 <= targetDist then + actPerArr[1] = 25 * MoveAttackOdds + actPerArr[2] = 10 + actPerArr[3] = 24 * MoveAttackOdds + actPerArr[5] = 10 + actPerArr[6] = 10 + actPerArr[7] = 10 + actPerArr[8] = 5 + elseif 4.4 <= targetDist then + actPerArr[1] = 0 * MoveAttackOdds + actPerArr[2] = 15 + actPerArr[3] = 15 * MoveAttackOdds + actPerArr[5] = 15 + actPerArr[6] = 20 + actPerArr[7] = 15 + actPerArr[8] = 10 + elseif 3 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 15 + actPerArr[3] = 0 + actPerArr[5] = 15 + actPerArr[6] = 25 + actPerArr[7] = 15 + actPerArr[8] = 15 + else + actPerArr[1] = 0 + actPerArr[2] = 20 + actPerArr[3] = 0 + actPerArr[5] = 15 + actPerArr[6] = 15 + actPerArr[7] = 20 + actPerArr[8] = 20 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, BlackKnight_Lar_Sw279001_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, BlackKnight_Lar_Sw279001_Act02) + local local0 = {Att3011_Dist_max, 75, 3011, DIST_Middle} + defFuncParamTbl[3] = local0 + actFuncArr[4] = REGIST_FUNC(ai, goal, BlackKnight_Lar_Sw279001_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, BlackKnight_Lar_Sw279001_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, BlackKnight_Lar_Sw279001_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, BlackKnight_Lar_Sw279001_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, BlackKnight_Lar_Sw279001_Act08) + local atkAfterFunc = REGIST_FUNC(ai, goal, BlackKnight_Lar_Sw279001_ActAfter_AdjustSpace) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3010_Dist_max +function BlackKnight_Lar_Sw279001_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3010_Dist_max + local DashDist = Att3010_Dist_max + 2 + local Odds_Guard = 75 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3010, TARGET_ENE_0, DIST_Middle, -1, 30) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3000_Dist_max +function BlackKnight_Lar_Sw279001_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 75 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 75 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + if fate2 <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 60) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + elseif fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 60) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 60) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + end + elseif fate <= 70 then + if fate2 <= 33 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 60) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + elseif fate2 <= 66 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 60) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 60) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3008, TARGET_ENE_0, DIST_Middle, 0) + end + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 60) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 60) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3012_Dist_max +function BlackKnight_Lar_Sw279001_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3012_Dist_max + local DashDist = Att3012_Dist_max + 2 + local Odds_Guard = 75 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_GuardBreakTunable, 10, 3012, TARGET_ENE_0, DIST_Middle, -1, 25) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3014, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3007_Dist_max +function BlackKnight_Lar_Sw279001_Act05(ai, goal, paramTbl) + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 75 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3005_Dist_max +function BlackKnight_Lar_Sw279001_Act06(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 75 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3005, TARGET_ENE_0, DIST_Middle, -1, 60) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + elseif fate2 <= 33 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3005, TARGET_ENE_0, DIST_Middle, -1, 60) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + elseif fate2 <= 66 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3005, TARGET_ENE_0, DIST_Middle, -1, 60) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3005, TARGET_ENE_0, DIST_Middle, -1, 60) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3008, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3013_Dist_max +function BlackKnight_Lar_Sw279001_Act07(ai, goal, paramTbl) + local AppDist = Att3013_Dist_max + local DashDist = Att3013_Dist_max + 2 + local Odds_Guard = 75 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3013, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3014_Dist_max +function BlackKnight_Lar_Sw279001_Act08(ai, goal, paramTbl) + local AppDist = Att3014_Dist_max + local DashDist = Att3014_Dist_max + 2 + local Odds_Guard = 75 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3014, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function BlackKnight_Lar_Sw279001_ActAfter_AdjustSpace(ai, goal, paramTbl) + local GW_fate = ai:GetRandam_Int(0, 100) + local bRight = ai:GetRandam_Int(0, 1) + local friendNum = ai:GetTeamRecordCount(COORDINATE_TYPE_SideWalk_L + bRight, TARGET_ENE_0, 2) + if GW_fate <= 20 and friendNum < 2 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 2, TARGET_ENE_0, true, 9910) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, bRight, ai:GetRandam_Int(30, 45), true, true, 9910) + elseif GW_fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 3, TARGET_ENE_0, true, 9910) + elseif GW_fate <= 37 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + elseif GW_fate <= 45 then + local fate = ai:GetRandam_Int(1, 100) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + end + return +end + +function BlackKnight_Lar_Sw279001Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function BlackKnight_Lar_Sw279001Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3005_Dist_max +function BlackKnight_Lar_Sw279001Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distResponse = 3 + local oddsResponse = 25 + local oddsStep = 30 + local bkStepPer = 60 + local leftStepPer = 20 + local rightStepPer = 20 + local safetyDist = 3.5 + local oddsLeaveAndSide = 50 + local oddsSideAndLeave = 25 + local timeSide = 4.5 + local distLeave = 2.5 + if Damaged_Step_or_Guard(ai, goal, distResponse, oddsResponse, oddsStep, bkStepPer, leftStepPer, rightStepPer, safetyDist, oddsLeaveAndSide, oddsSide, oddsSideAndLeave, timeSide, distLeave) then + return true + else + local distMissSwing_Int = 3.6 + local oddsMissSwing_Int = 30 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distUseItem_Act = 8.3 + local oddsUseItem_Act = 60 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if targetDist <= 6.4 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3005_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + elseif not ai:IsRideEdgeFlag(TARGET_SELF) and not ai:IsRideEdgeFlag(TARGET_ENE_0) then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3010, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distResNear = 6 + local distResFar = 18 + local oddsResNear = 40 + local oddsResFar = 50 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + return true + elseif ResBehavID == 2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + elseif fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + else + local oddsResponse = 30 + local bkStepPer = 60 + local leftStepPer = 20 + local rightStepPer = 20 + local safetyDist = 3.5 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end + end + end + end + end +end + +return diff --git a/scripts_decompiled/279002_battle.lua b/scripts_decompiled/279002_battle.lua new file mode 100644 index 0000000..3d4f8a3 --- /dev/null +++ b/scripts_decompiled/279002_battle.lua @@ -0,0 +1,296 @@ +REGISTER_GOAL(GOAL_BlackKnight_Ax279002_Battle, "BlackKnight_Ax279002Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 3.2 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 2.5 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 2.5 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 1.6 +local Att3008_Dist_min = 3.6 +local Att3008_Dist_max = 4.2 +local Att3009_Dist_min = 5.3 +local Att3009_Dist_max = 6 +local Att3010_Dist_min = 4.2 +local Att3010_Dist_max = 6 +local Att3011_Dist_min = 5.3 +local Att3011_Dist_max = 2.3 +REGISTER_GOAL_NO_UPDATE(GOAL_BlackKnight_Ax279002_Battle, 1) +Att3000_Dist_min = Att3009_Dist_max +Att3000_Dist_min = Att3005_Dist_max +function BlackKnight_Ax279002Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest() + local MoveAttackOdds = 1 + if not not ai:IsRideEdgeFlag(TARGET_SELF) or ai:IsRideEdgeFlag(TARGET_ENE_0) then + MoveAttackOdds = 0 + end + if ai:IsTargetGuard(TARGET_ENE_0) == true then + if 7 <= targetDist then + actPerArr[4] = 20 + elseif 3 <= targetDist then + actPerArr[4] = 80 + else + actPerArr[4] = 150 + end + end + if 5.3 <= targetDist then + actPerArr[1] = 15 * MoveAttackOdds + actPerArr[2] = 5 + actPerArr[3] = 50 * MoveAttackOdds + actPerArr[5] = 5 + actPerArr[6] = 25 * MoveAttackOdds + actPerArr[7] = 0 + actPerArr[9] = 5 + elseif 4.2 <= targetDist then + actPerArr[1] = 20 * MoveAttackOdds + actPerArr[2] = 5 + actPerArr[3] = 25 * MoveAttackOdds + actPerArr[5] = 5 + actPerArr[6] = 30 * MoveAttackOdds + actPerArr[7] = 5 + actPerArr[9] = 5 + elseif 3.6 <= targetDist then + actPerArr[1] = 40 * MoveAttackOdds + actPerArr[2] = 15 + actPerArr[3] = 0 * MoveAttackOdds + actPerArr[5] = 15 + actPerArr[6] = 0 * MoveAttackOdds + actPerArr[7] = 5 + actPerArr[9] = 15 + else + actPerArr[1] = 0 + actPerArr[2] = 25 + actPerArr[3] = 0 + actPerArr[5] = 15 + actPerArr[6] = 0 + actPerArr[7] = 20 + actPerArr[9] = 25 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, BlackKnight_Ax279002_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, BlackKnight_Ax279002_Act02) + local local0 = {Att3009_Dist_max, 75, 3009, DIST_Middle} + defFuncParamTbl[3] = local0 + actFuncArr[4] = REGIST_FUNC(ai, goal, BlackKnight_Ax279002_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, BlackKnight_Ax279002_Act05) + local0 = {} + local local1, local2 = nil + local0[1] = Att3005_Dist_max + local0[2] = 75 + local0[3] = 20 + local0[4] = 80 + local0[5] = 3005 + local0[6] = 3007 + local0[7] = local1 + local0[8] = local2 + defFuncParamTbl[9] = local0 + actFuncArr[6] = REGIST_FUNC(ai, goal, BlackKnight_Ax279002_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, BlackKnight_Ax279002_Act07) + local atkAfterFunc = REGIST_FUNC(ai, goal, BlackKnight_Ax279002_ActAfter_AdjustSpace) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3008_Dist_max +function BlackKnight_Ax279002_Act01(ai, goal, paramTbl) + local AppDist = Att3008_Dist_max + local DashDist = Att3008_Dist_max + 2 + local Odds_Guard = 75 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3008, TARGET_ENE_0, DIST_Middle, -1, 30) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3000_Dist_max +function BlackKnight_Ax279002_Act02(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 75 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 60) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 60) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 60) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_max +function BlackKnight_Ax279002_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 75 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_GuardBreakTunable, 10, 3006, TARGET_ENE_0, DIST_Middle, -1, 25) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3004_Dist_max +function BlackKnight_Ax279002_Act05(ai, goal, paramTbl) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 75 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3004, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3010_Dist_max +function BlackKnight_Ax279002_Act06(ai, goal, paramTbl) + local AppDist = Att3010_Dist_max + local DashDist = Att3010_Dist_max + 2 + local Odds_Guard = 75 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3010, TARGET_ENE_0, DIST_Middle, -1, 30) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3011_Dist_max +function BlackKnight_Ax279002_Act07(ai, goal, paramTbl) + local AppDist = Att3011_Dist_max + local DashDist = Att3011_Dist_max + 2 + local Odds_Guard = 75 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3011, TARGET_ENE_0, DIST_Middle, -1, 30) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function BlackKnight_Ax279002_ActAfter_AdjustSpace(ai, goal, paramTbl) + local GW_fate = ai:GetRandam_Int(0, 100) + local bRight = ai:GetRandam_Int(0, 1) + local friendNum = ai:GetTeamRecordCount(COORDINATE_TYPE_SideWalk_L + bRight, TARGET_ENE_0, 2) + if GW_fate <= 30 and friendNum < 2 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 2, TARGET_ENE_0, true, 9910) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, bRight, ai:GetRandam_Int(30, 45), true, true, 9910) + elseif GW_fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 3, TARGET_ENE_0, true, 9910) + elseif GW_fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + else + local fate = ai:GetRandam_Int(1, 100) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + end + return +end + +function BlackKnight_Ax279002Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function BlackKnight_Ax279002Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function BlackKnight_Ax279002Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distResponse = 3 + local oddsResponse = 25 + local oddsStep = 30 + local bkStepPer = 60 + local leftStepPer = 20 + local rightStepPer = 20 + local safetyDist = 3.5 + local oddsLeaveAndSide = 50 + local oddsSideAndLeave = 25 + local timeSide = 4.5 + local distLeave = 2.5 + if Damaged_Step_or_Guard(ai, goal, distResponse, oddsResponse, oddsStep, bkStepPer, leftStepPer, rightStepPer, safetyDist, oddsLeaveAndSide, oddsSide, oddsSideAndLeave, timeSide, distLeave) then + return true + else + local distMissSwing_Int = 2.5 + local oddsMissSwing_Int = 35 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distUseItem_Act = 6.9 + local oddsUseItem_Act = 55 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if targetDist <= 5.2 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + elseif not ai:IsRideEdgeFlag(TARGET_SELF) and not ai:IsRideEdgeFlag(TARGET_ENE_0) then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distResNear = 6 + local distResFar = 18 + local oddsResNear = 0 + local oddsResFar = 50 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + return true + elseif ResBehavID == 2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + elseif fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + else + local oddsResponse = 35 + local bkStepPer = 60 + local leftStepPer = 20 + local rightStepPer = 20 + local safetyDist = 3.5 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distSuccessGuard_Act = 2.5 + local oddsSuccessGuard_Act = 70 + if SuccessGuard_Act(ai, goal, distSuccessGuard_Act, oddsSuccessGuard_Act) then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + return false + end + end + end + end + end + end +end + +return diff --git a/scripts_decompiled/279003_battle.lua b/scripts_decompiled/279003_battle.lua new file mode 100644 index 0000000..12ad316 --- /dev/null +++ b/scripts_decompiled/279003_battle.lua @@ -0,0 +1,288 @@ +REGISTER_GOAL(GOAL_BlackKnight_Spear279003_Battle, "BlackKnight_Spear279003Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 2.5 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 2.6 +local Att3004_Dist_min = 3.3 +local Att3004_Dist_max = 4.9 +local Att3005_Dist_min = 5.9 +local Att3005_Dist_max = 7.5 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 1.3 +local Att3008_Dist_min = 0 +local Att3008_Dist_max = 2.2 +local Att3010_Dist_min = 2.6 +local Att3010_Dist_max = 3.5 +local Att3012_Dist_min = 0 +local Att3012_Dist_max = 2.8 +local Att3013_Dist_min = 4.7 +local Att3013_Dist_max = 5.7 +REGISTER_GOAL_NO_UPDATE(GOAL_BlackKnight_Spear279003_Battle, 1) +Att3000_Dist_min = Att3004_Dist_max +Att3000_Dist_min = Att3003_Dist_max +Att3000_Dist_min = Att3006_Dist_max +Att3000_Dist_min = Att3008_Dist_max +function BlackKnight_Spear279003Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest() + local MoveAttackOdds = 1 + if not not ai:IsRideEdgeFlag(TARGET_SELF) or ai:IsRideEdgeFlag(TARGET_ENE_0) then + MoveAttackOdds = 0 + end + if ai:IsTargetGuard(TARGET_ENE_0) == true then + if 7 <= targetDist then + actPerArr[4] = 20 + elseif 3 <= targetDist then + actPerArr[4] = 80 + else + actPerArr[4] = 150 + end + end + if 5.9 <= targetDist then + actPerArr[1] = 25 * MoveAttackOdds + actPerArr[2] = 10 + actPerArr[3] = 5 + actPerArr[5] = 25 * MoveAttackOdds + actPerArr[6] = 5 * MoveAttackOdds + actPerArr[7] = 0 + actPerArr[8] = 15 * MoveAttackOdds + actPerArr[9] = 5 + elseif 4.7 <= targetDist then + actPerArr[1] = 20 * MoveAttackOdds + actPerArr[2] = 15 + actPerArr[3] = 5 + actPerArr[5] = 15 * MoveAttackOdds + actPerArr[6] = 5 * MoveAttackOdds + actPerArr[7] = 0 + actPerArr[8] = 30 * MoveAttackOdds + actPerArr[9] = 5 + elseif 3.3 <= targetDist then + actPerArr[1] = 15 * MoveAttackOdds + actPerArr[2] = 15 + actPerArr[3] = 15 + actPerArr[5] = 0 * MoveAttackOdds + actPerArr[6] = 15 * MoveAttackOdds + actPerArr[7] = 15 + actPerArr[8] = 0 * MoveAttackOdds + actPerArr[9] = 15 + else + actPerArr[1] = 0 * MoveAttackOdds + actPerArr[2] = 20 + actPerArr[3] = 15 + actPerArr[5] = 0 * MoveAttackOdds + actPerArr[6] = 20 * MoveAttackOdds + actPerArr[7] = 20 + actPerArr[8] = 0 * MoveAttackOdds + actPerArr[9] = 15 + end + local myThinkId = ai:GetNpcThinkParamID() + if myThinkId == 279003 then + actPerArr[6] = 0 + actPerArr[9] = 0 + end + local local0 = {Att3004_Dist_max, 75, 3004, DIST_Middle} + defFuncParamTbl[1] = local0 + actFuncArr[2] = REGIST_FUNC(ai, goal, BlackKnight_Spear279003_Act02) + local0 = {Att3003_Dist_max, 75, 3003, DIST_Middle} + defFuncParamTbl[3] = local0 + local Att2nd = 3010 + if myThinkId == 279003 then + Att2nd = 3003 + end + local local1 = {Att3006_Dist_max, 75, 3006, DIST_Middle, Att2nd, DIST_Middle, nil} + defFuncParamTbl[4] = local1 + actFuncArr[5] = REGIST_FUNC(ai, goal, BlackKnight_Spear279003_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, BlackKnight_Spear279003_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, BlackKnight_Spear279003_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, BlackKnight_Spear279003_Act08) + local1 = {Att3008_Dist_max, 75, 30, 60, 3008, 3009, 3011, nil} + defFuncParamTbl[9] = local1 + local atkAfterFunc = REGIST_FUNC(ai, goal, BlackKnight_Spear279003_ActAfter_AdjustSpace) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function BlackKnight_Spear279003_Act02(ai, goal, paramTbl) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 90 + local fate = ai:GetRandam_Int(1, 100) + local Odds_Com1 = 30 + local Odds_Com2 = 30 + local Odds_Com3 = 40 + local myThinkId = ai:GetNpcThinkParamID() + if myThinkId == 279003 then + Odds_Com3 = 0 + end + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + local fate_Com = ai:GetRandam_Int(1, Odds_Com1 + Odds_Com2 + Odds_Com3) + if fate_Com <= Odds_Com1 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + elseif fate_Com <= Odds_Com1 + Odds_Com2 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3005_Dist_max +function BlackKnight_Spear279003_Act05(ai, goal, paramTbl) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 100 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3010_Dist_max +function BlackKnight_Spear279003_Act06(ai, goal, paramTbl) + local AppDist = Att3010_Dist_max + local DashDist = Att3010_Dist_max + 2 + local Odds_Guard = 50 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3010, TARGET_ENE_0, DIST_Middle, -1, 70) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3012_Dist_max +function BlackKnight_Spear279003_Act07(ai, goal, paramTbl) + local AppDist = Att3012_Dist_max + local DashDist = Att3012_Dist_max + 2 + local Odds_Guard = 50 + local AttID = 3012 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3012, TARGET_ENE_0, DIST_Middle, -1, 50) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3013_Dist_max +function BlackKnight_Spear279003_Act08(ai, goal, paramTbl) + local AppDist = Att3013_Dist_max + local DashDist = Att3013_Dist_max + 2 + local Odds_Guard = 50 + local AttID = 3013 + local AttDist = DIST_Middle + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3013, TARGET_ENE_0, DIST_Middle, -1, 30) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function BlackKnight_Spear279003_ActAfter_AdjustSpace(ai, goal, paramTbl) + local GW_fate = ai:GetRandam_Int(0, 100) + local bRight = ai:GetRandam_Int(0, 1) + local friendNum = ai:GetTeamRecordCount(COORDINATE_TYPE_SideWalk_L + bRight, TARGET_ENE_0, 2) + if GW_fate <= 40 and friendNum < 2 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 2, TARGET_ENE_0, true, 9910) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, bRight, ai:GetRandam_Int(30, 45), true, true, 9910) + elseif GW_fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 3, TARGET_ENE_0, true, 9910) + elseif GW_fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + elseif GW_fate <= 75 then + local fate = ai:GetRandam_Int(1, 100) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + end + return +end + +function BlackKnight_Spear279003Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function BlackKnight_Spear279003Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function BlackKnight_Spear279003Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distResponse = 3 + local oddsResponse = 25 + local oddsStep = 30 + local bkStepPer = 60 + local leftStepPer = 20 + local rightStepPer = 20 + local safetyDist = 3.5 + local oddsLeaveAndSide = 50 + local oddsSideAndLeave = 25 + local timeSide = 4.5 + local distLeave = 2.5 + if Damaged_Step_or_Guard(ai, goal, distResponse, oddsResponse, oddsStep, bkStepPer, leftStepPer, rightStepPer, safetyDist, oddsLeaveAndSide, oddsSide, oddsSideAndLeave, timeSide, distLeave) then + return true + else + local distMissSwing_Int = 2.5 + local oddsMissSwing_Int = 35 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + return true + else + local distUseItem_Act = 7.5 + local oddsUseItem_Act = 55 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if targetDist <= 5.8 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + elseif not ai:IsRideEdgeFlag(TARGET_SELF) and not ai:IsRideEdgeFlag(TARGET_ENE_0) then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distResNear = 6 + local distResFar = 18 + local oddsResNear = 40 + local oddsResFar = 100 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + return true + elseif ResBehavID == 2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + elseif fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + else + local oddsResponse = 40 + local bkStepPer = 50 + local leftStepPer = 25 + local rightStepPer = 25 + local safetyDist = 3.5 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end + end + end + end + end +end + +return diff --git a/scripts_decompiled/280000_battle.lua b/scripts_decompiled/280000_battle.lua new file mode 100644 index 0000000..0a56281 --- /dev/null +++ b/scripts_decompiled/280000_battle.lua @@ -0,0 +1,203 @@ +REGISTER_GOAL(GOAL_HusiCrystal_Sword280000_Battle, "HusiCrystal_Sword280000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 1.5 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 1.7 +local Att3004_Dist_min = 1.7 +local Att3004_Dist_max = 3 +local Att3005_Dist_min = 5 +local Att3005_Dist_max = 7.2 +local Att3006_Dist_min = 11 +local Att3006_Dist_max = 11.7 +local Att3007_Dist_min = 0 +local Att3007_Dist_max = 2 +REGISTER_GOAL_NO_UPDATE(GOAL_HusiCrystal_Sword280000_Battle, 1) +Att3000_Dist_min = Att3007_Dist_max +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3003_Dist_max +function HusiCrystal_Sword280000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest() + if eventNo == 10 then + actPerArr[8] = 100 + elseif ai:IsLadderAct(TARGET_SELF) then + actPerArr[2] = 100 + elseif 8 <= targetDist then + actPerArr[1] = 5 + actPerArr[2] = 5 + actPerArr[3] = 10 + actPerArr[7] = 80 + elseif 4 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 10 + actPerArr[3] = 10 + actPerArr[7] = 60 + elseif 2.5 <= targetDist then + actPerArr[1] = 30 + actPerArr[2] = 30 + actPerArr[3] = 20 + actPerArr[7] = 20 + else + actPerArr[1] = 35 + actPerArr[2] = 35 + actPerArr[3] = 30 + actPerArr[7] = 0 + end + local local0 = {Att3007_Dist_max, 30, 3007, DIST_Middle} + defFuncParamTbl[1] = local0 + local0 = {} + local local1, local2, local3, local4 = nil + local0[1] = Att3000_Dist_max + local0[2] = 30 + local0[3] = 20 + local0[4] = 40 + local0[5] = local1 + local0[6] = local2 + local0[7] = local3 + local0[8] = local4 + defFuncParamTbl[2] = local0 + local0 = {Att3003_Dist_max, 30, 3003, DIST_Middle} + defFuncParamTbl[3] = local0 + actFuncArr[7] = REGIST_FUNC(ai, goal, HusiCrystal_Sword280000_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, HusiCrystal_Sword280000_Act08) + local0 = {30, 5, 20, 15, 10, 10, 10} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace_IncludeSidestep, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3006_Dist_min +Att3000_Dist_min = Att3006_Dist_max +Att3000_Dist_min = Att3005_Dist_min +Att3000_Dist_min = Att3005_Dist_max +Att3000_Dist_min = Att3004_Dist_max +function HusiCrystal_Sword280000_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if Att3006_Dist_min <= targetDist and fate <= 20 then + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + elseif Att3005_Dist_min <= targetDist and fate2 <= 50 then + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + else + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function HusiCrystal_Sword280000_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 1), 0, 0, 0, 0) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 30, POINT_INITIAL, 2, TARGET_SELF, false, -1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function HusiCrystal_Sword280000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function HusiCrystal_Sword280000Battle_Terminate(ai, goal) + return +end + +function HusiCrystal_Sword280000Battle_Interupt(ai, goal) + if ai:IsLadderAct(TARGET_SELF) then + return false + else + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distResponse = 3 + local oddsResponse = 15 + local oddsStep = 50 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + local safetyDist = 3.5 + local oddsLeaveAndSide = 50 + local timeSide = 2.5 + local distLeave = 2.5 + if FindAttack_Step_or_Guard(ai, goal, distResponse, oddsResponse, oddsStep, bkStepPer, leftStepPer, rightStepPer, safetyDist, oddsLeaveAndSide, timeSide, distLeave) then + return true + else + local distMissSwing_Int = 3 + local oddsMissSwing_Int = 30 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if targetDist <= 2 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distGuardBreak_Act = 3 + local oddsGuardBreak_Act = 30 + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if targetDist <= 2 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distResNear = 8.5 + local distResFar = 18 + local oddsResNear = 0 + local oddsResFar = 15 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + return true + elseif ResBehavID == 2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + return true + elseif fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + else + local oddsResponse = 20 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + local safetyDist = 3.5 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end + end + end + end + end + end +end + +return diff --git a/scripts_decompiled/280001_battle.lua b/scripts_decompiled/280001_battle.lua new file mode 100644 index 0000000..06c791e --- /dev/null +++ b/scripts_decompiled/280001_battle.lua @@ -0,0 +1,118 @@ +REGISTER_GOAL(GOAL_HusiCrystal_Bow280001_Battle, "HusiCrystal_Bow280001Battle") +REGISTER_GOAL_NO_UPDATE(GOAL_HusiCrystal_Bow280001_Battle, 1) +function HusiCrystal_Bow280001Battle_Activate(ai, goal) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local GetWellSpace_Odds = 0 + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + if 20 <= targetDist then + Act01Per = 100 + Act02Per = 0 + Act03Per = 0 + elseif 10 <= targetDist then + Act01Per = 70 + Act02Per = 30 + Act03Per = 0 + elseif 5 <= targetDist then + Act01Per = 0 + Act02Per = 60 + Act03Per = 40 + elseif 1 <= targetDist then + Act01Per = 0 + Act02Per = 20 + Act03Per = 80 + else + Act01Per = 0 + Act02Per = 0 + Act03Per = 100 + end + local doAdmirer = ai:GetExcelParam(AI_EXCEL_THINK_PARAM_TYPE__thinkAttr_doAdmirer) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local Odds_Guard = 0 + if doAdmirer == 1 and role == ROLE_TYPE_Torimaki then + Torimaki_Act(ai, goal, Odds_Guard) + elseif doAdmirer == 1 and role == ROLE_TYPE_Kankyaku then + Kankyaku_Act(ai, goal, Odds_Guard) + else + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per) + if fateAct <= Act01Per then + local FirstAttID = 3000 + local ComAttID = 3001 + local ShootNum = ai:GetRandam_Int(2, 5) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + elseif fateAct <= Act01Per + Act02Per then + local FirstAttID = 3000 + local ComAttID = 3001 + local ShootNum = ai:GetRandam_Int(2, 4) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2, TARGET_ENE_0, 20, TARGET_ENE_0, true, -1) + else + local FirstAttID = 3000 + local ComAttID = 3001 + local ShootNum = ai:GetRandam_Int(1, 3) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 20, TARGET_SELF, false, -1) + end + end + return +end + +function HusiCrystal_Bow280001Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function HusiCrystal_Bow280001Battle_Terminate(ai, goal) + return +end + +function HusiCrystal_Bow280001Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distDamagedStep = 3 + local oddsDamagedStep = 15 + local bkStepPer = 20 + local leftStepPer = 40 + local rightStepPer = 40 + local safetyDist = 3.5 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distUseItem_Act = 15 + local oddsUseItem_Act = 10 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + return true + else + local distResNear = 8.5 + local distResFar = 18 + local oddsResNear = 0 + local oddsResFar = 15 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_Guard, 2, 9910, TARGET_ENE_0, false, 0) + return true + elseif ResBehavID == 2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + else + return false + end + end + end +end + +return diff --git a/scripts_decompiled/281000_battle.lua b/scripts_decompiled/281000_battle.lua new file mode 100644 index 0000000..efeeded --- /dev/null +++ b/scripts_decompiled/281000_battle.lua @@ -0,0 +1,118 @@ +REGISTER_GOAL(GOAL_HusiBan281000_Battle, "HusiBan281000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 3.8 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 2.1 +local Att3003_Dist_min = 2.75 +local Att3003_Dist_max = 6.45 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 4.5 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 9.5 +REGISTER_GOAL_NO_UPDATE(GOAL_HusiBan281000_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3002_Dist_max +Att3000_Dist_min = Att3003_Dist_max +Att3000_Dist_min = Att3004_Dist_max +function HusiBan281000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if 8 <= targetDist then + actPerArr[2] = 10 + actPerArr[3] = 5 + actPerArr[1] = 50 + actPerArr[9] = 10 + actPerArr[6] = 25 + elseif 4 <= targetDist then + actPerArr[2] = 15 + actPerArr[3] = 10 + actPerArr[1] = 40 + actPerArr[9] = 10 + actPerArr[6] = 25 + elseif 2.5 <= targetDist then + actPerArr[2] = 30 + actPerArr[3] = 20 + actPerArr[1] = 10 + actPerArr[9] = 30 + actPerArr[6] = 10 + else + actPerArr[2] = 35 + actPerArr[3] = 20 + actPerArr[1] = 0 + actPerArr[9] = 35 + actPerArr[6] = 10 + end + local local0 = {} + local local1, local2, local3, local4 = nil + local0[1] = Att3000_Dist_max + local0[2] = 0 + local0[3] = 50 + local0[4] = 100 + local0[5] = local1 + local0[6] = local2 + local0[7] = local3 + local0[8] = local4 + defFuncParamTbl[2] = local0 + local0 = {Att3002_Dist_max, 0, 3002, DIST_Middle} + defFuncParamTbl[3] = local0 + local0 = {Att3003_Dist_max, 0, 3003, DIST_Middle} + defFuncParamTbl[1] = local0 + local0 = {} + local3, local4 = nil + local0[1] = Att3004_Dist_max + local0[2] = 0 + local0[3] = 50 + local0[4] = 100 + local0[5] = 3004 + local0[6] = 3005 + local0[7] = local3 + local0[8] = local4 + defFuncParamTbl[9] = local0 + local0 = {3006, DIST_None, nil} + defFuncParamTbl[6] = local0 + local0 = {0, 10, 40, 30, 20, 0} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +function HusiBan281000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function HusiBan281000Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3003_Dist_max +function HusiBan281000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local guardBreakConutDist = 1.7 + local guardBreakConutPer = 25 + if FindGuardBreak_Act(ai, goal, guardBreakConutDist, guardBreakConutPer) then + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3003 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + return true + else + local distMissSwing_Attack = 4.5 + local oddsMissSwing_Attack = 25 + local AttID = 3004 + if MissSwing_Attack(ai, goal, distMissSwing_Attack, oddsMissSwing_Attack, AttID) then + return true + else + return false + end + end +end + +return diff --git a/scripts_decompiled/281100_battle.lua b/scripts_decompiled/281100_battle.lua new file mode 100644 index 0000000..85b48b1 --- /dev/null +++ b/scripts_decompiled/281100_battle.lua @@ -0,0 +1,159 @@ +REGISTER_GOAL(GOAL_HusiBanIwa281100_Battle, "HusiBanIwa281100Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 2.4 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 2.4 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 1.5 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 7.4 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 3 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 20.1 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 20 +local Att3007_Dist_min = 0 +local Att3007_Dist_max = 10 +REGISTER_GOAL_NO_UPDATE(GOAL_HusiBanIwa281100_Battle, 1) +Att3000_Dist_min = Att3002_Dist_max +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3004_Dist_max +function HusiBanIwa281100Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest() + if 8.1 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 0 + actPerArr[4] = 40 + actPerArr[6] = 60 + actPerArr[9] = 0 + elseif 6.1 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[6] = 20 + actPerArr[9] = 80 + elseif 4.1 <= targetDist then + actPerArr[1] = 10 + actPerArr[2] = 10 + actPerArr[3] = 10 + actPerArr[4] = 0 + actPerArr[6] = 0 + actPerArr[9] = 70 + elseif 2.1 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 20 + actPerArr[3] = 10 + actPerArr[4] = 0 + actPerArr[6] = 0 + actPerArr[9] = 50 + else + actPerArr[1] = 25 + actPerArr[2] = 20 + actPerArr[3] = 5 + actPerArr[4] = 0 + actPerArr[6] = 0 + actPerArr[9] = 50 + end + local local0 = {Att3002_Dist_max, 0, 3002, DIST_Middle} + defFuncParamTbl[1] = local0 + local0 = {} + local local1, local2, local3, local4 = nil + local0[1] = Att3000_Dist_max + local0[2] = 0 + local0[3] = 30 + local0[4] = 70 + local0[5] = local1 + local0[6] = local2 + local0[7] = local3 + local0[8] = local4 + defFuncParamTbl[2] = local0 + local0 = {Att3004_Dist_max, 0, 3004, DIST_Middle} + defFuncParamTbl[3] = local0 + actFuncArr[4] = REGIST_FUNC(ai, goal, HusiBanIwa281100_Act04) + local0 = {3007, DIST_Far, nil} + defFuncParamTbl[6] = local0 + actFuncArr[9] = REGIST_FUNC(ai, goal, HusiBanIwa281100_Act09) + local0 = {0, 90, 5, 5, 0, 0} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3003_Dist_max +function HusiBanIwa281100_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function HusiBanIwa281100_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function HusiBanIwa281100_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if 6.1 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3005, TARGET_ENE_0, DIST_None, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3006, TARGET_ENE_0, DIST_None, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3006, TARGET_ENE_0, DIST_None, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3006, TARGET_ENE_0, DIST_None, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3006, TARGET_ENE_0, DIST_None, 0) + elseif 4.1 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3005, TARGET_ENE_0, DIST_None, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3006, TARGET_ENE_0, DIST_None, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3006, TARGET_ENE_0, DIST_None, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3006, TARGET_ENE_0, DIST_None, 0) + elseif 2.1 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3005, TARGET_ENE_0, DIST_None, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3006, TARGET_ENE_0, DIST_None, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3006, TARGET_ENE_0, DIST_None, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3005, TARGET_ENE_0, DIST_None, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3006, TARGET_ENE_0, DIST_None, 0) + end + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function HusiBanIwa281100Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function HusiBanIwa281100Battle_Terminate(ai, goal) + return +end + +function HusiBanIwa281100Battle_Interupt(ai, goal) + local distGuardBreak_Act = 7.4 + local oddsGuardBreak_Act = 30 + local targetDist = ai:GetDist(TARGET_ENE_0) + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if 2.3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/283001_battle.lua b/scripts_decompiled/283001_battle.lua new file mode 100644 index 0000000..a8a1b50 --- /dev/null +++ b/scripts_decompiled/283001_battle.lua @@ -0,0 +1,116 @@ +REGISTER_GOAL(GOAL_HusiPhalanx283001_Battle, "HusiPhalanx283001Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 2.6 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 11 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 2.1 +REGISTER_GOAL_NO_UPDATE(GOAL_HusiPhalanx283001_Battle, 1) +Att3000_Dist_min = Att3002_Dist_min +Att3000_Dist_min = Att3002_Dist_max +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3003_Dist_max +function HusiPhalanx283001Battle_Activate(ai, goal) + ai:AddObserveRegion(0, TARGET_SELF, 1102400) + ai:AddObserveRegion(1, TARGET_SELF, 1102401) + ai:AddObserveRegion(2, TARGET_SELF, 1102402) + ai:AddObserveRegion(3, TARGET_SELF, 1102403) + ai:AddObserveRegion(4, TARGET_SELF, 1102404) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest() + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local waitTime = ai:GetRandam_Float(0.5, 2) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if ai:IsFinishTimer(0) == true then + ai:SetTimer(0, 9999) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0, 1), TARGET_ENE_0, 0, 0, 0) + end + if role == ROLE_TYPE_Attack then + if 6 <= targetDist then + if fate <= 45 then + local LeaveDist = Att3002_Dist_min + local AppDist = Att3002_Dist_max + local DashDist = -1 + local Odds_Guard = 0 + Approach_or_Leave_Act(ai, goal, LeaveDist, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_None, 0) + elseif fate <= 55 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, true, -1) + HusiPhalanx283001Battle_TukiCombo(ai, goal) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 2), TARGET_NONE, 0, 0, 0) + elseif fate <= 65 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3003_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 2), TARGET_NONE, 0, 0, 0) + else + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 2), TARGET_NONE, 0, 0, 0) + end + elseif fate <= 35 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, true, -1) + HusiPhalanx283001Battle_TukiCombo(ai, goal) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 2), TARGET_NONE, 0, 0, 0) + elseif fate <= 65 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3003_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 2), TARGET_NONE, 0, 0, 0) + else + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 2), TARGET_NONE, 0, 0, 0) + end + elseif role == ROLE_TYPE_Torimaki then + if fate <= 10 then + local LeaveDist = 7 + local AppDist = 9 + local DashDist = -1 + local Odds_Guard = 0 + Approach_or_Leave_Act(ai, goal, LeaveDist, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_None, 0) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 2), TARGET_NONE, 0, 0, 0) + else + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 2), TARGET_NONE, 0, 0, 0) + end + elseif fate <= 5 then + local LeaveDist = 9 + local AppDist = 11 + local DashDist = -1 + local Odds_Guard = 0 + Approach_or_Leave_Act(ai, goal, LeaveDist, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_None, 0) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 2), TARGET_NONE, 0, 0, 0) + else + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 2), TARGET_NONE, 0, 0, 0) + end + return +end + +function HusiPhalanx283001Battle_TukiCombo(ai, goal) + local fate2 = ai:GetRandam_Int(1, 100) + if fate2 <= 40 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, 3, 1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, 3, 1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 3, 3001, TARGET_ENE_0, DIST_Middle, 0) + end + return +end + +function HusiPhalanx283001Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function HusiPhalanx283001Battle_Terminate(ai, goal) + return +end + +function HusiPhalanx283001Battle_Interupt(ai, goal) + if ai:IsInterupt(INTERUPT_Inside_ObserveArea) and (not not ai:IsInsideObserve(0) or not not ai:IsInsideObserve(1) or not not ai:IsInsideObserve(2) or not not ai:IsInsideObserve(3) or ai:IsInsideObserve(4)) then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, POINT_INITIAL, 1, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_Wait, 2, TARGET_ENE_0, 0, 0, 0) + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/284000_battle.lua b/scripts_decompiled/284000_battle.lua new file mode 100644 index 0000000..d23ecae --- /dev/null +++ b/scripts_decompiled/284000_battle.lua @@ -0,0 +1,119 @@ +REGISTER_GOAL(GOAL_HusiCongestion_Torch284000_Battle, "HusiCongestion_Torch284000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 1.9 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 2.3 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 2.4 +local Att3005_Dist_min = 2.9 +local Att3005_Dist_max = 3.9 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 1.7 +REGISTER_GOAL_NO_UPDATE(GOAL_HusiCongestion_Torch284000_Battle, 1) +Att3000_Dist_min = Att3002_Dist_max +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3005_Dist_max +Att3000_Dist_min = Att3003_Dist_max +function HusiCongestion_Torch284000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if ai:IsLadderAct(TARGET_SELF) then + actPerArr[2] = 100 + elseif 4.4 <= targetDist then + actPerArr[1] = 10 + actPerArr[2] = 15 + actPerArr[3] = 50 + actPerArr[4] = 10 + actPerArr[9] = 15 + elseif 2 <= targetDist then + actPerArr[1] = 35 + actPerArr[2] = 15 + actPerArr[3] = 0 + actPerArr[4] = 15 + actPerArr[9] = 35 + else + actPerArr[1] = 15 + actPerArr[2] = 35 + actPerArr[3] = 0 + actPerArr[4] = 35 + actPerArr[9] = 15 + end + local local0 = {Att3002_Dist_max, 0, 3002, DIST_Middle} + defFuncParamTbl[1] = local0 + local0 = {} + local local1, local2, local3, local4 = nil + local0[1] = Att3000_Dist_max + local0[2] = 0 + local0[3] = 30 + local0[4] = 100 + local0[5] = local1 + local0[6] = local2 + local0[7] = local3 + local0[8] = local4 + defFuncParamTbl[2] = local0 + local0 = {Att3005_Dist_max, 0, 3005, DIST_Middle} + defFuncParamTbl[3] = local0 + actFuncArr[4] = REGIST_FUNC(ai, goal, HusiCongestion_Torch284000_Act04) + local0 = {} + local3, local4 = nil + local0[1] = Att3003_Dist_max + local0[2] = 0 + local0[3] = 30 + local0[4] = 100 + local0[5] = 3003 + local0[6] = 3004 + local0[7] = local3 + local0[8] = local4 + defFuncParamTbl[9] = local0 + local0 = {0, 50, 10, 15, 15, 10} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3006_Dist_max +function HusiCongestion_Torch284000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function HusiCongestion_Torch284000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function HusiCongestion_Torch284000Battle_Terminate(ai, goal) + return +end + +function HusiCongestion_Torch284000Battle_Interupt(ai, goal) + if ai:IsLadderAct(TARGET_SELF) then + return false + else + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distDamagedStep = 3 + local oddsDamagedStep = 5 + local bkStepPer = 100 + local leftStepPer = 0 + local rightStepPer = 0 + local safetyDist = 4 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end + end +end + +return diff --git a/scripts_decompiled/284001_battle.lua b/scripts_decompiled/284001_battle.lua new file mode 100644 index 0000000..346dad9 --- /dev/null +++ b/scripts_decompiled/284001_battle.lua @@ -0,0 +1,158 @@ +REGISTER_GOAL(GOAL_HusiCongestion_Hand284001_Battle, "HusiCongestion_Hand284001Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 1.7 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 2 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 15 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 15 +REGISTER_GOAL_NO_UPDATE(GOAL_HusiCongestion_Hand284001_Battle, 1) +Att3000_Dist_min = Att3002_Dist_max +Att3000_Dist_min = Att3000_Dist_max +function HusiCongestion_Hand284001Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if ai:IsLadderAct(TARGET_SELF) then + actPerArr[1] = 100 + elseif 15 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 50 + actPerArr[4] = 50 + actPerArr[5] = 0 + actPerArr[6] = 0 + elseif 10 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 40 + actPerArr[4] = 40 + actPerArr[5] = 20 + actPerArr[6] = 0 + elseif 5 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 30 + actPerArr[4] = 30 + actPerArr[5] = 20 + actPerArr[6] = 20 + elseif 1.7 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 20 + actPerArr[4] = 20 + actPerArr[5] = 20 + actPerArr[6] = 40 + else + actPerArr[1] = 25 + actPerArr[2] = 25 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 10 + actPerArr[6] = 40 + end + local local0 = {Att3002_Dist_max, 0, 3002, DIST_Middle} + defFuncParamTbl[1] = local0 + local0 = {} + local local1, local2, local3, local4 = nil + local0[1] = Att3000_Dist_max + local0[2] = 0 + local0[3] = 30 + local0[4] = 70 + local0[5] = local1 + local0[6] = local2 + local0[7] = local3 + local0[8] = local4 + defFuncParamTbl[2] = local0 + actFuncArr[3] = REGIST_FUNC(ai, goal, HusiCongestion_Hand284001_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, HusiCongestion_Hand284001_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, HusiCongestion_Hand284001_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, HusiCongestion_Hand284001_Act06) + local0 = {0, 100, 0, 0, 0, 0} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3003_Dist_max +function HusiCongestion_Hand284001_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + if fate <= 65 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_None, 0) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2, TARGET_ENE_0, 15, TARGET_ENE_0, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_None, 0) + end + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3004_Dist_max +function HusiCongestion_Hand284001_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 0 + if fate <= 65 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_None, 0) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2, TARGET_ENE_0, 15, TARGET_ENE_0, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_None, 0) + end + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function HusiCongestion_Hand284001_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 15, TARGET_ENE_0, true, -1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function HusiCongestion_Hand284001_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 15, TARGET_SELF, false, -1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function HusiCongestion_Hand284001Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function HusiCongestion_Hand284001Battle_Terminate(ai, goal) + return +end + +function HusiCongestion_Hand284001Battle_Interupt(ai, goal) + if ai:IsLadderAct(TARGET_SELF) then + return false + else + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distDamagedStep = 3 + local oddsDamagedStep = 5 + local bkStepPer = 100 + local leftStepPer = 0 + local rightStepPer = 0 + local safetyDist = 4 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end + end +end + +return diff --git a/scripts_decompiled/286000_battle.lua b/scripts_decompiled/286000_battle.lua new file mode 100644 index 0000000..6585b31 --- /dev/null +++ b/scripts_decompiled/286000_battle.lua @@ -0,0 +1,259 @@ +REGISTER_GOAL(GOAL_Giant286000_Battle, "Giant286000Battle") +local Att3000_Dist_min = 0.2 +local Att3000_Dist_max = 2.7 +local Att3001_Dist_min = -1.3 +local Att3001_Dist_max = 1 +local Att3002_Dist_min = -1.3 +local Att3002_Dist_max = 0.9 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 3.1 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 2.7 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 1.5 +local Att3006_Dist_min = 4.5 +local Att3006_Dist_max = 6.7 +local Att3007_Dist_min = 0 +local Att3007_Dist_max = 100 +local Att3010_Dist_min = 0 +local Att3010_Dist_max = 100 +local Att3011_Dist_min = 0 +local Att3011_Dist_max = 100 +local Att3012_Dist_min = 0 +local Att3012_Dist_max = 100 +REGISTER_GOAL_NO_UPDATE(GOAL_Giant286000_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3001_Dist_max +Att3000_Dist_min = Att3002_Dist_max +Att3000_Dist_min = Att3003_Dist_max +Att3000_Dist_min = Att3004_Dist_max +Att3000_Dist_min = Att3006_Dist_max +function Giant286000Battle_Activate(ai, goal) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local targetDist = ai:GetDist(TARGET_ENE_0) + local hprate = ai:GetHpRate(TARGET_SELF) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local eventNo = ai:GetEventRequest(0) + local objeventNo = ai:GetEventRequest(1) + local FireEventNo = ai:GetEventRequest(2) + local GetWellSpace_Odds = 0 + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act08Per = 0 + local Act09Per = 0 + local Act10Per = 0 + local Act11Per = 0 + local Act12Per = 0 + local Act13Per = 0 + local Act14Per = 0 + local Act15Per = 0 + ai:AddObserveChrDmySphere(0, TARGET_ENE_0, 3, 2) + ai:AddObserveChrDmySphere(1, TARGET_ENE_0, 4, 2) + if ai:IsInsideTargetRegion(TARGET_SELF, 1502710) and FireEventNo == 6 and eventNo ~= 10 and objeventNo ~= 20 then + Act15Per = 100 + elseif ai:IsInsideTargetRegion(TARGET_SELF, 1502710) and FireEventNo == 5 and objeventNo ~= 20 then + Act14Per = 100 + elseif ai:IsInsideTargetRegion(TARGET_SELF, 1502710) and FireEventNo == 4 and objeventNo ~= 20 then + Act13Per = 100 + elseif ai:IsInsideTargetRegion(TARGET_SELF, 1502710) and FireEventNo == 3 and objeventNo ~= 20 then + Act10Per = 100 + elseif ai:IsInsideTargetRegion(TARGET_SELF, 1502710) and FireEventNo == 2 and objeventNo ~= 20 then + Act09Per = 100 + elseif ai:IsInsideTargetRegion(TARGET_SELF, 1502710) and FireEventNo == 1 and objeventNo ~= 20 then + Act08Per = 100 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1502710) then + if not not ai:IsInsideObserve(0) or ai:IsInsideObserve(1) then + Act01Per = 5 + Act02Per = 15 + Act03Per = 15 + Act04Per = 0 + Act05Per = 5 + Act06Per = 50 + Act07Per = 10 + elseif 25 <= targetDist then + Act11Per = 100 + elseif 18 <= targetDist then + Act12Per = 100 + elseif 4 <= targetDist then + Act01Per = 15 + Act02Per = 10 + Act03Per = 10 + Act04Per = 20 + Act05Per = 15 + Act06Per = 0 + Act07Per = 20 + else + Act01Per = 15 + Act02Per = 15 + Act03Per = 15 + Act04Per = 10 + Act05Per = 15 + Act06Per = 0 + Act07Per = 30 + end + elseif 20 <= targetDist then + Act11Per = 100 + else + Act12Per = 100 + end + local doAdmirer = ai:GetExcelParam(AI_EXCEL_THINK_PARAM_TYPE__thinkAttr_doAdmirer) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local Odds_Guard = 0 + if doAdmirer == 1 and role == ROLE_TYPE_Torimaki then + Torimaki_Act(ai, goal, Odds_Guard) + elseif doAdmirer == 1 and role == ROLE_TYPE_Kankyaku then + Kankyaku_Act(ai, goal, Odds_Guard) + else + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per) + if fateAct <= Act01Per then + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3000 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per then + local AppDist = Att3001_Dist_max + local DashDist = Att3001_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3001 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per then + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3002 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3003 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3004 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3006 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, POINT_INITIAL, -1.8, TARGET_SELF, true, -1) + ai:SetEventFlag(11505105, true) + ai:SetEventMoveTarget(1502700) + goal:AddSubGoal(GOAL_COMMON_Turn, 10, POINT_EVENT, 2, 0, 0) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3010, TARGET_ENE_0, DIST_None) + goal:AddSubGoal(GOAL_COMMON_If, 15, 0) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, POINT_INITIAL, -1.8, TARGET_SELF, true, -1) + ai:SetEventFlag(11505105, true) + ai:SetEventMoveTarget(1502701) + goal:AddSubGoal(GOAL_COMMON_Turn, 10, POINT_EVENT, 2, 0, 0) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3010, TARGET_ENE_0, DIST_None) + goal:AddSubGoal(GOAL_COMMON_If, 15, 0) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, POINT_INITIAL, -1.8, TARGET_SELF, true, -1) + ai:SetEventFlag(11505105, true) + ai:SetEventMoveTarget(1502702) + goal:AddSubGoal(GOAL_COMMON_Turn, 10, POINT_EVENT, 2, 0, 0) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3011, TARGET_ENE_0, DIST_None) + goal:AddSubGoal(GOAL_COMMON_If, 15, 0) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, POINT_INITIAL, 2, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_Wait, 3, TARGET_SELF, 0, 0, 0) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, POINT_INITIAL, 2, TARGET_ENE_0, true, -1) + goal:AddSubGoal(GOAL_COMMON_Wait, 3, TARGET_ENE_0) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, POINT_INITIAL, -1.8, TARGET_SELF, true, -1) + ai:SetEventFlag(11505105, true) + ai:SetEventMoveTarget(1502703) + goal:AddSubGoal(GOAL_COMMON_Turn, 10, POINT_EVENT, 2, 0, 0) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3011, TARGET_ENE_0, DIST_None) + goal:AddSubGoal(GOAL_COMMON_If, 15, 0) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per + Act14Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, POINT_INITIAL, -1.8, TARGET_SELF, true, -1) + ai:SetEventFlag(11505105, true) + ai:SetEventMoveTarget(1502704) + goal:AddSubGoal(GOAL_COMMON_Turn, 10, POINT_EVENT, 2, 0, 0) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3012, TARGET_ENE_0, DIST_None) + goal:AddSubGoal(GOAL_COMMON_If, 15, 0) + GetWellSpace_Odds = 0 + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, POINT_INITIAL, -1.8, TARGET_SELF, true, -1) + ai:SetEventFlag(11505105, true) + ai:SetEventMoveTarget(1502705) + goal:AddSubGoal(GOAL_COMMON_Turn, 10, POINT_EVENT, 2, 0, 0) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3010, TARGET_ENE_0, DIST_None) + goal:AddSubGoal(GOAL_COMMON_If, 15, 0) + GetWellSpace_Odds = 0 + end + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + local Odds_Guard = 0 + local Odds_NoAct = 50 + local Odds_BackAndSide = 0 + local Odds_Back = 20 + local Odds_BitWait = 30 + local Odds_Backstep = 0 + GetWellSpace_Act(ai, goal, Odds_Guard, Odds_NoAct, Odds_BackAndSide, Odds_Back, Odds_BitWait, Odds_Backstep) + end + return +end + +function OnIf_286000(ai, goal, codeNo) + ai:SetEventFlag(11505105, false) + goal:AddSubGoal(GOAL_COMMON_Wait, 0.5, TARGET_SELF, 0, 0, 0) + return +end + +function Giant286000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Giant286000Battle_Terminate(ai, goal) + return +end + +function Giant286000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + return false +end + +return diff --git a/scripts_decompiled/286001_battle.lua b/scripts_decompiled/286001_battle.lua new file mode 100644 index 0000000..0ceb99b --- /dev/null +++ b/scripts_decompiled/286001_battle.lua @@ -0,0 +1,238 @@ +REGISTER_GOAL(GOAL_Giant_nt286001_Battle, "Giant_nt286001Battle") +local Att3000_Dist_min = 0.2 +local Att3000_Dist_max = 2.7 +local Att3001_Dist_min = -1.3 +local Att3001_Dist_max = 1 +local Att3002_Dist_min = -1.3 +local Att3002_Dist_max = 0.9 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 3.1 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 2.7 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 1.5 +local Att3006_Dist_min = 4.5 +local Att3006_Dist_max = 6.7 +local Att3007_Dist_min = 0 +local Att3007_Dist_max = 100 +REGISTER_GOAL_NO_UPDATE(GOAL_Giant_nt286001_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3001_Dist_max +Att3000_Dist_min = Att3002_Dist_max +Att3000_Dist_min = Att3003_Dist_max +Att3000_Dist_min = Att3004_Dist_max +Att3000_Dist_min = Att3006_Dist_max +function Giant_nt286001Battle_Activate(ai, goal) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local targetDist = ai:GetDist(TARGET_ENE_0) + local hprate = ai:GetHpRate(TARGET_SELF) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local GetWellSpace_Odds = 0 + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act08Per = 0 + local Act09Per = 0 + ai:AddObserveChrDmySphere(0, TARGET_ENE_0, 3, 2) + ai:AddObserveChrDmySphere(1, TARGET_ENE_0, 4, 2) + if ai:IsInsideTargetRegion(TARGET_SELF, 1502720) and ai:IsInsideTargetRegion(TARGET_ENE_0, 1502720) then + if not not ai:IsInsideObserve(0) or ai:IsInsideObserve(1) then + Act01Per = 5 + Act02Per = 15 + Act03Per = 15 + Act04Per = 0 + Act05Per = 5 + Act06Per = 50 + Act07Per = 10 + elseif 25 <= targetDist then + Act08Per = 100 + elseif 18 <= targetDist then + Act09Per = 100 + elseif 4 <= targetDist then + Act01Per = 15 + Act02Per = 10 + Act03Per = 10 + Act04Per = 20 + Act05Per = 15 + Act06Per = 0 + Act07Per = 20 + else + Act01Per = 15 + Act02Per = 15 + Act03Per = 15 + Act04Per = 10 + Act05Per = 15 + Act06Per = 0 + Act07Per = 30 + end + elseif ai:IsInsideTargetRegion(TARGET_SELF, 1502750) and ai:IsInsideTargetRegion(TARGET_ENE_0, 1502750) then + if not not ai:IsInsideObserve(0) or ai:IsInsideObserve(1) then + Act01Per = 5 + Act02Per = 15 + Act03Per = 15 + Act04Per = 0 + Act05Per = 5 + Act06Per = 50 + Act07Per = 10 + elseif 25 <= targetDist then + Act08Per = 100 + elseif 18 <= targetDist then + Act09Per = 100 + elseif 4 <= targetDist then + Act01Per = 15 + Act02Per = 10 + Act03Per = 10 + Act04Per = 20 + Act05Per = 15 + Act06Per = 0 + Act07Per = 20 + else + Act01Per = 15 + Act02Per = 15 + Act03Per = 15 + Act04Per = 10 + Act05Per = 15 + Act06Per = 0 + Act07Per = 30 + end + elseif ai:IsInsideTargetRegion(TARGET_SELF, 1512750) and ai:IsInsideTargetRegion(TARGET_ENE_0, 1512750) then + if not not ai:IsInsideObserve(0) or ai:IsInsideObserve(1) then + Act01Per = 5 + Act02Per = 15 + Act03Per = 15 + Act04Per = 0 + Act05Per = 5 + Act06Per = 50 + Act07Per = 10 + elseif 25 <= targetDist then + Act08Per = 100 + elseif 18 <= targetDist then + Act09Per = 100 + elseif 4 <= targetDist then + Act01Per = 15 + Act02Per = 10 + Act03Per = 10 + Act04Per = 20 + Act05Per = 15 + Act06Per = 0 + Act07Per = 20 + else + Act01Per = 15 + Act02Per = 15 + Act03Per = 15 + Act04Per = 10 + Act05Per = 15 + Act06Per = 0 + Act07Per = 30 + end + elseif 20 <= targetDist then + Act08Per = 100 + else + Act09Per = 100 + end + local doAdmirer = ai:GetExcelParam(AI_EXCEL_THINK_PARAM_TYPE__thinkAttr_doAdmirer) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local Odds_Guard = 0 + if doAdmirer == 1 and role == ROLE_TYPE_Torimaki then + Torimaki_Act(ai, goal, Odds_Guard) + elseif doAdmirer == 1 and role == ROLE_TYPE_Kankyaku then + Kankyaku_Act(ai, goal, Odds_Guard) + else + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per) + if fateAct <= Act01Per then + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3000 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per then + local AppDist = Att3001_Dist_max + local DashDist = Att3001_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3001 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per then + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3002 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3003 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3004 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3006 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, POINT_INITIAL, 2, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_Wait, 3, TARGET_SELF, 0, 0, 0) + GetWellSpace_Odds = 0 + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, POINT_INITIAL, 2, TARGET_ENE_0, true, -1) + goal:AddSubGoal(GOAL_COMMON_Wait, 3, TARGET_ENE_0) + GetWellSpace_Odds = 0 + end + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + local Odds_Guard = 0 + local Odds_NoAct = 50 + local Odds_BackAndSide = 0 + local Odds_Back = 20 + local Odds_BitWait = 30 + local Odds_Backstep = 0 + GetWellSpace_Act(ai, goal, Odds_Guard, Odds_NoAct, Odds_BackAndSide, Odds_Back, Odds_BitWait, Odds_Backstep) + end + return +end + +function Giant_nt286001Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Giant_nt286001Battle_Terminate(ai, goal) + return +end + +function Giant_nt286001Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + return false +end + +return diff --git a/scripts_decompiled/287000_battle.lua b/scripts_decompiled/287000_battle.lua new file mode 100644 index 0000000..f38b8f5 --- /dev/null +++ b/scripts_decompiled/287000_battle.lua @@ -0,0 +1,353 @@ +REGISTER_GOAL(GOAL_GiantKnight287000_Battle, "GiantKnight287000Battle") +local Att3000_Dist_min = 0.6 +local Att3000_Dist_max = 2 +local Att3002_Dist_min = 2.1 +local Att3002_Dist_max = 4.8 +local Att3004_Dist_min = 3.8 +local Att3004_Dist_max = 7.6 +local Att3006_Dist_min = 5.5 +local Att3006_Dist_max = 7.1 +local Att3008_Dist_min = 2.4 +local Att3008_Dist_max = 5.6 +local Att3009_Dist_min = -5 +local Att3009_Dist_max = 0.6 +local Att3010_Dist_min = 0.6 +local Att3010_Dist_max = 1.6 +local Att3012_Dist_min = 0 +local Att3012_Dist_max = 2.4 +REGISTER_GOAL_NO_UPDATE(GOAL_GiantKnight287000_Battle, 1) +function OnIf_287000(ai, goal, codeNo) + ai:SetTimer(0, 60) + return +end + +function GiantKnight287000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local hprate = ai:GetHpRate(TARGET_SELF) + if hprate <= 0.4 and ai:IsFinishTimer(0) == true then + if 4.5 <= targetDist then + actPerArr[9] = 300 + elseif 3 <= targetDist then + actPerArr[9] = 100 + else + actPerArr[9] = 50 + end + end + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1512780) then + actPerArr[11] = 100 + elseif 12 <= targetDist then + actPerArr[1] = 5 + actPerArr[2] = 5 + actPerArr[3] = 30 + actPerArr[4] = 30 + actPerArr[5] = 30 + actPerArr[6] = 0 + actPerArr[7] = 0 + actPerArr[8] = 0 + actPerArr[10] = 0 + elseif 8 <= targetDist then + actPerArr[1] = 15 + actPerArr[2] = 15 + actPerArr[3] = 25 + actPerArr[4] = 25 + actPerArr[5] = 20 + actPerArr[6] = 0 + actPerArr[7] = 0 + actPerArr[8] = 0 + actPerArr[10] = 0 + elseif 5 <= targetDist then + actPerArr[1] = 30 + actPerArr[2] = 30 + actPerArr[3] = 10 + actPerArr[4] = 10 + actPerArr[5] = 10 + actPerArr[6] = 0 + actPerArr[7] = 10 + actPerArr[8] = 0 + actPerArr[10] = 0 + elseif 1.5 <= targetDist then + actPerArr[1] = 25 + actPerArr[2] = 20 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 0 + actPerArr[7] = 30 + actPerArr[8] = 15 + actPerArr[10] = 10 + else + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 35 + actPerArr[7] = 0 + actPerArr[8] = 35 + actPerArr[10] = 30 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, GiantKnight287000_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, GiantKnight287000_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, GiantKnight287000_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, GiantKnight287000_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, GiantKnight287000_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, GiantKnight287000_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, GiantKnight287000_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, GiantKnight287000_Act08) + actFuncArr[9] = REGIST_FUNC(ai, goal, GiantKnight287000_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, GiantKnight287000_Act10) + actFuncArr[11] = REGIST_FUNC(ai, goal, GiantKnight287000_Act11) + local atkAfterFunc = REGIST_FUNC(ai, goal, GiantKnight287000_ActAfter_AdjustSpace) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function GiantKnight287000_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 8 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 15, 15) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 15, 15) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 15, 15) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3002_Dist_max +function GiantKnight287000_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 8 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 9, 18) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3002, TARGET_ENE_0, DIST_Middle, 9, 18) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, DIST_Middle, 9, 18) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3004_Dist_max +function GiantKnight287000_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 8 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 15, 15) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3004, TARGET_ENE_0, DIST_Middle, 15, 15) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3005, TARGET_ENE_0, DIST_Middle, 15, 15) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_max +function GiantKnight287000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 8 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 15, 15) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3006, TARGET_ENE_0, DIST_Middle, 15, 15) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3007, TARGET_ENE_0, DIST_Middle, 15, 15) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3008_Dist_max +function GiantKnight287000_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3008_Dist_max + local DashDist = Att3008_Dist_max + 8 + local Odds_Guard = 0 + local AttID = 3008 + local AttDist = DIST_Middle + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3008, TARGET_ENE_0, DIST_Middle, 15, 15) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3009_Dist_max +function GiantKnight287000_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3009_Dist_max + local DashDist = Att3009_Dist_max + 8 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3009, TARGET_ENE_0, DIST_Middle, 10, 10) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3010_Dist_max +function GiantKnight287000_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3010_Dist_max + local DashDist = Att3010_Dist_max + 8 + local Odds_Guard = 0 + local AttID = 3017 + local AttDist = DIST_Middle + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3010, TARGET_ENE_0, DIST_Middle, 7, 15) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function GiantKnight287000_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, -1, AI_DIR_TYPE_B, 6) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function GiantKnight287000_Act09(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 4.5, TARGET_ENE_0, true, -1) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3011, TARGET_ENE_0, DIST_None) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, -1, AI_DIR_TYPE_B, 6) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3011, TARGET_ENE_0, DIST_None) + end + goal:AddSubGoal(GOAL_COMMON_If, 15, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3012_Dist_max +function GiantKnight287000_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3012_Dist_max + local DashDist = Att3012_Dist_max + 8 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3012, TARGET_ENE_0, DIST_Middle) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function GiantKnight287000_Act11(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, POINT_INITIAL, 1, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_SELF) + goal:AddSubGoal(GOAL_COMMON_Turn, 2, TARGET_ENE_0, 0, 0, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function GiantKnight287000_ActAfter_AdjustSpace(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate > 65 then + if fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, 5, TARGET_ENE_0, true, -1) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(20, 35), true, true, -1) + return true + elseif fate <= 85 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + return true + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + return true + end + else + return false + end +end + +function GiantKnight287000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function GiantKnight287000Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3004_Dist_max +function GiantKnight287000Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local distDamagedStep = 3 + local oddsDamagedStep = 25 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 5 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + end + local distUseItem_Act = 8 + local oddsUseItem_Act = 20 + local targetDist = ai:GetDist(TARGET_ENE_0) + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if 4 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + elseif 2.5 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + elseif 1 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + local distResNear = 2.4 + local distResFar = 25 + local oddsResNear = 20 + local oddsResFar = 25 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + if 1 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + end + return true + elseif ResBehavID == 2 then + if 5.2 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3004_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + return true + end + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + else + return false + end +end + +return diff --git a/scripts_decompiled/287001_battle.lua b/scripts_decompiled/287001_battle.lua new file mode 100644 index 0000000..c5f917e --- /dev/null +++ b/scripts_decompiled/287001_battle.lua @@ -0,0 +1,291 @@ +REGISTER_GOAL(GOAL_GiantKnight_low287001_Battle, "GiantKnight_low287001Battle") +local Att3000_Dist_min = 0.6 +local Att3000_Dist_max = 2 +local Att3002_Dist_min = 2.1 +local Att3002_Dist_max = 4.8 +local Att3004_Dist_min = 3.8 +local Att3004_Dist_max = 7.6 +local Att3006_Dist_min = 5.5 +local Att3006_Dist_max = 7.1 +local Att3008_Dist_min = 2.4 +local Att3008_Dist_max = 5.6 +local Att3009_Dist_min = -5 +local Att3009_Dist_max = 0.6 +local Att3010_Dist_min = 0.6 +local Att3010_Dist_max = 1.6 +REGISTER_GOAL_NO_UPDATE(GOAL_GiantKnight_low287001_Battle, 1) +function GiantKnight_low287001Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if 12 <= targetDist then + actPerArr[1] = 5 + actPerArr[2] = 5 + actPerArr[3] = 30 + actPerArr[4] = 30 + actPerArr[5] = 30 + actPerArr[6] = 0 + actPerArr[7] = 0 + actPerArr[8] = 0 + elseif 8 <= targetDist then + actPerArr[1] = 15 + actPerArr[2] = 15 + actPerArr[3] = 25 + actPerArr[4] = 25 + actPerArr[5] = 20 + actPerArr[6] = 0 + actPerArr[7] = 0 + actPerArr[8] = 0 + elseif 5 <= targetDist then + actPerArr[1] = 30 + actPerArr[2] = 30 + actPerArr[3] = 10 + actPerArr[4] = 10 + actPerArr[5] = 10 + actPerArr[6] = 0 + actPerArr[7] = 10 + actPerArr[8] = 0 + elseif 1.5 <= targetDist then + actPerArr[1] = 30 + actPerArr[2] = 20 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 0 + actPerArr[7] = 35 + actPerArr[8] = 15 + else + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 50 + actPerArr[7] = 0 + actPerArr[8] = 50 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, GiantKnight_low287001_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, GiantKnight_low287001_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, GiantKnight_low287001_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, GiantKnight_low287001_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, GiantKnight_low287001_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, GiantKnight_low287001_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, GiantKnight_low287001_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, GiantKnight_low287001_Act08) + local atkAfterFunc = REGIST_FUNC(ai, goal, GiantKnight_low287001_ActAfter_AdjustSpace) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function GiantKnight_low287001_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 8 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 15, 15) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 15, 15) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 15, 15) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3002_Dist_max +function GiantKnight_low287001_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 8 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 9, 18) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3002, TARGET_ENE_0, DIST_Middle, 9, 18) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, DIST_Middle, 9, 18) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3004_Dist_max +function GiantKnight_low287001_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 8 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 15, 15) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3004, TARGET_ENE_0, DIST_Middle, 15, 15) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3005, TARGET_ENE_0, DIST_Middle, 15, 15) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_max +function GiantKnight_low287001_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 8 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 15, 15) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3006, TARGET_ENE_0, DIST_Middle, 15, 15) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3007, TARGET_ENE_0, DIST_Middle, 15, 15) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3008_Dist_max +function GiantKnight_low287001_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3008_Dist_max + local DashDist = Att3008_Dist_max + 8 + local Odds_Guard = 0 + local AttID = 3008 + local AttDist = DIST_Middle + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3008, TARGET_ENE_0, DIST_Middle, 15, 15) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3009_Dist_max +function GiantKnight_low287001_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3009_Dist_max + local DashDist = Att3009_Dist_max + 8 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3009, TARGET_ENE_0, DIST_Middle, 10, 10) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3010_Dist_max +function GiantKnight_low287001_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3010_Dist_max + local DashDist = Att3010_Dist_max + 8 + local Odds_Guard = 0 + local AttID = 3017 + local AttDist = DIST_Middle + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3010, TARGET_ENE_0, DIST_Middle, 7, 15) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function GiantKnight_low287001_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, -1, AI_DIR_TYPE_B, 6) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function GiantKnight_low287001_ActAfter_AdjustSpace(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate > 65 then + if fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, 5, TARGET_ENE_0, true, -1) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(20, 35), true, true, -1) + return true + elseif fate <= 85 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + return true + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + return true + end + else + return false + end +end + +function GiantKnight_low287001Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function GiantKnight_low287001Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3004_Dist_max +function GiantKnight_low287001Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local distDamagedStep = 3 + local oddsDamagedStep = 25 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 5 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + end + local distUseItem_Act = 8 + local oddsUseItem_Act = 20 + local targetDist = ai:GetDist(TARGET_ENE_0) + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if 4 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + elseif 2.5 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + elseif 1 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + local distResNear = 2.4 + local distResFar = 25 + local oddsResNear = 20 + local oddsResFar = 25 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + if 1 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + end + return true + elseif ResBehavID == 2 then + if 5.2 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3004_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + return true + end + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + else + return false + end +end + +return diff --git a/scripts_decompiled/290000_battle.lua b/scripts_decompiled/290000_battle.lua new file mode 100644 index 0000000..ed8d9e8 --- /dev/null +++ b/scripts_decompiled/290000_battle.lua @@ -0,0 +1,285 @@ +REGISTER_GOAL(GOAL_Skeleton_Falchion290000_Battle, "Skeleton_Falchion290000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 2.2 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 2.2 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 3.1 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 2.5 +local Att3006_Dist_min = 3 +local Att3006_Dist_max = 6 +local Att3007_Dist_min = 4 +local Att3007_Dist_max = 9 +local Att3008_Dist_min = 3.5 +local Att3008_Dist_max = 6.5 +REGISTER_GOAL_NO_UPDATE(GOAL_Skeleton_Falchion290000_Battle, 1) +Att3000_Dist_min = Att3008_Dist_max +function Skeleton_Falchion290000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if ai:IsLadderAct(TARGET_SELF) then + actPerArr[3] = 100 + elseif 8 <= targetDist then + actPerArr[1] = 25 + actPerArr[2] = 25 + actPerArr[3] = 5 + actPerArr[4] = 0 + actPerArr[6] = 30 + actPerArr[7] = 15 + actPerArr[8] = 0 + elseif 3.5 <= targetDist then + actPerArr[1] = 15 + actPerArr[2] = 20 + actPerArr[3] = 15 + actPerArr[4] = 0 + actPerArr[6] = 15 + actPerArr[7] = 15 + actPerArr[8] = 20 + elseif 1.5 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 35 + actPerArr[3] = 20 + actPerArr[4] = 0 + actPerArr[6] = 0 + actPerArr[7] = 0 + actPerArr[8] = 25 + else + actPerArr[1] = 10 + actPerArr[2] = 30 + actPerArr[3] = 30 + actPerArr[4] = 30 + actPerArr[6] = 0 + actPerArr[7] = 0 + actPerArr[8] = 0 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Skeleton_Falchion290000_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Skeleton_Falchion290000_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, Skeleton_Falchion290000_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, Skeleton_Falchion290000_Act04) + actFuncArr[6] = REGIST_FUNC(ai, goal, Skeleton_Falchion290000_Act06) + local local0 = {Att3008_Dist_max, 75, 3008, DIST_Middle} + defFuncParamTbl[7] = local0 + local atkAfterFunc = REGIST_FUNC(ai, goal, Skeleton_Falchion290000_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3004_Dist_max +function Skeleton_Falchion290000_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ApproachStep, 5, 700, TARGET_ENE_0, Att3004_Dist_max, 0) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3000_Dist_max +function Skeleton_Falchion290000_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ApproachStep, 5, 700, TARGET_ENE_0, Att3000_Dist_max, 0) + if fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3003_Dist_max +function Skeleton_Falchion290000_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ApproachStep, 5, 700, TARGET_ENE_0, Att3003_Dist_max, 0) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3005_Dist_max +function Skeleton_Falchion290000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3005 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3007_Dist_min +Att3000_Dist_min = Att3007_Dist_max +Att3000_Dist_min = Att3006_Dist_max +function Skeleton_Falchion290000_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if Att3007_Dist_min <= targetDist and fate <= 40 then + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 75 + local AttID = 3007 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + else + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 75 + local AttID = 3006 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + end + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Skeleton_Falchion290000_ActAfter_AdjustSpace(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local KN_fate = ai:GetRandam_Int(1, 100) + if KN_fate > 25 then + if KN_fate <= 35 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0) + return true + elseif KN_fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0) + return true + elseif KN_fate <= 90 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 700, TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 700, TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 700, TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + return true + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 0) + return true + end + else + return false + end +end + +function Skeleton_Falchion290000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Skeleton_Falchion290000Battle_Terminate(ai, goal) + return +end + +function Skeleton_Falchion290000Battle_Interupt(ai, goal) + if ai:IsLadderAct(TARGET_SELF) then + return false + else + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local ParryDist = 3 + local ParryAng = 60 + local ParryThrowDist = 4 + local ParryThrowAng = 60 + if Parry_Act(ai, goal, ParryDist, ParryAng, ParryThrowDist, ParryThrowAng) then + return true + else + local distResponse = 3 + local oddsResponse = 25 + local oddsStep = 50 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 3.5 + local oddsLeaveAndSide = 50 + local timeSide = 4.5 + local distLeave = 2.5 + if FindAttack_Step_or_Guard(ai, goal, distResponse, oddsResponse, oddsStep, bkStepPer, leftStepPer, rightStepPer, safetyDist, oddsLeaveAndSide, timeSide, distLeave) then + return true + else + local distResponse = 3 + local oddsResponse = 25 + local oddsStep = 50 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 3.5 + local oddsLeaveAndSide = 50 + local timeSide = 4.5 + local distLeave = 2.5 + if Damaged_Step_or_Guard(ai, goal, distResponse, oddsResponse, oddsStep, bkStepPer, leftStepPer, rightStepPer, safetyDist, oddsLeaveAndSide, timeSide, distLeave) then + return true + else + local distMissSwing_Int = 3.1 + local oddsMissSwing_Int = 50 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if targetDist <= 2.2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distUseItem_Act = 6 + local oddsUseItem_Act = 5 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if targetDist <= 3 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distResNear = 6 + local distResFar = 18 + local oddsResNear = 20 + local oddsResFar = 30 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + return true + elseif ResBehavID == 2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + return true + elseif fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + else + local oddsResponse = 20 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 3.5 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end + end + end + end + end + end + end + end +end + +return diff --git a/scripts_decompiled/290001_battle.lua b/scripts_decompiled/290001_battle.lua new file mode 100644 index 0000000..e88b271 --- /dev/null +++ b/scripts_decompiled/290001_battle.lua @@ -0,0 +1,99 @@ +REGISTER_GOAL(GOAL_Skeleton_Bow290001_Battle, "Skeleton_Bow290001Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 0 +REGISTER_GOAL_NO_UPDATE(GOAL_Skeleton_Bow290001_Battle, 1) +function Skeleton_Bow290001Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if 12 <= targetDist then + actPerArr[1] = 100 + actPerArr[2] = 0 + actPerArr[3] = 0 + elseif 3 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 100 + actPerArr[3] = 0 + else + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 100 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Skeleton_Bow290001_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Skeleton_Bow290001_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, Skeleton_Bow290001_Act03) + local local0 = {0, 100, 0, 0, 0, 0, 0} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace_IncludeSidestep, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +function Skeleton_Bow290001_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Skeleton_Bow290001_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_None, 0) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2, TARGET_ENE_0, 20, TARGET_ENE_0, true, -1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Skeleton_Bow290001_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_None, 0) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 20, TARGET_SELF, false, -1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Skeleton_Bow290001Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Skeleton_Bow290001Battle_Terminate(ai, goal) + return +end + +function Skeleton_Bow290001Battle_Interupt(ai, goal) + local distDamagedStep = 3 + local oddsDamagedStep = 25 + local bkStepPer = 20 + local leftStepPer = 40 + local rightStepPer = 40 + local safetyDist = 3.5 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distResNear = 6 + local distResFar = 18 + local oddsResNear = 0 + local oddsResFar = 15 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_Guard, 2, 9910, TARGET_ENE_0, false, 0) + return true + elseif ResBehavID == 2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + else + return false + end + end +end + +return diff --git a/scripts_decompiled/290002_battle.lua b/scripts_decompiled/290002_battle.lua new file mode 100644 index 0000000..7094927 --- /dev/null +++ b/scripts_decompiled/290002_battle.lua @@ -0,0 +1,255 @@ +REGISTER_GOAL(GOAL_Sk_Large_Falchion290002_Battle, "Sk_Large_Falchion290002Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 2.7 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 3 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 2.5 +local Att3006_Dist_min = 3 +local Att3006_Dist_max = 6 +local Att3007_Dist_min = 5 +local Att3007_Dist_max = 10 +local Att3008_Dist_min = 3.9 +local Att3008_Dist_max = 6.9 +REGISTER_GOAL_NO_UPDATE(GOAL_Sk_Large_Falchion290002_Battle, 1) +Att3000_Dist_min = Att3008_Dist_max +function Sk_Large_Falchion290002Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if ai:IsLadderAct(TARGET_SELF) then + actPerArr[3] = 100 + elseif 12 <= targetDist then + actPerArr[1] = 10 + actPerArr[2] = 10 + actPerArr[3] = 0 + actPerArr[6] = 50 + actPerArr[7] = 30 + elseif 8 <= targetDist then + actPerArr[1] = 15 + actPerArr[2] = 15 + actPerArr[3] = 5 + actPerArr[6] = 35 + actPerArr[7] = 30 + elseif 5 <= targetDist then + actPerArr[1] = 25 + actPerArr[2] = 25 + actPerArr[3] = 10 + actPerArr[6] = 25 + actPerArr[7] = 15 + elseif 1 <= targetDist then + actPerArr[1] = 35 + actPerArr[2] = 35 + actPerArr[3] = 30 + actPerArr[6] = 0 + actPerArr[7] = 0 + else + actPerArr[1] = 25 + actPerArr[2] = 25 + actPerArr[3] = 50 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Sk_Large_Falchion290002_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Sk_Large_Falchion290002_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, Sk_Large_Falchion290002_Act03) + actFuncArr[6] = REGIST_FUNC(ai, goal, Sk_Large_Falchion290002_Act06) + local local0 = {Att3008_Dist_max, 0, 3008, DIST_Middle} + defFuncParamTbl[7] = local0 + local atkAfterFunc = REGIST_FUNC(ai, goal, Sk_Large_Falchion290002_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3004_Dist_max +function Sk_Large_Falchion290002_Act01(ai, goal, paramTbl) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 0 + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ApproachStep, 5, 700, TARGET_ENE_0, Att3004_Dist_max, 0) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3000_Dist_max +function Sk_Large_Falchion290002_Act02(ai, goal, paramTbl) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ApproachStep, 5, 700, TARGET_ENE_0, Att3000_Dist_max, 0) + if fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3003_Dist_max +function Sk_Large_Falchion290002_Act03(ai, goal, paramTbl) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ApproachStep, 5, 700, TARGET_ENE_0, Att3003_Dist_max, 0) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3007_Dist_min +Att3000_Dist_min = Att3007_Dist_max +Att3000_Dist_min = Att3006_Dist_max +function Sk_Large_Falchion290002_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if Att3007_Dist_min <= targetDist and fate <= 40 then + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3007 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + else + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3006 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + end + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Sk_Large_Falchion290002_ActAfter_AdjustSpace(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local KN_fate = ai:GetRandam_Int(1, 100) + if KN_fate > 25 then + if KN_fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0) + return true + elseif KN_fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0) + return true + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 0) + return true + end + else + return false + end +end + +function Sk_Large_Falchion290002Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Sk_Large_Falchion290002Battle_Terminate(ai, goal) + return +end + +function Sk_Large_Falchion290002Battle_Interupt(ai, goal) + if ai:IsLadderAct(TARGET_SELF) then + return false + else + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local superStepDist = 3 + local superStepPer = 25 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 3.5 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distDamagedStep = 3 + local oddsDamagedStep = 25 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 3.5 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distMissSwing_Int = 3.1 + local oddsMissSwing_Int = 50 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if targetDist <= 2.2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distUseItem_Act = 6 + local oddsUseItem_Act = 15 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if targetDist <= 3 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distResNear = 6 + local distResFar = 18 + local oddsResNear = 0 + local oddsResFar = 30 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_Guard, 2, 9910, TARGET_ENE_0, false, 0) + return true + elseif ResBehavID == 2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + else + local oddsResponse = 20 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 3.5 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end + end + end + end + end + end + end +end + +return diff --git a/scripts_decompiled/290003_battle.lua b/scripts_decompiled/290003_battle.lua new file mode 100644 index 0000000..b1e5eef --- /dev/null +++ b/scripts_decompiled/290003_battle.lua @@ -0,0 +1,260 @@ +REGISTER_GOAL(GOAL_Sk_Fal_non_screw290003_Battle, "Sk_Fal_non_screw290003Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 2.2 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 2.2 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 3.1 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 2.5 +local Att3008_Dist_min = 3.5 +local Att3008_Dist_max = 6.5 +REGISTER_GOAL_NO_UPDATE(GOAL_Sk_Fal_non_screw290003_Battle, 1) +Att3000_Dist_min = Att3008_Dist_max +function Sk_Fal_non_screw290003Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if ai:IsLadderAct(TARGET_SELF) then + actPerArr[3] = 100 + elseif 8 <= targetDist then + actPerArr[1] = 10 + actPerArr[2] = 15 + actPerArr[3] = 5 + actPerArr[4] = 0 + actPerArr[7] = 70 + actPerArr[8] = 0 + elseif 3.5 <= targetDist then + actPerArr[1] = 15 + actPerArr[2] = 20 + actPerArr[3] = 15 + actPerArr[4] = 0 + actPerArr[7] = 30 + actPerArr[8] = 20 + elseif 2.5 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 35 + actPerArr[3] = 20 + actPerArr[4] = 0 + actPerArr[7] = 0 + actPerArr[8] = 25 + else + actPerArr[1] = 10 + actPerArr[2] = 30 + actPerArr[3] = 20 + actPerArr[4] = 40 + actPerArr[7] = 0 + actPerArr[8] = 0 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Sk_Fal_non_screw290003_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Sk_Fal_non_screw290003_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, Sk_Fal_non_screw290003_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, Sk_Fal_non_screw290003_Act04) + local local0 = {Att3008_Dist_max, 75, 3008, DIST_Middle} + defFuncParamTbl[7] = local0 + local atkAfterFunc = REGIST_FUNC(ai, goal, Sk_Fal_non_screw290003_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3004_Dist_max +function Sk_Fal_non_screw290003_Act01(ai, goal, paramTbl) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 80 + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3000_Dist_max +function Sk_Fal_non_screw290003_Act02(ai, goal, paramTbl) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 80 + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3003_Dist_max +function Sk_Fal_non_screw290003_Act03(ai, goal, paramTbl) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 80 + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3005_Dist_max +function Sk_Fal_non_screw290003_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 80 + local AttID = 3005 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Sk_Fal_non_screw290003_ActAfter_AdjustSpace(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local KN_fate = ai:GetRandam_Int(1, 100) + local bRight = ai:GetRandam_Int(0, 1) + local friendNum = ai:GetTeamRecordCount(COORDINATE_TYPE_SideWalk_L + bRight, TARGET_ENE_0, 2) + if KN_fate > 10 then + if KN_fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0) + return true + elseif KN_fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0) + return true + elseif KN_fate <= 80 and friendNum < 2 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 2, TARGET_ENE_0, true, 9910) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, bRight, ai:GetRandam_Int(30, 45), true, true, 9910) + return true + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 0) + return true + end + else + return false + end +end + +function Sk_Fal_non_screw290003Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Sk_Fal_non_screw290003Battle_Terminate(ai, goal) + return +end + +function Sk_Fal_non_screw290003Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if ai:IsLadderAct(TARGET_SELF) then + return false + else + local ParryDist = 3 + local ParryAng = 60 + local ParryThrowDist = 4 + local ParryThrowAng = 60 + if Parry_Act(ai, goal, ParryDist, ParryAng, ParryThrowDist, ParryThrowAng) then + return true + else + local distResponse = 3 + local oddsResponse = 25 + local oddsStep = 50 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 3.5 + local oddsLeaveAndSide = 50 + local timeSide = 4.5 + local distLeave = 2.5 + if FindAttack_Step_or_Guard(ai, goal, distResponse, oddsResponse, oddsStep, bkStepPer, leftStepPer, rightStepPer, safetyDist, oddsLeaveAndSide, timeSide, distLeave) then + return true + else + local distResponse = 3 + local oddsResponse = 25 + local oddsStep = 50 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 3.5 + local oddsLeaveAndSide = 50 + local timeSide = 4.5 + local distLeave = 2.5 + if Damaged_Step_or_Guard(ai, goal, distResponse, oddsResponse, oddsStep, bkStepPer, leftStepPer, rightStepPer, safetyDist, oddsLeaveAndSide, timeSide, distLeave) then + return true + else + local distMissSwing_Int = 3.1 + local oddsMissSwing_Int = 50 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if targetDist <= 2.2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distUseItem_Act = 6.5 + local oddsUseItem_Act = 5 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if targetDist <= 3 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3008, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distResNear = 6 + local distResFar = 18 + local oddsResNear = 20 + local oddsResFar = 30 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + return true + elseif ResBehavID == 2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + return true + elseif fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + else + local oddsResponse = 20 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 3.5 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end + end + end + end + end + end + end + end +end + +return diff --git a/scripts_decompiled/290004_battle.lua b/scripts_decompiled/290004_battle.lua new file mode 100644 index 0000000..9b4ae0e --- /dev/null +++ b/scripts_decompiled/290004_battle.lua @@ -0,0 +1,224 @@ +REGISTER_GOAL(GOAL_Sk_LarFal_non_scr290004_Battle, "Sk_LarFal_non_scr290004Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 2.7 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 3 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 2.5 +local Att3008_Dist_min = 3.9 +local Att3008_Dist_max = 6.9 +REGISTER_GOAL_NO_UPDATE(GOAL_Sk_LarFal_non_scr290004_Battle, 1) +Att3000_Dist_min = Att3008_Dist_max +function Sk_LarFal_non_scr290004Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if ai:IsLadderAct(TARGET_SELF) then + actPerArr[3] = 100 + elseif 12 <= targetDist then + actPerArr[1] = 10 + actPerArr[2] = 10 + actPerArr[3] = 5 + actPerArr[7] = 75 + elseif 8 <= targetDist then + actPerArr[1] = 15 + actPerArr[2] = 15 + actPerArr[3] = 5 + actPerArr[7] = 65 + elseif 5 <= targetDist then + actPerArr[1] = 25 + actPerArr[2] = 25 + actPerArr[3] = 10 + actPerArr[7] = 40 + elseif 1 <= targetDist then + actPerArr[1] = 35 + actPerArr[2] = 35 + actPerArr[3] = 30 + else + actPerArr[1] = 25 + actPerArr[2] = 25 + actPerArr[3] = 50 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Sk_LarFal_non_scr290004_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Sk_LarFal_non_scr290004_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, Sk_LarFal_non_scr290004_Act03) + local local0 = {Att3008_Dist_max, 75, 3008, DIST_Middle} + defFuncParamTbl[7] = local0 + local atkAfterFunc = REGIST_FUNC(ai, goal, Sk_LarFal_non_scr290004_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3004_Dist_max +function Sk_LarFal_non_scr290004_Act01(ai, goal, paramTbl) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 0 + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ApproachStep, 5, 700, TARGET_ENE_0, Att3004_Dist_max, 0) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3000_Dist_max +function Sk_LarFal_non_scr290004_Act02(ai, goal, paramTbl) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3003_Dist_max +function Sk_LarFal_non_scr290004_Act03(ai, goal, paramTbl) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Sk_LarFal_non_scr290004_ActAfter_AdjustSpace(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local KN_fate = ai:GetRandam_Int(1, 100) + if KN_fate > 25 then + if KN_fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0) + return true + elseif KN_fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0) + return true + elseif KN_fate <= 0 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 700, TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 700, TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 700, TARGET_SELF, 0, AI_DIR_TYPE_F, 4) + return true + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 0) + return true + end + else + return false + end +end + +function Sk_LarFal_non_scr290004Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Sk_LarFal_non_scr290004Battle_Terminate(ai, goal) + return +end + +function Sk_LarFal_non_scr290004Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if ai:IsLadderAct(TARGET_SELF) then + return false + else + local superStepDist = 3 + local superStepPer = 25 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 3.5 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distDamagedStep = 3 + local oddsDamagedStep = 25 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 3.5 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distMissSwing_Int = 3.1 + local oddsMissSwing_Int = 50 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if targetDist <= 2.2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distUseItem_Act = 6 + local oddsUseItem_Act = 5 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if targetDist <= 3 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3008, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distResNear = 6 + local distResFar = 18 + local oddsResNear = 20 + local oddsResFar = 30 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_Guard, 2, 9910, TARGET_ENE_0, false, 0) + return true + elseif ResBehavID == 2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + else + local oddsResponse = 20 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 3.5 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end + end + end + end + end + end + end +end + +return diff --git a/scripts_decompiled/291000_battle.lua b/scripts_decompiled/291000_battle.lua new file mode 100644 index 0000000..8fd751a --- /dev/null +++ b/scripts_decompiled/291000_battle.lua @@ -0,0 +1,252 @@ +REGISTER_GOAL(GOAL_BigSk_Sword291000_Battle, "BigSk_Sword291000Battle") +local Att3000_Dist_min = 2.7 +local Att3000_Dist_max = 5.2 +local Att3002_Dist_min = 4.1 +local Att3002_Dist_max = 6 +local Att3003_Dist_min = 3.2 +local Att3003_Dist_max = 5.1 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 1.5 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 2.2 +REGISTER_GOAL_NO_UPDATE(GOAL_BigSk_Sword291000_Battle, 1) +Att3000_Dist_min = Att3002_Dist_max +function BigSk_Sword291000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if 6 <= targetDist then + actPerArr[2] = 25 + actPerArr[3] = 35 + actPerArr[4] = 25 + actPerArr[5] = 10 + actPerArr[6] = 5 + elseif 4.1 <= targetDist then + actPerArr[2] = 25 + actPerArr[3] = 25 + actPerArr[4] = 25 + actPerArr[5] = 15 + actPerArr[6] = 10 + elseif 3.1 <= targetDist then + actPerArr[2] = 20 + actPerArr[3] = 30 + actPerArr[4] = 20 + actPerArr[5] = 10 + actPerArr[6] = 20 + elseif 2.7 <= targetDist then + actPerArr[2] = 15 + actPerArr[3] = 25 + actPerArr[4] = 15 + actPerArr[5] = 20 + actPerArr[6] = 25 + else + actPerArr[2] = 0 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 50 + actPerArr[6] = 50 + end + actFuncArr[2] = REGIST_FUNC(ai, goal, BigSk_Sword291000_Act02) + local local0 = {Att3002_Dist_max, 75, 3002, DIST_Middle} + defFuncParamTbl[3] = local0 + actFuncArr[4] = REGIST_FUNC(ai, goal, BigSk_Sword291000_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, BigSk_Sword291000_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, BigSk_Sword291000_Act06) + local atkAfterFunc = REGIST_FUNC(ai, goal, BigSkSword291000_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function BigSk_Sword291000_Act02(ai, goal, paramTbl) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 70 + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3003_Dist_max +function BigSk_Sword291000_Act04(ai, goal, paramTbl) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 70 + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 85 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3005_Dist_max +function BigSk_Sword291000_Act05(ai, goal, paramTbl) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 70 + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_max +function BigSk_Sword291000_Act06(ai, goal, paramTbl) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 70 + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function BigSkSword291000_ActAfter_AdjustSpace(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local KN_fate = ai:GetRandam_Int(1, 100) + if KN_fate > 40 then + if KN_fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 0) + return true + elseif KN_fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 0) + return true + elseif KN_fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + return true + elseif KN_fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 10, TARGET_ENE_0, 4, TARGET_ENE_0, true, 9910) + return true + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 0) + return true + end + else + return false + end +end + +function BigSk_Sword291000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function BigSk_Sword291000Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3005_Dist_max +Att3000_Dist_min = Att3002_Dist_max +function BigSk_Sword291000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distResponse = 3 + local oddsResponse = 25 + local oddsStep = 20 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 5 + local oddsLeaveAndSide = 50 + local timeSide = 4.5 + local distLeave = 2.5 + if Damaged_Step_or_Guard(ai, goal, distResponse, oddsResponse, oddsStep, bkStepPer, leftStepPer, rightStepPer, safetyDist, oddsLeaveAndSide, timeSide, distLeave) then + return true + else + local distGuardBreak_Act = 8 + local oddsGuardBreak_Act = 50 + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if targetDist <= 3.5 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3005_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + elseif targetDist <= 5.4 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3002_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distUseItem_Act = 8 + local oddsUseItem_Act = 15 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if targetDist <= 1.8 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + elseif targetDist <= 5.4 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3002_Dist_max, TARGET_SELF, false, 9910) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distResNear = 8 + local distResFar = 20 + local oddsResNear = 0 + local oddsResFar = 15 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + return true + elseif ResBehavID == 2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + elseif fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + else + return false + end + end + end + end +end + +return diff --git a/scripts_decompiled/291001_battle.lua b/scripts_decompiled/291001_battle.lua new file mode 100644 index 0000000..fa68338 --- /dev/null +++ b/scripts_decompiled/291001_battle.lua @@ -0,0 +1,87 @@ +REGISTER_GOAL(GOAL_BigSk_Bow291001_Battle, "BigSk_Bow291001Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 0 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 2.5 +REGISTER_GOAL_NO_UPDATE(GOAL_BigSk_Bow291001_Battle, 1) +Att3000_Dist_min = Att3006_Dist_max +function BigSk_Bow291001Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if 12 <= targetDist then + actPerArr[1] = 100 + actPerArr[2] = 0 + actPerArr[3] = 0 + actPerArr[4] = 0 + elseif 3 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 100 + actPerArr[3] = 0 + actPerArr[4] = 0 + else + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 70 + actPerArr[4] = 30 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, BigSk_Bow291001_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, BigSk_Bow291001_Act02) + local local0 = {Att3006_Dist_max, 0, 3006, DIST_Middle} + defFuncParamTbl[3] = local0 + actFuncArr[4] = REGIST_FUNC(ai, goal, BigSk_Bow291001_Act04) + local0 = {0, 100, 0, 0, 0, 0, 0} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace_IncludeSidestep, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +function BigSk_Bow291001_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function BigSk_Bow291001_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_None, 0) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2, TARGET_ENE_0, 20, TARGET_ENE_0, true, -1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function BigSk_Bow291001_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_None, 0) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 10, TARGET_SELF, false, -1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function BigSk_Bow291001Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function BigSk_Bow291001Battle_Terminate(ai, goal) + return +end + +function BigSk_Bow291001Battle_Interupt(ai, goal) + local distDamagedStep = 3 + local oddsDamagedStep = 25 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 4 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/292000_battle.lua b/scripts_decompiled/292000_battle.lua new file mode 100644 index 0000000..479698a --- /dev/null +++ b/scripts_decompiled/292000_battle.lua @@ -0,0 +1,143 @@ +REGISTER_GOAL(GOAL_HonebutoSk_Kouhu292000_Battle, "HonebutoSk_Kouhu292000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 3.2 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 2.1 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 2.1 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 1.4 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 5.6 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 2.5 +REGISTER_GOAL_NO_UPDATE(GOAL_HonebutoSk_Kouhu292000_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3004_Dist_max +Att3000_Dist_min = Att3002_Dist_max +function HonebutoSk_Kouhu292000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if not ai:HasSpecialEffectId(TARGET_SELF, 5401) then + actPerArr[4] = 100 + elseif 6.6 <= targetDist then + actPerArr[1] = 10 + actPerArr[2] = 0 + actPerArr[3] = 80 + actPerArr[9] = 10 + elseif 3.2 <= targetDist then + actPerArr[1] = 30 + actPerArr[2] = 40 + actPerArr[3] = 0 + actPerArr[9] = 30 + else + actPerArr[1] = 50 + actPerArr[2] = 25 + actPerArr[3] = 0 + actPerArr[9] = 25 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, HonebutoSk_Kouhu292000_Act01) + local local0 = {} + local local1, local2, local3, local4 = nil + local0[1] = Att3000_Dist_max + local0[2] = 0 + local0[3] = 50 + local0[4] = 50 + local0[5] = local1 + local0[6] = local2 + local0[7] = local3 + local0[8] = local4 + defFuncParamTbl[2] = local0 + local0 = {Att3004_Dist_max, 0, 3004, DIST_Middle} + defFuncParamTbl[3] = local0 + actFuncArr[4] = REGIST_FUNC(ai, goal, HonebutoSk_Kouhu292000_Act04) + local0 = {Att3002_Dist_max, 0, 50, 50, 3002, 3003, nil, 100} + defFuncParamTbl[9] = local0 + local0 = {0, 35, 5, 30, 0, 15, 15} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace_IncludeSidestep, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3005_Dist_max +function HonebutoSk_Kouhu292000_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3005 + local AttDist = DIST_Middle + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3005, TARGET_ENE_0, DIST_Middle, 0, 180) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function HonebutoSk_Kouhu292000_Act04(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3008, TARGET_SELF, DIST_None) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function HonebutoSk_Kouhu292000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function HonebutoSk_Kouhu292000Battle_Terminate(ai, goal) + return +end + +function HonebutoSk_Kouhu292000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distDamagedStep = 3 + local oddsDamagedStep = 25 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + local safetyDist = 4 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distGuardBreak_Act = 3.2 + local oddsGuardBreak_Act = 50 + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if 1.5 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distMissSwing_Int = 5.6 + local oddsMissSwing_Int = 30 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if 3.2 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local oddsResponse = 20 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + local safetyDist = 4 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end + end + end + end +end + +return diff --git a/scripts_decompiled/292001_battle.lua b/scripts_decompiled/292001_battle.lua new file mode 100644 index 0000000..bc612f5 --- /dev/null +++ b/scripts_decompiled/292001_battle.lua @@ -0,0 +1,193 @@ +REGISTER_GOAL(GOAL_HonebutoSk_Senshi292001_Battle, "HonebutoSk_Senshi292001Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 2.7 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 1.6 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 2.2 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 2.2 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 5.5 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 2.5 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 6.5 +local Att3007_Dist_min = 0 +local Att3007_Dist_max = 0.7 +REGISTER_GOAL_NO_UPDATE(GOAL_HonebutoSk_Senshi292001_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3004_Dist_max +function HonebutoSk_Senshi292001Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if 5.5 <= targetDist then + actPerArr[1] = 10 + actPerArr[2] = 5 + actPerArr[3] = 40 + actPerArr[4] = 40 + actPerArr[5] = 0 + actPerArr[9] = 5 + elseif 2.7 <= targetDist then + actPerArr[1] = 50 + actPerArr[2] = 25 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[9] = 25 + else + actPerArr[1] = 35 + actPerArr[2] = 17 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 30 + actPerArr[9] = 18 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, HonebutoSk_Senshi292001_Act01) + local local0 = {} + local local1, local2, local3, local4 = nil + local0[1] = Att3000_Dist_max + local0[2] = 75 + local0[3] = 33 + local0[4] = 33 + local0[5] = local1 + local0[6] = local2 + local0[7] = local3 + local0[8] = local4 + defFuncParamTbl[2] = local0 + local0 = {Att3004_Dist_max, 75, 3004, DIST_Middle} + defFuncParamTbl[3] = local0 + actFuncArr[4] = REGIST_FUNC(ai, goal, HonebutoSk_Senshi292001_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, HonebutoSk_Senshi292001_Act05) + local0 = {Att3000_Dist_max, 75, 33, 33, 3000, 3001, 3003, nil} + defFuncParamTbl[9] = local0 + local0 = {100, 40, 15, 15, 0, 15, 15} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace_IncludeSidestep, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3005_Dist_max +function HonebutoSk_Senshi292001_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3005 + local AttDist = DIST_Middle + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3005, TARGET_ENE_0, DIST_Middle, 0, 180) + GetWellSpace_Odds = 75 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_max +function HonebutoSk_Senshi292001_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 75 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3007_Dist_max +function HonebutoSk_Senshi292001_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 75 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function HonebutoSk_Senshi292001Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function HonebutoSk_Senshi292001Battle_Terminate(ai, goal) + return +end + +function HonebutoSk_Senshi292001Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distResponse = 3 + local oddsResponse = 50 + local oddsStep = 30 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + local safetyDist = 4 + local oddsLeaveAndSide = 50 + local timeSide = 4.5 + local distLeave = 2.5 + if Damaged_Step_or_Guard(ai, goal, distResponse, oddsResponse, oddsStep, bkStepPer, leftStepPer, rightStepPer, safetyDist, oddsLeaveAndSide, timeSide, distLeave) then + return true + else + local distGuardBreak_Act = 2.2 + local oddsGuardBreak_Act = 50 + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distMissSwing_Int = 2.2 + local oddsMissSwing_Int = 30 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local oddsResponse = 1 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 4 + if MissSwingSelf_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local oddsResponse = 20 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + local safetyDist = 4 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distSuccessGuard_Act = 2.2 + local oddsSuccessGuard_Act = 50 + if SuccessGuard_Act(ai, goal, distSuccessGuard_Act, oddsSuccessGuard_Act) then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + return false + end + end + end + end + end + end +end + +return diff --git a/scripts_decompiled/293000_battle.lua b/scripts_decompiled/293000_battle.lua new file mode 100644 index 0000000..0d73ba2 --- /dev/null +++ b/scripts_decompiled/293000_battle.lua @@ -0,0 +1,57 @@ +REGISTER_GOAL(GOAL_Syarin293000_Battle, "Syarin293000Battle") +REGISTER_GOAL_NO_UPDATE(GOAL_Syarin293000_Battle, 1) +function Syarin293000Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local targetDistY = ai:GetDistY(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + if ai:HasSpecialEffectId(TARGET_SELF, 5401) then + goal:AddSubGoal(GOAL_COMMON_ApproachStep, 5, 700, TARGET_ENE_0, 2, 0) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 700, TARGET_SELF, 0, AI_DIR_TYPE_F, 0) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 700, TARGET_SELF, 0, AI_DIR_TYPE_F, 0) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 700, TARGET_SELF, 0, AI_DIR_TYPE_F, 0) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_SELF, DIST_None) + elseif 5 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, 10, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 5, TARGET_ENE_0, true, -1) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, -1, AI_DIR_TYPE_F, 3) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, 10, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 90 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, 10, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, 1.5, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 2, TARGET_ENE_0, true, -1) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, -1) + end + end + return +end + +function Syarin293000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Syarin293000Battle_Terminate(ai, goal) + return +end + +function Syarin293000Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_ChangedAnimIdOffset) then + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/294000_battle.lua b/scripts_decompiled/294000_battle.lua new file mode 100644 index 0000000..79b8c0f --- /dev/null +++ b/scripts_decompiled/294000_battle.lua @@ -0,0 +1,40 @@ +REGISTER_GOAL(GOAL_Skeleton_baby294000_Battle, "Skeleton_baby294000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 3 +REGISTER_GOAL_NO_UPDATE(GOAL_Skeleton_baby294000_Battle, 1) +function OnIf_294000(ai, goal, codeNo) + if codeNo == 0 and ai:IsRideLargeSpaceFlag(TARGET_SELF) then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_None) + end + return +end + +function Skeleton_baby294000Battle_Activate(ai, goal) + if ai:HasSpecialEffectId(TARGET_SELF, 5111) then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, TARGET_ENE_0, 2, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_If, 10, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, TARGET_ENE_0, 2, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0, 1.5), TARGET_SELF, 0, 0, 0) + end + return +end + +function Skeleton_baby294000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Skeleton_baby294000Battle_Terminate(ai, goal) + return +end + +function Skeleton_baby294000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + return false +end + +return diff --git a/scripts_decompiled/295000_battle.lua b/scripts_decompiled/295000_battle.lua new file mode 100644 index 0000000..f44a3fb --- /dev/null +++ b/scripts_decompiled/295000_battle.lua @@ -0,0 +1,154 @@ +REGISTER_GOAL(GOAL_Skeleton_Beast295000_Battle, "Skeleton_Beast295000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 2.2 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 2.9 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 2.7 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 6.1 +local Att3004_Dist_min = 4.8 +local Att3004_Dist_max = 6.1 +local Att3005_Dist_min = 9 +local Att3005_Dist_max = 10.7 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 5.8 +REGISTER_GOAL_NO_UPDATE(GOAL_Skeleton_Beast295000_Battle, 1) +Att3000_Dist_min = Att3002_Dist_max +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3003_Dist_max +function Skeleton_Beast295000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if 9 <= targetDist then + actPerArr[1] = 15 + actPerArr[2] = 15 + actPerArr[3] = 45 + actPerArr[5] = 25 + actPerArr[6] = 0 + elseif 4 <= targetDist then + actPerArr[1] = 25 + actPerArr[2] = 25 + actPerArr[3] = 25 + actPerArr[5] = 10 + actPerArr[6] = 15 + elseif 2.5 <= targetDist then + actPerArr[1] = 40 + actPerArr[2] = 30 + actPerArr[3] = 10 + actPerArr[5] = 0 + actPerArr[6] = 20 + else + actPerArr[1] = 30 + actPerArr[2] = 50 + actPerArr[3] = 10 + actPerArr[5] = 0 + actPerArr[6] = 10 + end + local local0 = {Att3002_Dist_max, 0, 3002, DIST_Near} + defFuncParamTbl[1] = local0 + local0 = {Att3000_Dist_max, 0, 40, 60, 3000, 3001, 3000, nil} + defFuncParamTbl[2] = local0 + local0 = {Att3003_Dist_max, 0, 3003, DIST_Middle} + defFuncParamTbl[3] = local0 + actFuncArr[5] = REGIST_FUNC(ai, goal, Skeleton_Beast295000_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, Skeleton_Beast295000_Act06) + local atkAfterFunc = REGIST_FUNC(ai, goal, Skeleton_Beast295000_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3005_Dist_min +Att3000_Dist_min = Att3005_Dist_max +Att3000_Dist_min = Att3004_Dist_max +function Skeleton_Beast295000_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if Att3005_Dist_min <= targetDist and fate <= 40 then + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3005 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + else + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3004 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_max +function Skeleton_Beast295000_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3006 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Skeleton_Beast295000_ActAfter_AdjustSpace(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local SpinTime = 0 + local SafeDist = 4 + if fate > 20 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 10, TARGET_ENE_0, 3, TARGET_ENE_0, false, -1) + return true + elseif fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, SpinTime, AI_DIR_TYPE_B, SafeDist) + return true + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, SpinTime, AI_DIR_TYPE_L, SafeDist) + return true + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, SpinTime, AI_DIR_TYPE_R, SafeDist) + return true + end + else + return false + end +end + +function Skeleton_Beast295000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Skeleton_Beast295000Battle_Terminate(ai, goal) + return +end + +function Skeleton_Beast295000Battle_Interupt(ai, goal) + local distGuardBreak_Act = 3 + local oddsGuardBreak_Act = 25 + local fate = ai:GetRandam_Int(1, 100) + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/296000_battle.lua b/scripts_decompiled/296000_battle.lua new file mode 100644 index 0000000..536de59 --- /dev/null +++ b/scripts_decompiled/296000_battle.lua @@ -0,0 +1,147 @@ +REGISTER_GOAL(GOAL_totem296000_Battle, "totem296000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 1.5 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 3 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 1.5 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 3 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 1.5 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 3 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 1.5 +local Att3007_Dist_min = 0 +local Att3007_Dist_max = 3 +local Att3008_Dist_min = 0 +local Att3008_Dist_max = 1.5 +local Att3009_Dist_min = 0 +local Att3009_Dist_max = 2.5 +REGISTER_GOAL_NO_UPDATE(GOAL_totem296000_Battle, 1) +function totem296000Battle_Activate(ai, goal) + local hprate = ai:GetHpRate(TARGET_SELF) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act08Per = 0 + local Act09Per = 0 + local Act10Per = 0 + local Act11Per = 0 + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 20) and targetDist <= 1.5 then + Act01Per = 55 + Act02Per = 30 + Act09Per = 10 + Act10Per = 5 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 15) and targetDist <= 3 then + Act02Per = 60 + Act10Per = 20 + Act11Per = 20 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 20) and targetDist <= 1.5 then + Act03Per = 55 + Act04Per = 30 + Act09Per = 10 + Act10Per = 5 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 15) and targetDist <= 3 then + Act04Per = 60 + Act10Per = 20 + Act11Per = 20 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 20) and targetDist <= 1.5 then + Act05Per = 55 + Act06Per = 30 + Act09Per = 10 + Act10Per = 5 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 15) and targetDist <= 3 then + Act06Per = 60 + Act10Per = 20 + Act11Per = 20 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 20) and targetDist <= 1.5 then + Act07Per = 55 + Act08Per = 30 + Act09Per = 10 + Act10Per = 5 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 15) and targetDist <= 3 then + Act08Per = 60 + Act10Per = 20 + Act11Per = 20 + elseif targetDist <= 1.5 then + Act09Per = 80 + Act10Per = 20 + elseif targetDist <= 2.5 then + Act10Per = 80 + Act11Per = 20 + else + Act11Per = 100 + end + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per) + if fateAct <= Act01Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 1.5), TARGET_SELF, 0, 0, 0) + elseif fateAct <= Act01Per + Act02Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 1.5), TARGET_SELF, 0, 0, 0) + elseif fateAct <= Act01Per + Act02Per + Act03Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 1.5), TARGET_SELF, 0, 0, 0) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 1.5), TARGET_SELF, 0, 0, 0) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 1.5), TARGET_SELF, 0, 0, 0) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 1.5), TARGET_SELF, 0, 0, 0) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 1.5), TARGET_SELF, 0, 0, 0) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 1.5), TARGET_SELF, 0, 0, 0) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3008, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 1.5), TARGET_SELF, 0, 0, 0) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 1.5), TARGET_SELF, 0, 0, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, ai:GetRandam_Float(1.3, 2.8), TARGET_None, true, -1) + end + return +end + +function totem296000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function totem296000Battle_Terminate(ai, goal) + return +end + +function totem296000Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_Damaged) and 7 <= targetDist and fate <= 75 then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, 2, TARGET_None, false, -1) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 1.5), TARGET_SELF, 0, 0, 0) + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/309000_battle.lua b/scripts_decompiled/309000_battle.lua new file mode 100644 index 0000000..2af5c22 --- /dev/null +++ b/scripts_decompiled/309000_battle.lua @@ -0,0 +1,56 @@ +REGISTER_GOAL(GOAL_Ooka309000_Battle, "Ooka309000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 0.75 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 0.9 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 3 +REGISTER_GOAL_NO_UPDATE(GOAL_Ooka309000_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3001_Dist_max +Att3000_Dist_min = Att3002_Dist_min +Att3000_Dist_min = Att3002_Dist_max +function Ooka309000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if 8 <= targetDist then + actPerArr[1] = 5 + actPerArr[3] = 40 + actPerArr[5] = 55 + elseif 3 <= targetDist then + actPerArr[1] = 10 + actPerArr[3] = 40 + actPerArr[5] = 50 + else + actPerArr[1] = 40 + actPerArr[3] = 30 + actPerArr[5] = 30 + end + local local0 = {Att3000_Dist_max, 0, 3000, DIST_Middle} + defFuncParamTbl[1] = local0 + local0 = {Att3001_Dist_max, 0, 3001, DIST_Middle} + defFuncParamTbl[3] = local0 + local0 = {Att3002_Dist_min, Att3002_Dist_max, 0, 3002, DIST_Far} + defFuncParamTbl[5] = local0 + local0 = {0, 60, 10, 10, 20, 0} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +function Ooka309000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Ooka309000Battle_Terminate(ai, goal) + return +end + +function Ooka309000Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/320000_battle.lua b/scripts_decompiled/320000_battle.lua new file mode 100644 index 0000000..a8de300 --- /dev/null +++ b/scripts_decompiled/320000_battle.lua @@ -0,0 +1,56 @@ +REGISTER_GOAL(GOAL_Funiku320000_Battle, "Funiku320000Battle") +REGISTER_GOAL_NO_UPDATE(GOAL_Funiku320000_Battle, 1) +function Funiku320000Battle_Activate(ai, goal) + local hprate = ai:GetHpRate(TARGET_SELF) + local targethprate = ai:GetHpRate(TARGET_ENE_0) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local AtkDist = 1 + ai:AddObserveRegion(1, TARGET_SELF, 1002800) + if AtkDist <= targetDist then + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(2, 4), TARGET_NONE, 0, 0, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, 0.8, TARGET_SELF, true, -1) + end + elseif fate <= 55 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 40) then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3000, TARGET_ENE_0, DIST_Middle) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 40) then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3001, TARGET_ENE_0, DIST_Middle) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 40) then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3004, TARGET_ENE_0, DIST_Middle) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 40) then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3005, TARGET_ENE_0, DIST_Middle) + else + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3002, TARGET_ENE_0, DIST_Middle) + end + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, 1.5, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3003, TARGET_ENE_0, DIST_Middle, 0, 15) + end + return +end + +function Funiku320000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Funiku320000Battle_Terminate(ai, goal) + return +end + +function Funiku320000Battle_Interupt(ai, goal) + if ai:IsInterupt(INTERUPT_Inside_ObserveArea) and ai:IsInsideObserve(1) then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, POINT_INITIAL, 0.5, TARGET_ENE_0, true, -1) + goal:AddSubGoal(GOAL_COMMON_Wait, 2, TARGET_ENE_0, 0, 0, 0) + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/321000_battle.lua b/scripts_decompiled/321000_battle.lua new file mode 100644 index 0000000..b4d0e21 --- /dev/null +++ b/scripts_decompiled/321000_battle.lua @@ -0,0 +1,76 @@ +REGISTER_GOAL(GOAL_Tamago321000_Battle, "Tamago321000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 1.1 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 1 +REGISTER_GOAL_NO_UPDATE(GOAL_Tamago321000_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3001_Dist_max +function Tamago321000Battle_Activate(ai, goal) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local Act01Per = 0 + local Act02Per = 0 + if 1.5 <= targetDist then + Act01Per = 40 + Act02Per = 60 + else + Act01Per = 20 + Act02Per = 80 + end + local doAdmirer = ai:GetExcelParam(AI_EXCEL_THINK_PARAM_TYPE__thinkAttr_doAdmirer) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local Odds_Guard = 0 + if doAdmirer == 1 and role == ROLE_TYPE_Torimaki then + Torimaki_Act(ai, goal, Odds_Guard) + elseif doAdmirer == 1 and role == ROLE_TYPE_Kankyaku then + Kankyaku_Act(ai, goal, Odds_Guard) + else + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per) + if fateAct <= Act01Per then + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 1 + local Odds_Guard = 0 + local AttID = 3000 + local AttDist = DIST_Near + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per then + local AppDist = Att3001_Dist_max + local DashDist = Att3001_Dist_max + 1 + local Odds_Guard = 0 + local AttID = 3001 + local AttDist = DIST_Near + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + end + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + local Odds_Guard = 0 + local Odds_NoAct = 80 + local Odds_BackAndSide = 0 + local Odds_Back = 5 + local Odds_BitWait = 15 + local Odds_Backstep = 0 + GetWellSpace_Act(ai, goal, Odds_Guard, Odds_NoAct, Odds_BackAndSide, Odds_Back, Odds_BitWait, Odds_Backstep) + end + return +end + +function Tamago321000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Tamago321000Battle_Terminate(ai, goal) + return +end + +function Tamago321000Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/322000_battle.lua b/scripts_decompiled/322000_battle.lua new file mode 100644 index 0000000..18a0a9d --- /dev/null +++ b/scripts_decompiled/322000_battle.lua @@ -0,0 +1,95 @@ +REGISTER_GOAL(GOAL_Kisei322000_Battle, "Kisei322000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 1.7 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 1.8 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 2.8 +REGISTER_GOAL_NO_UPDATE(GOAL_Kisei322000_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3001_Dist_max +Att3000_Dist_min = Att3002_Dist_max +function Kisei322000Battle_Activate(ai, goal) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local GetWellSpace_Odds = 0 + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + if 5 <= targetDist then + Act01Per = 10 + Act02Per = 10 + Act03Per = 80 + elseif 2 <= targetDist then + Act01Per = 40 + Act02Per = 40 + Act03Per = 20 + else + Act01Per = 50 + Act02Per = 50 + Act03Per = 0 + end + local doAdmirer = ai:GetExcelParam(AI_EXCEL_THINK_PARAM_TYPE__thinkAttr_doAdmirer) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local Odds_Guard = 0 + if doAdmirer == 1 and role == ROLE_TYPE_Torimaki then + Torimaki_Act(ai, goal, Odds_Guard) + elseif doAdmirer == 1 and role == ROLE_TYPE_Kankyaku then + Kankyaku_Act(ai, goal, Odds_Guard) + else + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per) + if fateAct <= Act01Per then + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 1 + local Odds_Guard = 0 + local AttID = 3000 + local AttDist = DIST_Near + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per then + local AppDist = Att3001_Dist_max + local DashDist = Att3001_Dist_max + 1 + local Odds_Guard = 0 + local AttID = 3001 + local AttDist = DIST_Near + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 0 + else + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 1 + local Odds_Guard = 0 + local AttID = 3002 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 0 + end + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + local Odds_Guard = 0 + local Odds_NoAct = 30 + local Odds_BackAndSide = 0 + local Odds_Back = 5 + local Odds_BitWait = 30 + local Odds_Backstep = 35 + GetWellSpace_Act(ai, goal, Odds_Guard, Odds_NoAct, Odds_BackAndSide, Odds_Back, Odds_BitWait, Odds_Backstep) + end + return +end + +function Kisei322000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Kisei322000Battle_Terminate(ai, goal) + return +end + +function Kisei322000Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/323000_battle.lua b/scripts_decompiled/323000_battle.lua new file mode 100644 index 0000000..20643c7 --- /dev/null +++ b/scripts_decompiled/323000_battle.lua @@ -0,0 +1,306 @@ +REGISTER_GOAL(GOAL_Kagerou323000_Battle, "Kagerou323000Battle") +REGISTER_GOAL_NO_UPDATE(GOAL_Kagerou323000_Battle, 1) +function OnIf_323000(ai, goal, codeNo) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if codeNo == 0 then + ai:SetTimer(0, 60) + ai:SetTimer(1, 30) + local stdHPrate = ai:GetHpRate(TARGET_SELF) + ai:SetNumber(1, stdHPrate) + ai:SetNumber(0, 1) + end + return +end + +function Kagerou323000Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local hprate = ai:GetHpRate(TARGET_SELF) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Shoot01Per = 0 + local Shoot02Per = 0 + local Shoot03Per = 0 + local Shoot04Per = 0 + local FirstImpression = ai:GetNumber(0) + local Timer0 = ai:GetTimer(0) + local Timer1 = ai:GetTimer(1) + local Number0 = ai:GetNumber(0) + local Number1 = ai:GetNumber(1) + local Damaged = ai:GetNumber(1) - hprate + if FirstImpression == 0 then + goal:AddSubGoal(GOAL_COMMON_If, 10, 0) + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_NONE, 0, 0, 0) + end + if ai:IsInsideTargetRegion(TARGET_SELF, 1202210) then + Act04Per = 100 + elseif not (not ai:IsFinishTimer(0) or FirstImpression ~= 1 or ai:IsInsideTargetRegion(TARGET_SELF, 1202226)) or hprate <= ai:GetNumber(1) - 0.2 and ai:IsFinishTimer(1) and FirstImpression == 1 and not ai:IsInsideTargetRegion(TARGET_SELF, 1202226) then + Act03Per = 100 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1202245) and (not not ai:IsInsideTargetRegion(TARGET_SELF, 1202225) or ai:IsInsideTargetRegion(TARGET_SELF, 1202226)) then + Act05Per = 100 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1202245) and (not not ai:IsInsideTargetRegion(TARGET_SELF, 1202227) or not not ai:IsInsideTargetRegion(TARGET_SELF, 1202228) or ai:IsInsideTargetRegion(TARGET_SELF, 1202228)) then + Act06Per = 100 + elseif ai:IsInsideTargetRegion(TARGET_SELF, 1202220) then + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1202240) then + Act02Per = 5 + Act06Per = 35 + Act07Per = 60 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1202241) then + Act02Per = 60 + Act06Per = 35 + Act07Per = 5 + else + Act02Per = 95 + Act06Per = 5 + end + elseif ai:IsInsideTargetRegion(TARGET_SELF, 1202221) then + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1202240) then + Act01Per = 60 + Act05Per = 15 + Act07Per = 25 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1202241) then + Act01Per = 20 + Act02Per = 20 + Act07Per = 60 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1202242) then + Act02Per = 60 + Act06Per = 15 + Act07Per = 25 + else + Act02Per = 95 + Act06Per = 5 + end + elseif ai:IsInsideTargetRegion(TARGET_SELF, 1202222) then + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1202240) then + Act01Per = 85 + Act05Per = 15 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1202241) then + Act01Per = 60 + Act05Per = 15 + Act07Per = 25 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1202242) then + Act01Per = 20 + Act02Per = 20 + Act07Per = 60 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1202243) then + Act02Per = 60 + Act06Per = 15 + Act07Per = 25 + else + Act02Per = 85 + Act06Per = 15 + end + elseif ai:IsInsideTargetRegion(TARGET_SELF, 1202223) then + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1202244) then + Act02Per = 60 + Act06Per = 15 + Act07Per = 25 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1202243) then + Act01Per = 20 + Act02Per = 20 + Act07Per = 60 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1202242) then + Act01Per = 60 + Act05Per = 15 + Act07Per = 25 + else + Act01Per = 95 + Act05Per = 5 + end + elseif ai:IsInsideTargetRegion(TARGET_SELF, 1202224) then + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1202244) then + Act01Per = 5 + Act05Per = 35 + Act07Per = 60 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1202243) then + Act01Per = 60 + Act05Per = 35 + Act07Per = 5 + else + Act01Per = 95 + Act05Per = 5 + end + elseif ai:IsInsideTargetRegion(TARGET_SELF, 1202225) then + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1202240) then + Act01Per = 5 + Act05Per = 35 + Act07Per = 60 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1202241) then + Act01Per = 60 + Act05Per = 35 + Act07Per = 5 + else + Act01Per = 95 + Act05Per = 5 + end + elseif ai:IsInsideTargetRegion(TARGET_SELF, 1202226) then + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1202240) then + Act02Per = 60 + Act06Per = 15 + Act07Per = 25 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1202241) then + Act01Per = 20 + Act02Per = 20 + Act07Per = 60 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1202242) then + Act01Per = 60 + Act05Per = 15 + Act07Per = 25 + else + Act01Per = 95 + Act05Per = 5 + end + elseif ai:IsInsideTargetRegion(TARGET_SELF, 1202227) then + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1202240) then + Act02Per = 85 + Act06Per = 15 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1202241) then + Act02Per = 60 + Act06Per = 15 + Act07Per = 25 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1202242) then + Act01Per = 20 + Act02Per = 20 + Act07Per = 60 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1202243) then + Act01Per = 60 + Act05Per = 15 + Act07Per = 25 + else + Act01Per = 85 + Act05Per = 15 + end + elseif ai:IsInsideTargetRegion(TARGET_SELF, 1202228) then + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1202244) then + Act01Per = 60 + Act05Per = 15 + Act07Per = 25 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1202243) then + Act01Per = 20 + Act02Per = 20 + Act07Per = 60 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1202242) then + Act02Per = 60 + Act06Per = 15 + Act07Per = 25 + else + Act02Per = 95 + Act06Per = 5 + end + elseif ai:IsInsideTargetRegion(TARGET_SELF, 1202229) then + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1202244) then + Act02Per = 5 + Act06Per = 35 + Act07Per = 60 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1202243) then + Act02Per = 60 + Act06Per = 35 + Act07Per = 5 + else + Act02Per = 95 + Act06Per = 5 + end + else + ai:PrintText("ERROR Area Over") + Act07Per = 100 + end + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per) + local fateShoot = ai:GetRandam_Int(1, Shoot01Per + Shoot02Per + Shoot03Per + Shoot04Per) + if fateAct <= Act01Per then + local RightMove = 3010 + if fate <= 50 then + RightMove = 3010 + elseif fate <= 80 then + RightMove = 3001 + else + RightMove = 3002 + end + ai:PrintText("Do RightMove") + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, RightMove, TARGET_ENE_0, DIST_None, 0) + elseif fateAct <= Act01Per + Act02Per then + local LeftMove = 3011 + if fate <= 50 then + LeftMove = 3011 + elseif fate <= 80 then + LeftMove = 3004 + else + LeftMove = 3005 + end + ai:PrintText("Do LeftMove") + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, LeftMove, TARGET_ENE_0, DIST_None, 0) + elseif fateAct <= Act01Per + Act02Per + Act03Per then + ai:PrintText("Do Landing") + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3020, TARGET_ENE_0, DIST_None, 0) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + ai:PrintText("Do TakeOff") + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(4, 8), TARGET_NONE, 0, 0, 0) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3001, TARGET_ENE_0, DIST_None, 0) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3000, TARGET_ENE_0, DIST_None, 0) + goal:AddSubGoal(GOAL_COMMON_If, 10, 0) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + local RightTurn = 3013 + if fate <= 80 and hprate <= 0.5 then + RightTurn = 3013 + else + RightTurn = 3024 + end + ai:PrintText("Do Turnaround Right") + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, RightTurn, TARGET_ENE_0, DIST_None, 0) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + local LeftTurn = 3012 + if fate <= 80 and hprate <= 0.5 then + LeftTurn = 3012 + else + LeftTurn = 3022 + end + ai:PrintText("Do Turnaround Left") + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, LeftTurn, TARGET_ENE_0, DIST_None, 0) + else + local Hover = 3014 + if hprate <= 0.5 then + if fate <= 15 then + Hover = 3014 + elseif fate <= 30 then + Hover = 3007 + elseif fate <= 100 then + Hover = 3015 + else + Hover = 3008 + end + elseif fate <= 35 then + Hover = 3014 + elseif fate <= 75 then + Hover = 3007 + elseif fate <= 90 then + Hover = 3015 + else + Hover = 3008 + end + ai:PrintText("Do Hover") + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, Hover, TARGET_ENE_0, DIST_None, 0) + end + return +end + +function Kagerou323000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Kagerou323000Battle_Terminate(ai, goal) + return +end + +function Kagerou323000Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/323001_battle.lua b/scripts_decompiled/323001_battle.lua new file mode 100644 index 0000000..7657dd7 --- /dev/null +++ b/scripts_decompiled/323001_battle.lua @@ -0,0 +1,39 @@ +REGISTER_GOAL(GOAL_Kagerou_m17_323001_Battle, "Kagerou_m17_323001Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 100 +REGISTER_GOAL_NO_UPDATE(GOAL_Kagerou_m17_323001_Battle, 1) +function Kagerou_m17_323001Battle_Activate(ai, goal) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if targetDist <= 25 then + goal:AddSubGoal(GOAL_COMMON_Turn, 3, TARGET_ENE_0, 0, 0, 0) + if fate <= 33 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_None) + elseif fate <= 66 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3014, TARGET_ENE_0, DIST_None) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_None) + end + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, 100, POINT_MOVE_POINT, AI_DIR_TYPE_CENTER, 10, TARGET_SELF, true) + else + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, 100, POINT_MOVE_POINT, AI_DIR_TYPE_CENTER, 10, TARGET_SELF, true) + end + return +end + +function Kagerou_m17_323001Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Kagerou_m17_323001Battle_Terminate(ai, goal) + return +end + +function Kagerou_m17_323001Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/324000_battle.lua b/scripts_decompiled/324000_battle.lua new file mode 100644 index 0000000..1a452d3 --- /dev/null +++ b/scripts_decompiled/324000_battle.lua @@ -0,0 +1,160 @@ +REGISTER_GOAL(GOAL_Izalis324000_Battle, "Izalis324000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 3 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 3 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 5.6 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 2.6 +local Att3004_Dist_min = 4 +local Att3004_Dist_max = 6 +REGISTER_GOAL_NO_UPDATE(GOAL_Izalis324000_Battle, 1) +function Izalis324000Battle_Activate(ai, goal) + local myThinkId = ai:GetNpcThinkParamID() + local BattleArea = 1412820 + if myThinkId == 324001 then + BattleArea = 1412820 + elseif myThinkId == 324002 then + BattleArea = 1412830 + elseif myThinkId == 324000 then + BattleArea = 1412840 + end + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if not ai:IsInsideTargetRegion(TARGET_ENE_0, BattleArea) then + if targetDist <= 6 then + actPerArr[4] = 20 + actPerArr[5] = 20 + actPerArr[6] = 60 + else + actPerArr[6] = 100 + end + elseif 8 <= targetDist then + actPerArr[1] = 15 + actPerArr[2] = 15 + actPerArr[3] = 0 + actPerArr[4] = 10 + actPerArr[5] = 60 + elseif 3 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 20 + actPerArr[3] = 0 + actPerArr[4] = 30 + actPerArr[5] = 30 + elseif 1.2 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 20 + actPerArr[3] = 30 + actPerArr[4] = 30 + actPerArr[5] = 0 + else + actPerArr[1] = 15 + actPerArr[2] = 15 + actPerArr[3] = 50 + actPerArr[4] = 20 + actPerArr[5] = 0 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, HusiFight_Izalis324000_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, HusiFight_Izalis324000_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, HusiFight_Izalis324000_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, HusiFight_Izalis324000_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, HusiFight_Izalis324000_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, HusiFight_Izalis324000_Act06) + local atkAfterFunc = REGIST_FUNC(ai, goal, Izalis324000_ActAfter_AdjustSpace) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3001_Dist_max +function HusiFight_Izalis324000_Act01(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3001_Dist_max + local DashDist = Att3001_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3001, TARGET_ENE_0, DIST_Middle, 20, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3002_Dist_max +function HusiFight_Izalis324000_Act02(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, DIST_Middle, 20, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3003_Dist_max +function HusiFight_Izalis324000_Act03(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3003, TARGET_ENE_0, DIST_Middle, 20, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3000_Dist_max +function HusiFight_Izalis324000_Act04(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, 20, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3004_Dist_max +function HusiFight_Izalis324000_Act05(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3004, TARGET_ENE_0, DIST_Middle, 20, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function HusiFight_Izalis324000_Act06(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, POINT_INITIAL, 1, TARGET_ENE_0, True, -1) + goal:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_SELF) + goal:AddSubGoal(GOAL_COMMON_Turn, 2, TARGET_ENE_0, 0, 0, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Izalis324000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Izalis324000Battle_Terminate(ai, goal) + ai:ChangeMoveAnimParam(0) + return +end + +function Izalis324000Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/325000_battle.lua b/scripts_decompiled/325000_battle.lua new file mode 100644 index 0000000..f13755b --- /dev/null +++ b/scripts_decompiled/325000_battle.lua @@ -0,0 +1,134 @@ +REGISTER_GOAL(GOAL_IzalisQueen325000_Battle, "IzalisQueen325000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 1.9 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 3.5 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 2.5 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 1.4 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 4.6 +REGISTER_GOAL_NO_UPDATE(GOAL_IzalisQueen325000_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3001_Dist_max +Att3000_Dist_min = Att3002_Dist_max +Att3000_Dist_min = Att3003_Dist_max +Att3000_Dist_min = Att3005_Dist_max +function IzalisQueen325000Battle_Activate(ai, goal) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local GetWellSpace_Odds = 0 + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + if 8 <= targetDist then + Act01Per = 10 + Act02Per = 35 + Act03Per = 10 + Act04Per = 10 + Act05Per = 35 + elseif 3.5 <= targetDist then + Act01Per = 20 + Act02Per = 25 + Act03Per = 10 + Act04Per = 25 + Act05Per = 20 + else + Act01Per = 35 + Act02Per = 10 + Act03Per = 10 + Act04Per = 35 + Act05Per = 10 + end + local doAdmirer = ai:GetExcelParam(AI_EXCEL_THINK_PARAM_TYPE__thinkAttr_doAdmirer) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local Odds_Guard = 0 + if doAdmirer == 1 and role == ROLE_TYPE_Torimaki then + Torimaki_Act(ai, goal, Odds_Guard) + elseif doAdmirer == 1 and role == ROLE_TYPE_Kankyaku then + Kankyaku_Act(ai, goal, Odds_Guard) + else + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per) + if fateAct <= Act01Per then + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3000 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per then + local AppDist = Att3001_Dist_max + local DashDist = Att3001_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3001 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per then + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3002 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + local fate2 = ai:GetRandam_Int(1, 100) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate2 <= 30 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + else + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3005 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + end + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + local Odds_Guard = 0 + local Odds_NoAct = 30 + local Odds_BackAndSide = 0 + local Odds_Back = 30 + local Odds_BitWait = 40 + local Odds_Backstep = 0 + GetWellSpace_Act(ai, goal, Odds_Guard, Odds_NoAct, Odds_BackAndSide, Odds_Back, Odds_BitWait, Odds_Backstep) + end + return +end + +function IzalisQueen325000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function IzalisQueen325000Battle_Terminate(ai, goal) + return +end + +function IzalisQueen325000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + return false +end + +return diff --git a/scripts_decompiled/327000_battle.lua b/scripts_decompiled/327000_battle.lua new file mode 100644 index 0000000..76b8df9 --- /dev/null +++ b/scripts_decompiled/327000_battle.lua @@ -0,0 +1,169 @@ +REGISTER_GOAL(GOAL_basilisk327000_Battle, "basilisk327000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 3.2 +local Att3001_Dist_min = 5.2 +local Att3001_Dist_max = 8.2 +REGISTER_GOAL_NO_UPDATE(GOAL_basilisk327000_Battle, 1) +function basilisk327000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if 15 <= targetDist then + actPerArr[1] = 5 + actPerArr[2] = 95 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 0 + elseif 10.5 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 80 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 0 + elseif 7 <= targetDist then + actPerArr[1] = 25 + actPerArr[2] = 0 + actPerArr[3] = 70 + actPerArr[4] = 0 + actPerArr[5] = 5 + elseif 2.5 <= targetDist then + actPerArr[1] = 70 + actPerArr[2] = 0 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 30 + else + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 0 + actPerArr[4] = 60 + actPerArr[5] = 40 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, basilisk327000_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, basilisk327000_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, basilisk327000_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, basilisk327000_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, basilisk327000_Act05) + local atkAfterFunc = REGIST_FUNC(ai, goal, basilisk327000_ActAfter_AdjustSpace) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +function basilisk327000_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if 18 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, 15, TARGET_SELF, true, -1) + elseif 15 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, 13, TARGET_SELF, true, -1) + elseif 12 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, 10, TARGET_SELF, true, -1) + end + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, 2.5, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function basilisk327000_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if 18 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, 15, TARGET_SELF, true, -1) + elseif 15 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, 13, TARGET_SELF, true, -1) + elseif 12 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, 10, TARGET_SELF, true, -1) + elseif 10 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, 8.5, TARGET_SELF, true, -1) + end + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, 8.5, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function basilisk327000_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function basilisk327000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function basilisk327000_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function basilisk327000_ActAfter_AdjustSpace(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate > 10 then + if fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 2.5, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(15, 30), true, true, -1) + return true + elseif fate2 <= 40 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + elseif fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + end + return true + else + return false + end +end + +function basilisk327000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function basilisk327000Battle_Terminate(ai, goal) + return +end + +function basilisk327000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local superStepDist = 4 + local superStepPer = 25 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer) then + return true + else + local distDamagedStep = 4 + local oddsDamagedStep = 15 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 4 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end + end +end + +return diff --git a/scripts_decompiled/329000_battle.lua b/scripts_decompiled/329000_battle.lua new file mode 100644 index 0000000..d91471b --- /dev/null +++ b/scripts_decompiled/329000_battle.lua @@ -0,0 +1,139 @@ +REGISTER_GOAL(GOAL_Ohmushi329000_Battle, "Ohmushi329000Battle") +local Att3000_Dist_min = 0.7 +local Att3000_Dist_max = 1.1 +local Att3001_Dist_min = 1.5 +local Att3001_Dist_max = 3.4 +local Att3002_Dist_min = 1.5 +local Att3002_Dist_max = 3.3 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 3.9 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 3.9 +REGISTER_GOAL_NO_UPDATE(GOAL_Ohmushi329000_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +function Ohmushi329000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + local EventNo = ai:GetEventRequest() + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + ai:AddObserveChrDmySphere(0, TARGET_ENE_0, 160, 2) + ai:AddObserveChrDmySphere(1, TARGET_ENE_0, 161, 3) + ai:AddObserveChrDmySphere(2, TARGET_ENE_0, 170, 2) + ai:AddObserveChrDmySphere(3, TARGET_ENE_0, 171, 2) + local targetDist = ai:GetDist(TARGET_ENE_0) + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 96) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 170) and targetDist <= 2.1 then + actPerArr[1] = 5 + actPerArr[2] = 95 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 0 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 78) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 170) and targetDist <= 2.1 then + actPerArr[1] = 5 + actPerArr[2] = 0 + actPerArr[3] = 95 + actPerArr[4] = 0 + actPerArr[5] = 0 + elseif ai:IsInsideObserve(2) and targetDist <= 2.5 then + actPerArr[1] = 5 + actPerArr[2] = 0 + actPerArr[3] = 0 + actPerArr[4] = 95 + actPerArr[5] = 0 + elseif ai:IsInsideObserve(3) and targetDist <= 2.5 then + actPerArr[1] = 5 + actPerArr[2] = 0 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 95 + else + actPerArr[1] = 100 + actPerArr[2] = 0 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 0 + end + local local0 = {Att3000_Dist_max, 0, 3000, DIST_Middle} + defFuncParamTbl[1] = local0 + actFuncArr[2] = REGIST_FUNC(ai, goal, Ohmushi329000_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, Ohmushi329000_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, Ohmushi329000_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, Ohmushi329000_Act05) + local atkAfterFunc = REGIST_FUNC(ai, goal, Ohmushi329000_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3001_Dist_max +function Ohmushi329000_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3001_Dist_max + local DashDist = Att3001_Dist_max + 2 + local Odds_Guard = 0 + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3002_Dist_max +function Ohmushi329000_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 0 + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3003_Dist_max +function Ohmushi329000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3004_Dist_max +function Ohmushi329000_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 0 + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Ohmushi329000_ActAfter_AdjustSpace(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if fate > 30 then + if fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 2.5, TARGET_ENE_0, false, -1) + return true + else + goal:AddSubGoal(GOAL_COMMON_Wait, 3, TARGET_NONE, 0, 0, 0) + return true + end + else + return false + end +end + +function Ohmushi329000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Ohmushi329000Battle_Terminate(ai, goal) + return +end + +function Ohmushi329000Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/330000_battle.lua b/scripts_decompiled/330000_battle.lua new file mode 100644 index 0000000..c333eaf --- /dev/null +++ b/scripts_decompiled/330000_battle.lua @@ -0,0 +1,75 @@ +REGISTER_GOAL(GOAL_CrystalLizard330000_Battle, "CrystalLizard330000Battle") +REGISTER_GOAL_NO_UPDATE(GOAL_CrystalLizard330000_Battle, 1) +function CrystalLizard330000Battle_Activate(ai, goal) + local RUNAWAY_LIFETIME = 6 + if 0 == ai:GetNumber(0) then + goal:AddSubGoal(GOAL_CrystalLizard330000_Runaway, RUNAWAY_LIFETIME) + end + goal:AddSubGoal(GOAL_CrystalLizard330000_Hide, 10) + return +end + +function CrystalLizard330000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function CrystalLizard330000Battle_Terminate(ai, goal) + return +end + +function CrystalLizard330000Battle_Interupt(ai, goal) + if not not ai:IsInterupt(INTERUPT_Damaged) or ai:IsInterupt(INTERUPT_Damaged_Stranger) then + ai:Replaning() + ai:SetNumber(0, 0) + end + return false +end + +REGISTER_GOAL(GOAL_CrystalLizard330000_Runaway, "CrystalLizard330000Runaway") +REGISTER_GOAL_NO_INTERUPT(GOAL_CrystalLizard330000_Runaway, true) +function CrystalLizard330000Runaway_Activate(ai, goal) + local life_time = goal:GetLife() + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, life_time, TARGET_ENE_0, 100, TARGET_SELF, false, -1) + return +end + +function CrystalLizard330000Runaway_Update(ai, goal) + if goal:GetLastSubGoalResult() == GOAL_RESULT_Failed then + return GOAL_RESULT_Success + else + return GOAL_RESULT_Continue + end +end + +function CrystalLizard330000Runaway_Terminate(ai, goal) + return +end + +function CrystalLizard330000Runaway_Interupt(ai, goal) + return false +end + +REGISTER_GOAL(GOAL_CrystalLizard330000_Hide, "CrystalLizard330000Hide") +REGISTER_GOAL_NO_UPDATE(GOAL_CrystalLizard330000_Hide, true) +REGISTER_GOAL_NO_INTERUPT(GOAL_CrystalLizard330000_Hide, true) +function CrystalLizard330000Hide_Activate(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3000, TARGET_ENE_0, DIST_None, 0) + local life_time = goal:GetLife() + goal:AddSubGoal(GOAL_COMMON_Wait, life_time, TARGET_ENE_0) + ai:SetNumber(0, 1) + return +end + +function CrystalLizard330000Hide_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function CrystalLizard330000Hide_Terminate(ai, goal) + return +end + +function CrystalLizard330000Hide_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/332000_battle.lua b/scripts_decompiled/332000_battle.lua new file mode 100644 index 0000000..b9e22bb --- /dev/null +++ b/scripts_decompiled/332000_battle.lua @@ -0,0 +1,240 @@ +REGISTER_GOAL(GOAL_ThreeHaori332000_Battle, "ThreeHaori332000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 50 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 50 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 6.5 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 99 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 8 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 10 +local Att3007_Dist_min = 0 +local Att3007_Dist_max = 10 +local Att3008_Dist_min = 0 +local Att3008_Dist_max = 99 +REGISTER_GOAL_NO_UPDATE(GOAL_ThreeHaori332000_Battle, 1) +function OnIf_332000(ai, goal, codeNo) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local AA01Per = 0 + local AA02Per = 0 + local AA03Per = 0 + if 10 <= targetDist then + AA01Per = 0 + AA02Per = 20 + AA03Per = 80 + elseif 4 <= targetDist then + AA01Per = 0 + AA02Per = 20 + AA03Per = 80 + else + AA01Per = 0 + AA02Per = 20 + AA03Per = 80 + end + if fate > AA01Per then + if fate <= AA01Per + AA02Per then + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(1, 1.5), 0, 0, 0, 0) + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 0) + elseif fate2 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 0) + end + end + return +end + +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3001_Dist_max +Att3000_Dist_min = Att3003_Dist_max +function ThreeHaori332000Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local hprate = ai:GetHpRate(TARGET_SELF) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local activeBreathChr = ai:GetEventRequest(0) + local Bunsin_flag = ai:GetEventRequest(1) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local GetWellSpace_Odds = 0 + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act08Per = 0 + local FirstImpression = ai:GetNumber(0) + local Bunsin_Odds = 1 + if Bunsin_flag == 1 then + Bunsin_Odds = 0 + elseif Bunsin_flag == 2 then + Bunsin_Odds = 99999 + elseif ai:IsFinishTimer(0) == false then + Bunsin_Odds = 0 + elseif FirstImpression == 0 then + Bunsin_Odds = 99999 + elseif activeBreathChr <= 1 then + Bunsin_Odds = 3 + elseif activeBreathChr <= 3 then + Bunsin_Odds = 2 + elseif activeBreathChr <= 5 then + Bunsin_Odds = 1.5 + elseif activeBreathChr <= 6 then + Bunsin_Odds = 1 + elseif activeBreathChr <= 8 then + Bunsin_Odds = 0 + else + Bunsin_Odds = 99999 + end + if role == ROLE_TYPE_Kankyaku and fate <= 100 then + Act06Per = 30 + Act08Per = 70 + Act07Per = 100 * Bunsin_Odds + elseif role == ROLE_TYPE_Torimaki and fate2 <= 100 then + Act06Per = 70 + Act08Per = 30 + Act07Per = 100 * Bunsin_Odds + elseif 8 <= targetDist then + Act01Per = 60 + Act02Per = 40 + Act07Per = 100 * Bunsin_Odds + elseif 6.5 <= targetDist then + Act01Per = 30 + Act02Per = 30 + Act03Per = 40 + Act07Per = 100 * Bunsin_Odds + elseif 4 <= targetDist then + Act01Per = 20 + Act02Per = 20 + Act03Per = 35 + Act04Per = 10 + Act05Per = 10 + Act06Per = 5 + Act07Per = 100 * Bunsin_Odds + else + Act01Per = 0 + Act02Per = 0 + Act03Per = 10 + Act04Per = 15 + Act05Per = 15 + Act06Per = 60 + Act07Per = 100 * Bunsin_Odds + end + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per) + if fateAct <= Act01Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3001_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3001, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3003_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, DIST_None, 1, 90) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3007, TARGET_ENE_0, DIST_None, 1, 90) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + ThreeHaori332000StepForLeave(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + ai:SetNumber(0, 1) + if hprate <= 0.3 then + ai:SetTimer(0, 9999) + else + ai:SetTimer(0, 15) + end + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3004, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 0 + else + GetWellSpace_Odds = 100 + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + ThreeHaori332000_ActAfter_AdjustSpace(ai, goal) + end + return +end + +function ThreeHaori332000_ActAfter_AdjustSpace(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(1, 2.5), TARGET_NONE, 0, 0, 0) + goal:AddSubGoal(GOAL_COMMON_If, 10, 0) + return +end + +function ThreeHaori332000StepForLeave(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_F, 8, 1302500) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 720, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 6) + elseif ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_L, 8, 1302500) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 722, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 6) + elseif ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_R, 8, 1302500) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 723, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 6) + elseif ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_B, 8, 1302500) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 721, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 6) + elseif ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_F, 5, 1302500) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 710, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 4) + elseif ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_L, 5, 1302500) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 712, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + elseif ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_R, 5, 1302500) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 713, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + elseif ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_B, 5, 1302500) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 711, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + elseif ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_B, 3, 1302500) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_L, 3, 1302500) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 2) + elseif ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_R, 3, 1302500) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 2) + elseif ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_F, 3, 1302500) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 700, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 2) + else + ai:SetTimer(1, 5) + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3008, TARGET_ENE_0, DIST_None, 0) + end + return +end + +function ThreeHaori332000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function ThreeHaori332000Battle_Terminate(ai, goal) + return +end + +function ThreeHaori332000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_Damaged) and ai:IsFinishTimer(1) == true and fate <= 50 then + ai:SetTimer(1, 5) + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3008, TARGET_ENE_0, DIST_None, 0) + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/332001_battle.lua b/scripts_decompiled/332001_battle.lua new file mode 100644 index 0000000..19eaddf --- /dev/null +++ b/scripts_decompiled/332001_battle.lua @@ -0,0 +1,206 @@ +REGISTER_GOAL(GOAL_ThreeHaoriBunsin332001_Battle, "ThreeHaoriBunsin332001Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 50 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 50 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 6.5 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 8 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 10 +local Att3007_Dist_min = 0 +local Att3007_Dist_max = 10 +REGISTER_GOAL_NO_UPDATE(GOAL_ThreeHaoriBunsin332001_Battle, 1) +function OnIf_332001(ai, goal, codeNo) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local AA01Per = 0 + local AA02Per = 0 + local AA03Per = 0 + if 10 <= targetDist then + AA01Per = 0 + AA02Per = 20 + AA03Per = 80 + elseif 4 <= targetDist then + AA01Per = 0 + AA02Per = 20 + AA03Per = 80 + else + AA01Per = 0 + AA02Per = 20 + AA03Per = 80 + end + if fate > AA01Per then + if fate <= AA01Per + AA02Per then + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(1, 1.5), 0, 0, 0, 0) + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 0) + elseif fate2 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 0) + end + end + return +end + +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3001_Dist_max +Att3000_Dist_min = Att3003_Dist_max +function ThreeHaoriBunsin332001Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + local fate5 = ai:GetRandam_Int(1, 100) + local activeBreathChr = ai:GetEventRequest(0) + local DisAppear_flag = ai:GetEventRequest(1) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local GetWellSpace_Odds = 0 + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act08Per = 0 + if DisAppear_flag == 1 then + Act07Per = 100 + elseif role == ROLE_TYPE_Kankyaku and fate <= 100 then + Act06Per = 30 + Act08Per = 70 + elseif role == ROLE_TYPE_Torimaki and fate2 <= 100 then + Act06Per = 70 + Act08Per = 30 + elseif 8 <= targetDist then + Act01Per = 30 + Act02Per = 20 + Act06Per = 30 + Act08Per = 20 + elseif 6.5 <= targetDist then + Act01Per = 20 + Act02Per = 20 + Act03Per = 20 + Act06Per = 25 + Act08Per = 15 + elseif 4 <= targetDist then + Act01Per = 10 + Act02Per = 20 + Act03Per = 20 + Act04Per = 10 + Act05Per = 10 + Act06Per = 25 + Act08Per = 5 + else + Act01Per = 0 + Act02Per = 0 + Act03Per = 10 + Act04Per = 15 + Act05Per = 15 + Act06Per = 60 + end + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per) + if fateAct <= Act01Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3001_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3001, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3003_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, DIST_None, 1, 90) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3007, TARGET_ENE_0, DIST_None, 1, 90) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + ThreeHaoriBunsin332001StepForLeave(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3009, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 0 + else + GetWellSpace_Odds = 100 + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + ThreeHaoriBunsin332001_ActAfter_AdjustSpace(ai, goal) + end + return +end + +function ThreeHaoriBunsin332001_ActAfter_AdjustSpace(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(1, 2.5), TARGET_NONE, 0, 0, 0) + goal:AddSubGoal(GOAL_COMMON_If, 10, 0) + return +end + +function ThreeHaoriBunsin332001StepForLeave(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_F, 8, 1302500) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 720, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 6) + elseif ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_L, 8, 1302500) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 722, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 6) + elseif ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_R, 8, 1302500) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 723, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 6) + elseif ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_B, 8, 1302500) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 721, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 6) + elseif ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_F, 5, 1302500) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 710, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 4) + elseif ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_L, 5, 1302500) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 712, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + elseif ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_R, 5, 1302500) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 713, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + elseif ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_B, 5, 1302500) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 711, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + elseif ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_B, 3, 1302500) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_L, 3, 1302500) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 2) + elseif ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_R, 3, 1302500) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 2) + elseif ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_F, 3, 1302500) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 700, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 2) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3007, TARGET_ENE_0, DIST_None, 1, 90) + end + return +end + +function ThreeHaoriBunsin332001Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function ThreeHaoriBunsin332001Battle_Terminate(ai, goal) + return +end + +function ThreeHaoriBunsin332001Battle_Interupt(ai, goal) + local hprate = ai:GetHpRate(TARGET_SELF) + if ai:IsInterupt(INTERUPT_Damaged) then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3009, TARGET_ENE_0, DIST_None, 0) + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/332002_battle.lua b/scripts_decompiled/332002_battle.lua new file mode 100644 index 0000000..c404841 --- /dev/null +++ b/scripts_decompiled/332002_battle.lua @@ -0,0 +1,99 @@ +REGISTER_GOAL(GOAL_ThreeHaori_nomal332002_Battle, "ThreeHaori_nomal332002Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 50 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 50 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 6.5 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 10 +local Att3007_Dist_min = 0 +local Att3007_Dist_max = 10 +REGISTER_GOAL_NO_UPDATE(GOAL_ThreeHaori_nomal332002_Battle, 1) +function ThreeHaori_nomal332002Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local hprate = ai:GetHpRate(TARGET_SELF) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local GetWellSpace_Odds = 0 + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + if 8 <= targetDist then + Act01Per = 60 + Act02Per = 40 + elseif 6.5 <= targetDist then + Act01Per = 50 + Act02Per = 50 + elseif 4 <= targetDist then + Act01Per = 20 + Act02Per = 40 + Act03Per = 40 + else + Act01Per = 15 + Act02Per = 30 + Act03Per = 55 + end + local myThinkId = ai:GetNpcThinkParamID() + if myThinkId == 332003 then + Act03Per = 0 + end + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per) + if fateAct <= Act01Per then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3001, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, DIST_None, 1, 90) + GetWellSpace_Odds = 0 + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3007, TARGET_ENE_0, DIST_None, 1, 90) + GetWellSpace_Odds = 0 + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + ThreeHaori_nomal332002_ActAfter_AdjustSpace(ai, goal) + end + return +end + +function ThreeHaori_nomal332002_ActAfter_AdjustSpace(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if fate > 20 then + if fate <= 100 then + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 3), 0, 0, 0, 0) + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + elseif fate2 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + end + return +end + +function ThreeHaori_nomal332002Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function ThreeHaori_nomal332002Battle_Terminate(ai, goal) + return +end + +function ThreeHaori_nomal332002Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/333000_battle.lua b/scripts_decompiled/333000_battle.lua new file mode 100644 index 0000000..d1ef72c --- /dev/null +++ b/scripts_decompiled/333000_battle.lua @@ -0,0 +1,282 @@ +REGISTER_GOAL(GOAL_Pisaca333000_Battle, "Pisaca333000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 4 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 4.5 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 5 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 7 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 10 +REGISTER_GOAL_NO_UPDATE(GOAL_Pisaca333000_Battle, 1) +Att3000_Dist_min = Att3005_Dist_min +Att3000_Dist_min = Att3005_Dist_max +Att3000_Dist_min = Att3004_Dist_max +Att3000_Dist_min = Att3002_Dist_max +Att3000_Dist_min = Att3003_Dist_max +Att3000_Dist_min = Att3000_Dist_max +function Pisaca333000Battle_Activate(ai, goal) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local eventNo = ai:GetEventRequest(0) + local doAdmirer = ai:GetExcelParam(AI_EXCEL_THINK_PARAM_TYPE__thinkAttr_doAdmirer) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local Odds_Guard = 0 + local GetWellSpace_Odds = 0 + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + if eventNo == 1 then + local ThinkID = ai:GetNpcThinkParamID() + if ThinkID == 333000 or ThinkID == 333001 then + if doAdmirer == 1 and role == ROLE_TYPE_Torimaki then + Torimaki_Act(ai, goal, Odds_Guard) + elseif doAdmirer == 1 and role == ROLE_TYPE_Kankyaku then + Kankyaku_Act(ai, goal, Odds_Guard) + elseif 10 <= targetDist then + Act01Per = 30 + Act02Per = 0 + Act03Per = 70 + Act04Per = 0 + elseif 6 <= targetDist then + Act01Per = 20 + Act02Per = 20 + Act03Per = 60 + Act04Per = 0 + elseif 3 <= targetDist then + Act01Per = 0 + Act02Per = 30 + Act03Per = 35 + Act04Per = 35 + else + Act01Per = 0 + Act02Per = 10 + Act03Per = 35 + Act04Per = 55 + end + elseif 10 <= targetDist then + Act05Per = 100 + elseif doAdmirer == 1 and role == ROLE_TYPE_Torimaki then + Torimaki_Act(ai, goal, Odds_Guard) + elseif doAdmirer == 1 and role == ROLE_TYPE_Kankyaku then + Kankyaku_Act(ai, goal, Odds_Guard) + elseif 6 <= targetDist then + Act01Per = 20 + Act02Per = 20 + Act03Per = 60 + Act04Per = 0 + elseif 3 <= targetDist then + Act01Per = 0 + Act02Per = 30 + Act03Per = 35 + Act04Per = 35 + else + Act01Per = 0 + Act02Per = 10 + Act03Per = 35 + Act04Per = 55 + end + elseif eventNo == 2 then + Act05Per = 100 + elseif eventNo == 3 then + if targetDist <= 5 then + Act01Per = 0 + Act02Per = 10 + Act03Per = 35 + Act04Per = 55 + else + Act06Per = 100 + end + else + Act07Per = 100 + end + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per) + if fateAct <= Act01Per then + if Att3005_Dist_min <= targetDist and fate <= 40 then + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3005 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + else + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3004 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + end + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per then + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 100 + local Odds_Guard = 0 + local AttID = 3002 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per then + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3003 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 1 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + local ThinkID = ai:GetNpcThinkParamID() + if ThinkID == 333000 then + if fate <= 33 then + ai:SetEventMoveTarget(1702710) + elseif fate <= 33 then + ai:SetEventMoveTarget(1702711) + else + ai:SetEventMoveTarget(1702712) + end + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, POINT_EVENT, 1, TARGET_SELF, true, -1) + elseif ThinkID == 333001 then + if fate <= 33 then + ai:SetEventMoveTarget(1702720) + elseif fate <= 33 then + ai:SetEventMoveTarget(1702721) + else + ai:SetEventMoveTarget(1702722) + end + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, POINT_EVENT, 1, TARGET_SELF, true, -1) + elseif ThinkID == 333002 then + if fate <= 14 then + ai:SetEventMoveTarget(1702730) + elseif fate <= 28 then + ai:SetEventMoveTarget(1702731) + elseif fate <= 42 then + ai:SetEventMoveTarget(1702732) + elseif fate <= 56 then + ai:SetEventMoveTarget(1702733) + elseif fate <= 70 then + ai:SetEventMoveTarget(1702734) + elseif fate <= 85 then + ai:SetEventMoveTarget(1702735) + else + ai:SetEventMoveTarget(1702736) + end + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, POINT_EVENT, 1, TARGET_SELF, true, -1) + elseif ThinkID == 333003 then + if fate <= 20 then + ai:SetEventMoveTarget(1702740) + elseif fate <= 40 then + ai:SetEventMoveTarget(1702741) + elseif fate <= 60 then + ai:SetEventMoveTarget(1702742) + elseif fate <= 80 then + ai:SetEventMoveTarget(1702743) + else + ai:SetEventMoveTarget(1702744) + end + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, POINT_EVENT, 1, TARGET_SELF, true, -1) + else + if fate <= 50 then + ai:SetEventMoveTarget(1702730) + else + ai:SetEventMoveTarget(1702731) + end + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, POINT_EVENT, 1, TARGET_SELF, true, -1) + end + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + if ai:IsInsideTargetRegion(TARGET_SELF, 1702760) then + ai:SetEventMoveTarget(1702770) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, POINT_EVENT, 3, TARGET_SELF, false, -1) + elseif ai:IsInsideTargetRegion(TARGET_SELF, 1702761) then + ai:SetEventMoveTarget(1702771) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, POINT_EVENT, 3, TARGET_SELF, false, -1) + elseif ai:IsInsideTargetRegion(TARGET_SELF, 1702762) then + ai:SetEventMoveTarget(1702772) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, POINT_EVENT, 3, TARGET_SELF, false, -1) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, POINT_INITIAL, 3, TARGET_SELF, false, -1) + end + GetWellSpace_Odds = 0 + else + goal:AddSubGoal(GOAL_COMMON_Wait, 5, TARGET_NONE, 0, 0, 0) + GetWellSpace_Odds = 0 + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + local Odds_Guard = 0 + local Odds_NoAct = 30 + local Odds_BackAndSide = 0 + local Odds_Back = 20 + local Odds_BitWait = 50 + local Odds_Backstep = 0 + GetWellSpace_Act(ai, goal, Odds_Guard, Odds_NoAct, Odds_BackAndSide, Odds_Back, Odds_BitWait, Odds_Backstep) + end + return +end + +function Pisaca333000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Pisaca333000Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3004_Dist_max +Att3000_Dist_min = Att3002_Dist_max +function Pisaca333000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest(0) + local oddsResponse = 30 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + local safetyDist = 3.5 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + elseif eventNo == 3 and ai:IsInterupt(INTERUPT_Damaged) then + if 10 <= targetDist then + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 0 + local Odds_Guard = 0 + local AttID = 3004 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + return true + elseif 5 <= targetDist then + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 0 + local Odds_Guard = 0 + local AttID = 3002 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/333001_battle.lua b/scripts_decompiled/333001_battle.lua new file mode 100644 index 0000000..5d830bc --- /dev/null +++ b/scripts_decompiled/333001_battle.lua @@ -0,0 +1,74 @@ +REGISTER_GOAL(GOAL_Pisaca_Sisters333001_Battle, "Pisaca_Sisters333001Battle") +REGISTER_GOAL_NO_UPDATE(GOAL_Pisaca_Sisters333001_Battle, 1) +function Pisaca_Sisters333001Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local GetWellSpace_Odds = 0 + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + if 5 <= targetDist then + Act01Per = 0 + Act02Per = 0 + Act03Per = 100 + elseif 1.5 <= targetDist then + Act01Per = 85 + Act02Per = 15 + Act03Per = 0 + else + Act01Per = 15 + Act02Per = 85 + Act03Per = 0 + end + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per) + if fateAct <= Act01Per then + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(1, 2), TARGET_NONE, 0, 0, 0) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Float(3, 5), TARGET_ENE_0, 20, TARGET_ENE_0, true, -1) + elseif fateAct <= Act01Per + Act02Per then + local farPoint = Find_far_Point(ai, goal) + ai:SetEventMoveTarget(farPoint) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, POINT_EVENT, 1, POINT_EVENT, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(1, 3), TARGET_NONE, 0, 0, 0) + end + return +end + +function Find_far_Point(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + ai:SetEventMoveTarget(1702745) + local A = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + ai:SetEventMoveTarget(1702746) + local B = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + ai:SetEventMoveTarget(1702747) + local C = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + ai:SetEventMoveTarget(1702748) + local D = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + local maxDist = math.max(A, B, C, D) + if minDist == A then + FarPoint = 1702745 + elseif minDist == B then + FarPoint = 1702746 + elseif minDist == C then + FarPoint = 1702747 + else + FarPoint = 1702748 + end + return FarPoint +end + +function Pisaca_Sisters333001Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Pisaca_Sisters333001Battle_Terminate(ai, goal) + return +end + +function Pisaca_Sisters333001Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/334000_battle.lua b/scripts_decompiled/334000_battle.lua new file mode 100644 index 0000000..174bde9 --- /dev/null +++ b/scripts_decompiled/334000_battle.lua @@ -0,0 +1,235 @@ +REGISTER_GOAL(GOAL_blackDog334000_Battle, "blackDog334000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 1.1 +local Att3001_Dist_min = 1 +local Att3001_Dist_max = 3.5 +local Att3002_Dist_min = 1.5 +local Att3002_Dist_max = 3.6 +local Att3006_Dist_min = 1 +local Att3006_Dist_max = 2.3 +REGISTER_GOAL_NO_UPDATE(GOAL_blackDog334000_Battle, 1) +function blackDog334000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + if 6 <= targetDist then + actPerArr[1] = 40 + actPerArr[2] = 60 + actPerArr[3] = 0 + actPerArr[4] = 0 + elseif 1.5 <= targetDist then + actPerArr[1] = 25 + actPerArr[2] = 35 + actPerArr[3] = 40 + actPerArr[4] = 0 + else + actPerArr[1] = 20 + actPerArr[2] = 30 + actPerArr[3] = 40 + actPerArr[4] = 10 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, blackDog334000_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, blackDog334000_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, blackDog334000_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, blackDog334000_Act04) + local atkAfterFunc = REGIST_FUNC(ai, goal, blackDog334000_ActAfter_AdjustSpace) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3006_Dist_max +Att3000_Dist_min = Att3000_Dist_max +function blackDog334000_Act01(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local bRight = ai:GetRandam_Int(0, 1) + local RTime = ai:GetRandam_Int(0.7, 1.7) + local targetDist = ai:GetDist(TARGET_ENE_0) + if Att3006_Dist_max + 0.5 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3006_Dist_max, TARGET_SELF, false, -1) + if fate <= 25 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3006, TARGET_ENE_0, DIST_Middle, -1, 30) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 5, 3006, TARGET_ENE_0, DIST_Middle, -1, 30) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 5, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 1.5, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, true, -1) + if fate <= 25 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3000, TARGET_ENE_0, DIST_Middle, -1, 30) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 5, 3000, TARGET_ENE_0, DIST_Middle, -1, 30) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 5, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3002_Dist_max +Att3000_Dist_min = Att3001_Dist_max +function blackDog334000_Act02(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local bRight = ai:GetRandam_Int(0, 1) + local RTime = ai:GetRandam_Int(0.7, 1.7) + local targetDist = ai:GetDist(TARGET_ENE_0) + if Att3002_Dist_max + 0.5 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3002_Dist_max, TARGET_SELF, false, -1) + if fate <= 25 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3002, TARGET_ENE_0, DIST_Middle, -1, 30) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 5, 3002, TARGET_ENE_0, DIST_Middle, -1, 30) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 5, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 1.5, TARGET_ENE_0, Att3001_Dist_max, TARGET_SELF, true, -1) + if fate <= 25 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3001, TARGET_ENE_0, DIST_Middle, -1, 30) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 5, 3001, TARGET_ENE_0, DIST_Middle, -1, 30) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 5, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3002_Dist_max +function blackDog334000_Act03(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local bRight = ai:GetRandam_Int(0, 1) + local targetDist = ai:GetDist(TARGET_ENE_0) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 2) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 2) + end + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3002_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3002, TARGET_ENE_0, DIST_Middle, -1, 30) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function blackDog334000_Act04(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 3) + elseif fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 3) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 3) + end + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function blackDog334000_ActAfter_AdjustSpace(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, 10, TARGET_ENE_0, true, -1) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(1.8, 3), TARGET_ENE_0, 0, 0, 0) + elseif fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(2.4, 3.4), TARGET_ENE_0, 0, 0, 0) + elseif fate <= 85 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 3) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(1.8, 3), TARGET_ENE_0, 0, 0, 0) + else + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 3) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 3) + end + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(1.8, 3), TARGET_ENE_0, 0, 0, 0) + end + return +end + +function blackDog334000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function blackDog334000Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3006_Dist_max +Att3000_Dist_min = Att3002_Dist_max +function blackDog334000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local superStepDist = 4 + local superStepPer = 35 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + local safetyDist = 3.5 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distDamagedStep = 4 + local oddsDamagedStep = 35 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + local safetyDist = 3.5 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distMissSwing_Int = 8 + local oddsMissSwing_Int = 50 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if targetDist <= 3 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3006_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3002_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distResNear = 4 + local distResFar = 15 + local oddsResNear = 20 + local oddsResFar = 30 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + return true + elseif ResBehavID == 2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + else + local oddsResponse = 20 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + local safetyDist = 3.5 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end + end + end + end + end +end + +return diff --git a/scripts_decompiled/334100_battle.lua b/scripts_decompiled/334100_battle.lua new file mode 100644 index 0000000..8f2372d --- /dev/null +++ b/scripts_decompiled/334100_battle.lua @@ -0,0 +1,251 @@ +REGISTER_GOAL(GOAL_FlameDog334100_Battle, "FlameDog334100Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 0.7 +local Att3001_Dist_min = 1 +local Att3001_Dist_max = 2.4 +local Att3002_Dist_min = 1 +local Att3002_Dist_max = 2.5 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 2.5 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 1.3 +REGISTER_GOAL_NO_UPDATE(GOAL_FlameDog334100_Battle, 1) +function FlameDog334100Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + if 6 <= targetDist then + actPerArr[1] = 10 + actPerArr[2] = 55 + actPerArr[3] = 35 + actPerArr[4] = 0 + elseif 3.5 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 45 + actPerArr[3] = 30 + actPerArr[4] = 5 + elseif 1.5 <= targetDist then + actPerArr[1] = 45 + actPerArr[2] = 15 + actPerArr[3] = 25 + actPerArr[4] = 15 + else + actPerArr[1] = 70 + actPerArr[2] = 0 + actPerArr[3] = 0 + actPerArr[4] = 30 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, FlameDog334100_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, FlameDog334100_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, FlameDog334100_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, FlameDog334100_Act04) + local atkAfterFunc = REGIST_FUNC(ai, goal, FlameDog334100_ActAfter_AdjustSpace) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3006_Dist_max +Att3000_Dist_min = Att3000_Dist_max +function FlameDog334100_Act01(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local bRight = ai:GetRandam_Int(0, 1) + local RTime = ai:GetRandam_Int(0.7, 1.7) + local targetDist = ai:GetDist(TARGET_ENE_0) + if Att3006_Dist_max + 0.5 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3006_Dist_max, TARGET_SELF, false, -1) + if fate <= 25 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3006, TARGET_ENE_0, DIST_Middle, -1, 30) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 5, 3006, TARGET_ENE_0, DIST_Middle, -1, 30) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 5, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 1.5, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, true, -1) + if fate <= 25 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3000, TARGET_ENE_0, DIST_Middle, -1, 30) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 5, 3000, TARGET_ENE_0, DIST_Middle, -1, 30) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 5, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3002_Dist_max +Att3000_Dist_min = Att3001_Dist_max +function FlameDog334100_Act02(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local bRight = ai:GetRandam_Int(0, 1) + local RTime = ai:GetRandam_Int(0.7, 1.7) + local targetDist = ai:GetDist(TARGET_ENE_0) + if Att3002_Dist_max + 0.5 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3002_Dist_max, TARGET_SELF, false, -1) + if fate <= 25 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3002, TARGET_ENE_0, DIST_Middle, -1, 30) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 5, 3002, TARGET_ENE_0, DIST_Middle, -1, 30) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 5, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 1.5, TARGET_ENE_0, Att3001_Dist_max, TARGET_SELF, true, -1) + if fate <= 25 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3001, TARGET_ENE_0, DIST_Middle, -1, 30) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 5, 3001, TARGET_ENE_0, DIST_Middle, -1, 30) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 5, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3003_Dist_max +function FlameDog334100_Act03(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if Att3003_Dist_max + 0.5 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3003_Dist_max, TARGET_SELF, false, -1) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 1.5, TARGET_ENE_0, Att3003_Dist_max, TARGET_SELF, true, -1) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3003, TARGET_ENE_0, DIST_Middle, -1, 30) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function FlameDog334100_Act04(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2) + elseif fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 3) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 3) + end + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function FlameDog334100_ActAfter_AdjustSpace(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, 10, TARGET_ENE_0, true, -1) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(1.8, 3), TARGET_ENE_0, 0, 0, 0) + elseif fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(2.4, 3.4), TARGET_ENE_0, 0, 0, 0) + elseif fate <= 85 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 3) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(1.8, 3), TARGET_ENE_0, 0, 0, 0) + else + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 3) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 3) + end + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(1.8, 3), TARGET_ENE_0, 0, 0, 0) + end + return +end + +function FlameDog334100Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function FlameDog334100Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3003_Dist_max +Att3000_Dist_min = Att3002_Dist_max +function FlameDog334100Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local superStepDist = 3.5 + local superStepPer = 35 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 3 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distDamagedStep = 3.5 + local oddsDamagedStep = 35 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 3 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distMissSwing_Int = 8 + local oddsMissSwing_Int = 50 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if targetDist <= 2.1 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3003_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distResNear = 6 + local distResFar = 15 + local oddsResNear = 0 + local oddsResFar = 60 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 3) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 3) + end + return true + elseif ResBehavID == 2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 3) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 3) + end + if fate2 <= 75 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3002_Dist_max, TARGET_SELF, false, -1) + if fate <= 5 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3002, TARGET_ENE_0, DIST_Middle, -1, 30) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 5, 3002, TARGET_ENE_0, DIST_Middle, -1, 30) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 5, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + end + return true + else + local oddsResponse = 25 + local bkStepPer = 50 + local leftStepPer = 25 + local rightStepPer = 25 + local safetyDist = 3 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end + end + end + end + end +end + +return diff --git a/scripts_decompiled/335000_battle.lua b/scripts_decompiled/335000_battle.lua new file mode 100644 index 0000000..7c4dcdc --- /dev/null +++ b/scripts_decompiled/335000_battle.lua @@ -0,0 +1,29 @@ +REGISTER_GOAL(GOAL_WalkingTree335000_Battle, "WalkingTree335000Battle") +REGISTER_GOAL_NO_UPDATE(GOAL_WalkingTree335000_Battle, 1) +function WalkingTree335000Battle_Activate(ai, goal) + local hprate = ai:GetHpRate(TARGET_SELF) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_SELF, 0, 0, 0) + return +end + +function WalkingTree335000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function WalkingTree335000Battle_Terminate(ai, goal) + return +end + +function WalkingTree335000Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + return false +end + +return diff --git a/scripts_decompiled/337000_battle.lua b/scripts_decompiled/337000_battle.lua new file mode 100644 index 0000000..aef06b6 --- /dev/null +++ b/scripts_decompiled/337000_battle.lua @@ -0,0 +1,248 @@ +REGISTER_GOAL(GOAL_Kinobori337000_Battle, "Kinobori337000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 3.3 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 3.35 +local Att3002_Dist_min = 1.9 +local Att3002_Dist_max = 4.7 +local Att3003_Dist_min = 1.9 +local Att3003_Dist_max = 5.55 +local Att13000_Dist_min = 0 +local Att13000_Dist_max = 10 +local Att13001_Dist_min = 0 +local Att13001_Dist_max = 10 +local Att13002_Dist_min = 0 +local Att13002_Dist_max = 10 +local Att13003_Dist_min = 0 +local Att13003_Dist_max = 10 +REGISTER_GOAL_NO_UPDATE(GOAL_Kinobori337000_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3001_Dist_max +Att3000_Dist_min = Att3002_Dist_max +Att3000_Dist_min = Att3003_Dist_max +function Kinobori337000Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local targetDistY = ai:GetDistYSigned(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + ai:AddObserveArea(0, TARGET_SELF, TARGET_ENE_0, AI_DIR_TYPE_B, 95, 2) + if ai:HasSpecialEffectId(TARGET_SELF, 5111) then + if targetDist <= 7.5 and targetDistY <= -2.5 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3002, TARGET_ENE_0, DIST_None, 0, -1) + elseif targetDist <= 2.5 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3000, TARGET_ENE_0, DIST_None, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3001, TARGET_ENE_0, DIST_None, 0, -1) + end + else + goal:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_SELF, 0, 0, 0) + end + else + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act08Per = 0 + local Act09Per = 0 + if 4.7 <= targetDist then + Act01Per = 5 + Act02Per = 5 + Act03Per = 45 + Act04Per = 45 + elseif 3.3 <= targetDist then + Act01Per = 35 + Act02Per = 35 + Act03Per = 15 + Act04Per = 15 + elseif 1.9 <= targetDist then + Act01Per = 45 + Act02Per = 45 + Act03Per = 5 + Act04Per = 5 + elseif 1 <= targetDist then + if ai:IsFinishTimer(1) == true then + Act01Per = 45 + Act02Per = 46 + Act05Per = 3 + Act08Per = 3 + Act09Per = 3 + else + Act01Per = 50 + Act02Per = 50 + end + elseif 0.6 <= targetDist then + if ai:IsFinishTimer(1) == true then + Act01Per = 20 + Act02Per = 20 + Act05Per = 20 + Act08Per = 20 + Act09Per = 20 + else + Act01Per = 50 + Act02Per = 50 + end + elseif ai:IsFinishTimer(1) == true then + Act01Per = 15 + Act02Per = 15 + Act05Per = 20 + Act07Per = 30 + Act08Per = 10 + Act09Per = 10 + else + Act01Per = 25 + Act02Per = 25 + Act07Per = 50 + end + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per) + if fateAct <= Act01Per then + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 3 + local Odds_Guard = 0 + local AttID = 3000 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per then + local AppDist = Att3001_Dist_max + local DashDist = Att3001_Dist_max + 3 + local Odds_Guard = 0 + local AttID = 3001 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per then + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 3 + local Odds_Guard = 0 + local AttID = 3002 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 3 + local Odds_Guard = 0 + local AttID = 3003 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + ai:SetTimer(1, 3) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2.5) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + ai:SetTimer(1, 3) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 700, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 2.5) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3004, TARGET_ENE_0, DIST_Middle) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per then + ai:SetTimer(1, 3) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 2.5) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per then + ai:SetTimer(1, 3) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 2.5) + GetWellSpace_Odds = 0 + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds and fate2 > 60 then + if fate2 <= 65 then + goal:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_SELF, 0, 0, 0) + elseif fate2 <= 85 then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2.5) + elseif fate3 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 2.5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 2.5) + end + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, 3, TARGET_ENE_0, true, -1) + end + end + end + return +end + +function Kinobori337000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Kinobori337000Battle_Terminate(ai, goal) + return +end + +function Kinobori337000Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_Inside_ObserveArea) then + if ai:IsFinishTimer(0) == true then + ai:SetTimer(0, 6) + if fate <= 15 then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2.5) + elseif fate <= 30 then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 700, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 2.5) + elseif fate <= 45 then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 2.5) + elseif fate <= 60 then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 2.5) + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 5, 3004, TARGET_ENE_0, DIST_None) + end + end + return true + else + local distDamagedStep = 5 + local oddsDamagedStep = 25 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + local safetyDist = 2.5 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distResNear = 6 + local distResFar = 15 + local oddsResNear = 0 + local oddsResFar = 15 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + return true + elseif ResBehavID == 2 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 2.5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 2.5) + end + return true + else + local oddsResponse = 35 + local bkStepPer = 50 + local leftStepPer = 25 + local rightStepPer = 25 + local safetyDist = 2.5 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end + end + end + end +end + +return diff --git a/scripts_decompiled/338000_battle.lua b/scripts_decompiled/338000_battle.lua new file mode 100644 index 0000000..6e50cc8 --- /dev/null +++ b/scripts_decompiled/338000_battle.lua @@ -0,0 +1,118 @@ +REGISTER_GOAL(GOAL_Leech338000_Battle, "Leech338000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 0.8 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 0.8 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 4.4 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 2.7 +REGISTER_GOAL_NO_UPDATE(GOAL_Leech338000_Battle, 1) +function Leech338000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if 8 <= targetDist then + actPerArr[1] = 5 + actPerArr[2] = 5 + actPerArr[3] = 60 + actPerArr[5] = 30 + elseif 4 <= targetDist then + actPerArr[1] = 10 + actPerArr[2] = 10 + actPerArr[3] = 60 + actPerArr[5] = 20 + elseif 2.5 <= targetDist then + actPerArr[1] = 15 + actPerArr[2] = 15 + actPerArr[3] = 30 + actPerArr[5] = 40 + else + actPerArr[1] = 40 + actPerArr[2] = 40 + actPerArr[3] = 5 + actPerArr[5] = 15 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Leech338000_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Leech338000_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, Leech338000_Act03) + actFuncArr[5] = REGIST_FUNC(ai, goal, Leech338000_Act05) + local atkAfterFunc = REGIST_FUNC(ai, goal, Leech338000_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function Leech338000_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3000, TARGET_ENE_0, DIST_Near, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3001_Dist_max +function Leech338000_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3001_Dist_max + local DashDist = Att3001_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3001, TARGET_ENE_0, DIST_Near, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3002_Dist_max +function Leech338000_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3002, TARGET_ENE_0, DIST_Near, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3003_Dist_max +function Leech338000_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3003, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Leech338000_ActAfter_AdjustSpace(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if fate > 30 then + goal:AddSubGoal(GOAL_COMMON_Wait, 2, TARGET_NONE, 0, 0, 0) + return true + else + return false + end +end + +function Leech338000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Leech338000Battle_Terminate(ai, goal) + return +end + +function Leech338000Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/339000_battle.lua b/scripts_decompiled/339000_battle.lua new file mode 100644 index 0000000..fbc790a --- /dev/null +++ b/scripts_decompiled/339000_battle.lua @@ -0,0 +1,163 @@ +REGISTER_GOAL(GOAL_Burrower339000_Battle, "Burrower339000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 3.4 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 4.6 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 4.6 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 8.6 +REGISTER_GOAL_NO_UPDATE(GOAL_Burrower339000_Battle, 1) +function Burrower339000Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + ai:AddObserveRegion(0, TARGET_ENE_0, 1412310) + ai:AddObserveRegion(1, TARGET_ENE_0, 1412311) + ai:AddObserveRegion(2, TARGET_ENE_0, 1412312) + ai:AddObserveRegion(3, TARGET_ENE_0, 1412313) + ai:AddObserveRegion(4, TARGET_ENE_0, 1412314) + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local GetWellSpace_Odds = 0 + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1412310) then + if 4.6 <= targetDist then + Act01Per = 30 + Act02Per = 30 + Act03Per = 20 + Act04Per = 20 + else + Act01Per = 50 + Act02Per = 50 + end + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1412311) then + if 4.6 <= targetDist then + Act04Per = 70 + Act05Per = 30 + else + Act03Per = 70 + Act05Per = 30 + end + elseif ai:IsInsideTargetRegion(TARGET_SELF, 1412314) then + goal:AddSubGoal(GOAL_COMMON_Wait, 3, TARGET_ENE_0) + else + Act05Per = 100 + end + local fate2 = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per) + if fate2 <= Act01Per then + Burrower339000_Act01(ai, goal) + GetWellSpace_Odds = 0 + elseif fate2 <= Act01Per + Act02Per then + Burrower339000_Act02(ai, goal) + GetWellSpace_Odds = 0 + elseif fate2 <= Act01Per + Act02Per + Act03Per then + Burrower339000_Act03(ai, goal) + GetWellSpace_Odds = 100 + elseif fate2 <= Act01Per + Act02Per + Act03Per + Act04Per then + Burrower339000_Act04(ai, goal) + GetWellSpace_Odds = 100 + else + Burrower339000_Act05(ai, goal) + GetWellSpace_Odds = 0 + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + Burrower339000_GetWellSpace_Act(ai, goal) + end + return +end + +Att3000_Dist_min = Att3000_Dist_max +function Burrower339000_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 4, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 4, 3000, TARGET_ENE_0, DIST_Middle) + return +end + +Att3000_Dist_min = Att3001_Dist_max +function Burrower339000_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fatetime = ai:GetRandam_Int(0, 5) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 4, TARGET_ENE_0, Att3001_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3001, TARGET_ENE_0, DIST_Middle) + ai:SetEventMoveTarget(1412314) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, fatetime, POINT_EVENT, 0, TARGET_ENE_0, True, -1) + return +end + +Att3000_Dist_min = Att3002_Dist_max +function Burrower339000_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3002_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3002, TARGET_ENE_0, DIST_Middle) + return +end + +Att3000_Dist_min = Att3003_Dist_max +function Burrower339000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3003_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3003, TARGET_ENE_0, DIST_Middle) + return +end + +function Burrower339000_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fatetime = ai:GetRandam_Int(0, 5) + ai:SetEventMoveTarget(1412314) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, fatetime, POINT_EVENT, 0, TARGET_ENE_0, True, -1) + return +end + +function Burrower339000_GetWellSpace_Act(ai, goal) + local fate3 = ai:GetRandam_Int(1, 100) + local fatetime = ai:GetRandam_Int(0, 5) + if fate3 > 30 then + if fate3 <= 60 then + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 1.5), 0, 0, 0, 0) + else + ai:SetEventMoveTarget(1412314) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, fatetime, POINT_EVENT, 0, TARGET_ENE_0, True, -1) + end + end + return +end + +function Burrower339000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Burrower339000Battle_Terminate(ai, goal) + return +end + +function Burrower339000Battle_Interupt(ai, goal) + local fatetime = ai:GetRandam_Int(0, 5) + if ai:IsInterupt(INTERUPT_Inside_ObserveArea) and ai:IsFinishTimer(0) == true then + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1412310) then + goal:ClearSubGoal() + ai:SetTimer(0, 11) + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1412311) then + goal:ClearSubGoal() + ai:SetTimer(0, 3) + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + elseif not not ai:IsInsideTargetRegion(TARGET_ENE_0, 1412312) or ai:IsInsideTargetRegion(TARGET_ENE_0, 1412313) then + goal:ClearSubGoal() + ai:SetTimer(0, 5) + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_ENE_0) + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/339001_battle.lua b/scripts_decompiled/339001_battle.lua new file mode 100644 index 0000000..c65a097 --- /dev/null +++ b/scripts_decompiled/339001_battle.lua @@ -0,0 +1,100 @@ +REGISTER_GOAL(GOAL_Burrower_A339001_Battle, "Burrower_A339001Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 3.7 +local Att3001_Dist_min = 1.2 +local Att3001_Dist_max = 5.2 +local Att3002_Dist_min = 1.3 +local Att3002_Dist_max = 3.4 +local Att3003_Dist_min = 4.5 +local Att3003_Dist_max = 7.8 +local Att3004_Dist_min = 2.8 +local Att3004_Dist_max = 6.4 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 5 +REGISTER_GOAL_NO_UPDATE(GOAL_Burrower_A339001_Battle, 1) +function Burrower_A339001Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + if 7.9 <= targetDist then + Act06Per = 100 + elseif 6.5 <= targetDist then + Act04Per = 75 + Act06Per = 25 + elseif 5.1 <= targetDist then + Act04Per = 50 + Act05Per = 50 + elseif 4.5 <= targetDist then + Act02Per = 25 + Act04Per = 25 + Act05Per = 25 + Act07Per = 25 + elseif 3.4 <= targetDist then + Act02Per = 40 + Act05Per = 30 + Act07Per = 30 + elseif 2.8 <= targetDist then + Act01Per = 20 + Act02Per = 20 + Act03Per = 20 + Act05Per = 20 + Act07Per = 20 + elseif 1.3 <= targetDist then + Act01Per = 25 + Act02Per = 25 + Act03Per = 25 + Act07Per = 25 + else + Act01Per = 50 + Act07Per = 50 + end + if fate2 <= Act01Per then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle) + elseif fate2 <= Act01Per + Act02Per then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3001, TARGET_ENE_0, DIST_Middle) + elseif fate2 <= Act01Per + Act02Per + Act03Per then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle) + elseif fate2 <= Act01Per + Act02Per + Act03Per + Act04Per then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle) + elseif fate2 <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle) + elseif fate2 <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 1), TARGET_NONE, 0, 0, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle) + end + Burrower_A339001_ActAfter_AdjustSpace(ai, goal) + return +end + +function Burrower_A339001_ActAfter_AdjustSpace(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate > 30 then + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 1.5), TARGET_NONE, 0, 0, 0) + end + return +end + +function Burrower_A339001Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Burrower_A339001Battle_Terminate(ai, goal) + return +end + +function Burrower_A339001Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/339002_battle.lua b/scripts_decompiled/339002_battle.lua new file mode 100644 index 0000000..92b3253 --- /dev/null +++ b/scripts_decompiled/339002_battle.lua @@ -0,0 +1,97 @@ +REGISTER_GOAL(GOAL_Burrower_B339002_Battle, "Burrower_B339002Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 0 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 0 +local Att3002_Dist_min = 0.5 +local Att3002_Dist_max = 2.7 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 0 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 4.3 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 4.4 +REGISTER_GOAL_NO_UPDATE(GOAL_Burrower_B339002_Battle, 1) +function Burrower_B339002Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1412315) then + Act01Per = 100 + end + if not not ai:IsInsideTargetRegion(TARGET_ENE_0, 1412316) or ai:IsInsideTargetRegion(TARGET_ENE_0, 1412317) then + Act02Per = 100 + end + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1412318) then + Act04Per = 250 + end + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 100) and targetDist <= 2.7 and 0.3 <= targetDist then + Act03Per = 250 + end + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 130) and targetDist <= 4.4 then + Act05Per = 200 + end + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 100) and targetDist <= 4.4 then + Act06Per = 200 + end + if 2.7 <= targetDist then + Act07Per = 100 + elseif 0.8 <= targetDist then + Act02Per = 100 + Act03Per = 250 + else + Act01Per = 100 + Act02Per = 100 + Act03Per = 250 + end + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per) + if fateAct <= Act01Per then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fateAct <= Act01Per + Act02Per then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3001, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fateAct <= Act01Per + Act02Per + Act03Per then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3004, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3005, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 1), TARGET_NONE, 0, 0, 0) + end + Burrower_B339002_ActAfter_AdjustSpace(ai, goal) + return +end + +function Burrower_B339002_ActAfter_AdjustSpace(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate > 30 then + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 1.5), TARGET_NONE, 0, 0, 0) + end + return +end + +function Burrower_B339002Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Burrower_B339002Battle_Terminate(ai, goal) + return +end + +function Burrower_B339002Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/339003_battle.lua b/scripts_decompiled/339003_battle.lua new file mode 100644 index 0000000..802c033 --- /dev/null +++ b/scripts_decompiled/339003_battle.lua @@ -0,0 +1,111 @@ +REGISTER_GOAL(GOAL_Burrower_C339003_Battle, "Burrower_C339003Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 0 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 0 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 6.3 +local Att3004_Dist_min = 5.7 +local Att3004_Dist_max = 7.5 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 6.15 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 0 +local Att3007_Dist_min = 0 +local Att3007_Dist_max = 0 +local Att3009_Dist_min = 0 +local Att3009_Dist_max = 6.6 +REGISTER_GOAL_NO_UPDATE(GOAL_Burrower_C339003_Battle, 1) +function Burrower_C339003Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act08Per = 0 + local Act09Per = 0 + ai:AddObserveChrDmySphere(0, TARGET_ENE_0, 60, 1.8) + ai:AddObserveChrDmySphere(1, TARGET_ENE_0, 61, 1.8) + ai:AddObserveChrDmySphere(2, TARGET_ENE_0, 62, 1.8) + ai:AddObserveChrDmySphere(3, TARGET_ENE_0, 63, 1.8) + ai:AddObserveChrDmySphere(4, TARGET_ENE_0, 64, 1.8) + ai:AddObserveChrDmySphere(5, TARGET_ENE_0, 65, 1.8) + ai:AddObserveChrDmySphere(6, TARGET_ENE_0, 66, 1.8) + ai:AddObserveChrDmySphere(7, TARGET_ENE_0, 67, 1.8) + if not not ai:IsInsideObserve(0) or ai:IsInsideObserve(4) then + Act01Per = 100 + Act04Per = 100 + end + if not not ai:IsInsideObserve(1) or ai:IsInsideObserve(5) then + Act02Per = 100 + end + if not not ai:IsInsideObserve(2) or ai:IsInsideObserve(6) then + Act07Per = 100 + end + if not not ai:IsInsideObserve(3) or ai:IsInsideObserve(7) then + Act06Per = 100 + end + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 110) and targetDist <= 6.3 then + Act03Per = 200 + end + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 130) and targetDist <= 6.6 then + Act08Per = 200 + end + if 6.15 <= targetDist then + Act09Per = 100 + else + Act05Per = 100 + end + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per) + if fateAct <= Act01Per then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fateAct <= Act01Per + Act02Per then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3001, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fateAct <= Act01Per + Act02Per + Act03Per then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3004, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3005, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3007, TARGET_ENE_0, DIST_Middle, 0, -1) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3009, TARGET_ENE_0, DIST_Middle, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 1), TARGET_NONE, 0, 0, 0) + end + Burrower_C339003_ActAfter_AdjustSpace(ai, goal) + return +end + +function Burrower_C339003_ActAfter_AdjustSpace(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate > 30 then + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 1.5), TARGET_NONE, 0, 0, 0) + end + return +end + +function Burrower_C339003Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Burrower_C339003Battle_Terminate(ai, goal) + return +end + +function Burrower_C339003Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/340000_battle.lua b/scripts_decompiled/340000_battle.lua new file mode 100644 index 0000000..f9278aa --- /dev/null +++ b/scripts_decompiled/340000_battle.lua @@ -0,0 +1,248 @@ +REGISTER_GOAL(GOAL_KuraguSpider_Child340000_Battle, "KuraguSpider_Child340000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 2.2 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 1.5 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 1.6 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 1.5 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 4.5 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 4.5 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 3 +REGISTER_GOAL_NO_UPDATE(GOAL_KuraguSpider_Child340000_Battle, 1) +function KuraguSpider_Child340000Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest() + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local GetWellSpace_Odds = 0 + if 7.7 <= targetDist then + Act01Per = 5 + Act02Per = 10 + Act03Per = 80 + Act04Per = 0 + Act05Per = 5 + elseif 5.6 <= targetDist then + Act01Per = 10 + Act02Per = 0 + Act03Per = 80 + Act04Per = 0 + Act05Per = 10 + elseif 2.1 <= targetDist then + Act01Per = 25 + Act02Per = 50 + Act03Per = 0 + Act04Per = 0 + Act05Per = 25 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 90) then + Act01Per = 8 + Act02Per = 14 + Act03Per = 0 + Act04Per = 70 + Act05Per = 8 + else + Act01Per = 25 + Act02Per = 50 + Act03Per = 0 + Act04Per = 0 + Act05Per = 25 + end + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per) + if fateAct <= Act01Per then + KuraguSpider_Child340000_Act01(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per then + KuraguSpider_Child340000_Act02(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per then + KuraguSpider_Child340000_Act03(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + KuraguSpider_Child340000_Act04(ai, goal) + GetWellSpace_Odds = 0 + else + KuraguSpider_Child340000_Act05(ai, goal) + GetWellSpace_Odds = 100 + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + KuraguSpider_Child340000_ActAfter_AdjustSpace(ai, goal, paramTbl) + end + return +end + +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3001_Dist_max +function KuraguSpider_Child340000_Act01(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachStep, 5, 700, TARGET_ENE_0, Att3001_Dist_max, 0) + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 3, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 3, 3000, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3003_Dist_max +function KuraguSpider_Child340000_Act02(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachStep, 5, 700, TARGET_ENE_0, Att3003_Dist_max, 0) + if fate <= 50 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + else + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + elseif fate <= 50 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + else + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3005_Dist_max +function KuraguSpider_Child340000_Act03(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 0 + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachStep, 5, 700, TARGET_ENE_0, Att3005_Dist_max, 0) + if fate <= 50 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + else + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + elseif fate <= 50 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + else + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function KuraguSpider_Child340000_Act04(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3006, TARGET_ENE_0, 0, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3001_Dist_max +function KuraguSpider_Child340000_Act05(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3001_Dist_max + local DashDist = Att3001_Dist_max + 2 + local Odds_Guard = 0 + if 3 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachStep, 5, 700, TARGET_ENE_0, Att3001_Dist_max, 0) + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 3, 3001, TARGET_ENE_0, DIST_Middle, 0) + else + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 3, 3001, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function KuraguSpider_Child340000_ActAfter_AdjustSpace(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate <= 20 then + if fate2 <= 33 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, -1, AI_DIR_TYPE_B, 1.8) + elseif fate2 <= 66 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, -1, AI_DIR_TYPE_B, 3.6) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, -1, AI_DIR_TYPE_B, 3.6) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, -1, AI_DIR_TYPE_B, 5.4) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, -1, AI_DIR_TYPE_B, 5.4) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, -1, AI_DIR_TYPE_B, 5.4) + end + elseif fate <= 30 then + if fate2 <= 33 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 702, TARGET_ENE_0, -1, AI_DIR_TYPE_L, 1.8) + elseif fate2 <= 66 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 702, TARGET_ENE_0, -1, AI_DIR_TYPE_L, 3.6) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 702, TARGET_ENE_0, -1, AI_DIR_TYPE_L, 3.6) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 702, TARGET_ENE_0, -1, AI_DIR_TYPE_L, 5.4) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 702, TARGET_ENE_0, -1, AI_DIR_TYPE_L, 5.4) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 702, TARGET_ENE_0, -1, AI_DIR_TYPE_L, 5.4) + end + elseif fate <= 40 then + if fate2 <= 33 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 703, TARGET_ENE_0, -1, AI_DIR_TYPE_R, 1.8) + elseif fate2 <= 66 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 703, TARGET_ENE_0, -1, AI_DIR_TYPE_R, 3.6) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 703, TARGET_ENE_0, -1, AI_DIR_TYPE_R, 3.6) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 703, TARGET_ENE_0, -1, AI_DIR_TYPE_R, 5.4) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 703, TARGET_ENE_0, -1, AI_DIR_TYPE_R, 5.4) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 703, TARGET_ENE_0, -1, AI_DIR_TYPE_R, 5.4) + end + end + return +end + +function KuraguSpider_Child340000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function KuraguSpider_Child340000Battle_Terminate(ai, goal) + return +end + +function KuraguSpider_Child340000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local oddsResponse = 20 + local bkStepPer = 100 + local leftStepPer = 0 + local rightStepPer = 0 + local safetyDist = 3.5 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/341000_battle.lua b/scripts_decompiled/341000_battle.lua new file mode 100644 index 0000000..7cfada4 --- /dev/null +++ b/scripts_decompiled/341000_battle.lua @@ -0,0 +1,211 @@ +REGISTER_GOAL(GOAL_Kaeruei341000_Battle, "Kaeruei341000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 1.4 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 2.4 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 4.3 +local Att13000_Dist_min = 0 +local Att13000_Dist_max = 1.7 +local Att13001_Dist_min = 0 +local Att13001_Dist_max = 2.4 +local Att13002_Dist_min = 0 +local Att13002_Dist_max = 4.6 +local Att13003_Dist_min = 0 +local Att13003_Dist_max = 4.7 +local Att13004_Dist_min = 4.9 +local Att13004_Dist_max = 5.2 +REGISTER_GOAL_NO_UPDATE(GOAL_Kaeruei341000_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3002_Dist_max +function Kaeruei341000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if ai:IsSleepSpecialEffectId(TARGET_SELF, 5105) then + if 8 <= targetDist then + actPerArr[1] = 5 + actPerArr[2] = 5 + actPerArr[3] = 10 + actPerArr[9] = 80 + elseif 2 <= targetDist then + actPerArr[1] = 30 + actPerArr[2] = 30 + actPerArr[3] = 40 + actPerArr[9] = 0 + else + actPerArr[1] = 50 + actPerArr[2] = 50 + actPerArr[3] = 0 + actPerArr[9] = 0 + end + elseif 15 <= targetDist then + actPerArr[4] = 0 + actPerArr[5] = 5 + actPerArr[6] = 10 + actPerArr[7] = 15 + actPerArr[8] = 30 + actPerArr[10] = 40 + elseif 6.5 <= targetDist then + actPerArr[4] = 5 + actPerArr[5] = 10 + actPerArr[6] = 20 + actPerArr[7] = 30 + actPerArr[8] = 45 + actPerArr[10] = 0 + elseif 2 <= targetDist then + actPerArr[4] = 10 + actPerArr[5] = 20 + actPerArr[6] = 35 + actPerArr[7] = 35 + actPerArr[8] = 0 + actPerArr[10] = 0 + else + actPerArr[4] = 40 + actPerArr[5] = 50 + actPerArr[6] = 0 + actPerArr[7] = 10 + actPerArr[8] = 0 + actPerArr[10] = 0 + end + local local0 = {Att3000_Dist_max, 0, 3000, DIST_Middle, nil} + defFuncParamTbl[1] = local0 + actFuncArr[2] = REGIST_FUNC(ai, goal, Kaeruei341000_Act02) + local0 = {Att3002_Dist_max, 0, 3002, DIST_Middle, nil} + defFuncParamTbl[3] = local0 + actFuncArr[4] = REGIST_FUNC(ai, goal, Kaeruei341000_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, Kaeruei341000_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, Kaeruei341000_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, Kaeruei341000_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, Kaeruei341000_Act08) + actFuncArr[9] = REGIST_FUNC(ai, goal, Kaeruei341000_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, Kaeruei341000_Act10) + local0 = {0, 60, 0, 0, 10, 15, 15} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace_IncludeSidestep, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3001_Dist_max +function Kaeruei341000_Act02(ai, goal, paramTbl) + local AppDist = Att3001_Dist_max + local DashDist = Att3001_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3001, TARGET_ENE_0, DIST_Middle, -1, 70) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att13000_Dist_max +function Kaeruei341000_Act04(ai, goal, paramTbl) + local AppDist = Att13000_Dist_max + local DashDist = Att13000_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3000 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att13001_Dist_max +function Kaeruei341000_Act05(ai, goal, paramTbl) + local AppDist = Att13001_Dist_max + local DashDist = Att13001_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3001, TARGET_ENE_0, DIST_Middle, -1, 70) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att13002_Dist_max +function Kaeruei341000_Act06(ai, goal, paramTbl) + local AppDist = Att13002_Dist_max + local DashDist = Att13002_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3002 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att13003_Dist_max +function Kaeruei341000_Act07(ai, goal, paramTbl) + local AppDist = Att13003_Dist_max + local DashDist = Att13003_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3003 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att13004_Dist_max +function Kaeruei341000_Act08(ai, goal, paramTbl) + local AppDist = Att13004_Dist_max + local DashDist = Att13004_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3004 + local AttDist = DIST_Middle + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Kaeruei341000_Act09(ai, goal, paramTbl) + local AppDist = 8 + local DashDist = 10 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 700, TARGET_ENE_0, -1, AI_DIR_TYPE_F, 4) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Kaeruei341000_Act10(ai, goal, paramTbl) + local AppDist = 10 + local DashDist = 12 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 700, TARGET_ENE_0, -1, AI_DIR_TYPE_F, 7) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Kaeruei341000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Kaeruei341000Battle_Terminate(ai, goal) + return +end + +function Kaeruei341000Battle_Interupt(ai, goal) + local superStepDist = 3 + local superStepPer = 10 + local bkStepPer = 60 + local leftStepPer = 20 + local rightStepPer = 20 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer) then + return true + else + local oddsResponse = 20 + local bkStepPer = 60 + local leftStepPer = 20 + local rightStepPer = 20 + local safetyDist = 4 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end + end +end + +return diff --git a/scripts_decompiled/342000_battle.lua b/scripts_decompiled/342000_battle.lua new file mode 100644 index 0000000..3c3b61b --- /dev/null +++ b/scripts_decompiled/342000_battle.lua @@ -0,0 +1,114 @@ +REGISTER_GOAL(GOAL_DragonZombi342000_Battle, "DragonZombi342000Battle") +REGISTER_GOAL_NO_UPDATE(GOAL_DragonZombi342000_Battle, 1) +function DragonZombi342000Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local targetDistY = ai:GetDistY(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1102120) then + Act01Per = 0 + Act02Per = 0 + Act03Per = 0 + Act04Per = 0 + Act05Per = 0 + Act06Per = 0 + Act07Per = 100 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1102121) then + Act01Per = 0 + Act02Per = 0 + Act03Per = 0 + Act04Per = 100 + Act05Per = 0 + Act06Per = 0 + Act07Per = 0 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1102122) then + Act01Per = 0 + Act02Per = 0 + Act03Per = 0 + Act04Per = 0 + Act05Per = 100 + Act06Per = 0 + Act07Per = 0 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1102123) then + Act01Per = 0 + Act02Per = 0 + Act03Per = 0 + Act04Per = 0 + Act05Per = 0 + Act06Per = 100 + Act07Per = 0 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1102124) then + Act01Per = 100 + Act02Per = 0 + Act03Per = 0 + Act04Per = 0 + Act05Per = 0 + Act06Per = 0 + Act07Per = 0 + elseif not not ai:IsInsideTargetRegion(TARGET_ENE_0, 1102125) or ai:IsInsideTargetRegion(TARGET_ENE_0, 1102127) then + Act01Per = 0 + Act02Per = 100 + Act03Per = 0 + Act04Per = 0 + Act05Per = 0 + Act06Per = 0 + Act07Per = 0 + elseif not not ai:IsInsideTargetRegion(TARGET_ENE_0, 1102126) or ai:IsInsideTargetRegion(TARGET_ENE_0, 1102128) then + Act01Per = 0 + Act02Per = 0 + Act03Per = 100 + Act04Per = 0 + Act05Per = 0 + Act06Per = 0 + Act07Per = 0 + else + Act01Per = 0 + Act02Per = 0 + Act03Per = 0 + Act04Per = 0 + Act05Per = 0 + Act06Per = 0 + Act07Per = 0 + end + if fate2 <= Act01Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 5, 3000, TARGET_ENE_0, DIST_None, 0) + elseif fate2 <= Act01Per + Act02Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 5, 3001, TARGET_ENE_0, DIST_None, 0) + elseif fate2 <= Act01Per + Act02Per + Act03Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 5, 3002, TARGET_ENE_0, DIST_None, 0) + elseif fate2 <= Act01Per + Act02Per + Act03Per + Act04Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 5, 3003, TARGET_ENE_0, DIST_None, 0) + elseif fate2 <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 5, 3004, TARGET_ENE_0, DIST_None, 0) + elseif fate2 <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 5, 3005, TARGET_ENE_0, DIST_None, 0) + elseif fate2 <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 5, 3006, TARGET_ENE_0, DIST_None, 0) + else + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 1), TARGET_NONE, 0, 0, 0) + end + return +end + +function DragonZombi342000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function DragonZombi342000Battle_Terminate(ai, goal) + return +end + +function DragonZombi342000Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/342002_battle.lua b/scripts_decompiled/342002_battle.lua new file mode 100644 index 0000000..b577b66 --- /dev/null +++ b/scripts_decompiled/342002_battle.lua @@ -0,0 +1,110 @@ +REGISTER_GOAL(GOAL_DragonZombi_m16_342002_Battle, "DragonZombi_m16_342002Battle") +REGISTER_GOAL_NO_UPDATE(GOAL_DragonZombi_m16_342002_Battle, 1) +function DragonZombi_m16_342002Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local targetDistY = ai:GetDistY(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1602761) and ai:IsInsideTargetRegion(TARGET_ENE_0, 1602764) then + Act01Per = 80 + Act02Per = 0 + Act03Per = 0 + Act04Per = 20 + Act05Per = 0 + Act06Per = 0 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1602762) and ai:IsInsideTargetRegion(TARGET_ENE_0, 1602765) then + Act01Per = 0 + Act02Per = 0 + Act03Per = 80 + Act04Per = 0 + Act05Per = 0 + Act06Per = 20 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1602760) then + Act01Per = 0 + Act02Per = 100 + Act03Per = 0 + Act04Per = 0 + Act05Per = 0 + Act06Per = 0 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1602761) then + Act01Per = 100 + Act02Per = 0 + Act03Per = 0 + Act04Per = 0 + Act05Per = 0 + Act06Per = 0 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1602762) then + Act01Per = 0 + Act02Per = 0 + Act03Per = 100 + Act04Per = 0 + Act05Per = 0 + Act06Per = 0 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1602763) then + Act01Per = 0 + Act02Per = 0 + Act03Per = 0 + Act04Per = 0 + Act05Per = 100 + Act06Per = 0 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1602764) then + Act01Per = 0 + Act02Per = 0 + Act03Per = 0 + Act04Per = 100 + Act05Per = 0 + Act06Per = 0 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1602765) then + Act01Per = 0 + Act02Per = 0 + Act03Per = 0 + Act04Per = 0 + Act05Per = 0 + Act06Per = 100 + else + Act01Per = 0 + Act02Per = 0 + Act03Per = 0 + Act04Per = 0 + Act05Per = 0 + Act06Per = 0 + end + if fate2 <= Act01Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 5, 3000, TARGET_ENE_0, DIST_None, 0) + elseif fate2 <= Act01Per + Act02Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 5, 3001, TARGET_ENE_0, DIST_None, 0) + elseif fate2 <= Act01Per + Act02Per + Act03Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 5, 3002, TARGET_ENE_0, DIST_None, 0) + elseif fate2 <= Act01Per + Act02Per + Act03Per + Act04Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 5, 3003, TARGET_ENE_0, DIST_None, 0) + elseif fate2 <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 5, 3004, TARGET_ENE_0, DIST_None, 0) + elseif fate2 <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 5, 3005, TARGET_ENE_0, DIST_None, 0) + else + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 1), TARGET_NONE, 0, 0, 0) + end + return +end + +function DragonZombi_m16_342002Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function DragonZombi_m16_342002Battle_Terminate(ai, goal) + return +end + +function DragonZombi_m16_342002Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/342100_battle.lua b/scripts_decompiled/342100_battle.lua new file mode 100644 index 0000000..ca46599 --- /dev/null +++ b/scripts_decompiled/342100_battle.lua @@ -0,0 +1,209 @@ +REGISTER_GOAL(GOAL_DraZonbiLegs342100_Battle, "DraZonbiLegs342100Battle") +local Att3000_Dist_min = 7 +local Att3000_Dist_max = 12 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 5 +local Att3003_Dist_min = -5 +local Att3003_Dist_max = 0.5 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 3.8 +local Att3007_Dist_min = 8 +local Att3007_Dist_max = 16 +REGISTER_GOAL_NO_UPDATE(GOAL_DraZonbiLegs342100_Battle, 1) +function DraZonbiLegs342100Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local Act00Per = 0 + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act08Per = 0 + local Act09Per = 0 + local GetWellSpace_Odds = 100 + ai:AddObserveChrDmySphere(0, TARGET_ENE_0, 3, 2.7) + ai:AddObserveChrDmySphere(1, TARGET_ENE_0, 4, 2.7) + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 50) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) and fate <= 75 and targetDist <= 7 then + Act01Per = 100 + elseif not (fate > 80 or not ai:IsInsideObserve(0)) or ai:IsInsideObserve(1) then + Act02Per = 50 + Act05Per = 50 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 85) and fate <= 75 and targetDist <= 2.5 and 0.1 <= targetDist then + Act03Per = 100 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 60) and fate <= 80 and targetDist <= 2.3 and 0.1 <= targetDist then + Act04Per = 100 + elseif 10 <= targetDist then + Act00Per = 25 + Act02Per = 0 + Act05Per = 0 + Act06Per = 60 + Act07Per = 10 + Act08Per = 5 + Act09Per = 0 + elseif 7 <= targetDist then + Act00Per = 55 + Act02Per = 0 + Act05Per = 0 + Act06Per = 0 + Act07Per = 30 + Act08Per = 10 + Act09Per = 5 + elseif 4 <= targetDist then + Act00Per = 5 + Act02Per = 0 + Act05Per = 0 + Act06Per = 0 + Act07Per = 50 + Act08Per = 25 + Act09Per = 20 + else + Act00Per = 0 + Act02Per = 0 + Act05Per = 40 + Act06Per = 0 + Act07Per = 15 + Act08Per = 30 + Act09Per = 15 + end + local fateAct = ai:GetRandam_Int(1, Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per) + if fateAct <= Act00Per then + DraZonbiLegs342100_Act00(ai, goal) + elseif fateAct <= Act00Per + Act01Per then + DraZonbiLegs342100_Act01(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per then + DraZonbiLegs342100_Act02(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per then + DraZonbiLegs342100_Act03(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per then + DraZonbiLegs342100_Act04(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + DraZonbiLegs342100_Act05(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + DraZonbiLegs342100_Act06(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + DraZonbiLegs342100_Act07(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per then + DraZonbiLegs342100_Act08(ai, goal) + else + DraZonbiLegs342100_Act09(ai, goal) + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds and fateGWS <= GetWellSpace_Odds then + DraZonbiLegs342100_GetWellSpace_Act(ai, goal) + end + return +end + +Att3000_Dist_min = Att3000_Dist_max +function DraZonbiLegs342100_Act00(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3000, TARGET_ENE_0, DIST_Middle) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + end + return GetWellSpace_Odds +end + +function DraZonbiLegs342100_Act01(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + return GetWellSpace_Odds +end + +function DraZonbiLegs342100_Act02(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + return GetWellSpace_Odds +end + +function DraZonbiLegs342100_Act03(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + return GetWellSpace_Odds +end + +function DraZonbiLegs342100_Act04(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + return GetWellSpace_Odds +end + +function DraZonbiLegs342100_Act05(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3006, TARGET_ENE_0, DIST_Middle) + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3007_Dist_max +function DraZonbiLegs342100_Act06(ai, goal) + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3007, TARGET_ENE_0, DIST_Middle) + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3002_Dist_max +function DraZonbiLegs342100_Act07(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3002, TARGET_ENE_0, DIST_Middle) + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3003_Dist_max +function DraZonbiLegs342100_Act08(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3003, TARGET_ENE_0, DIST_Middle) + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_max +function DraZonbiLegs342100_Act09(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3006, TARGET_ENE_0, DIST_Middle) + return GetWellSpace_Odds +end + +function DraZonbiLegs342100_GetWellSpace_Act(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local waittime = ai:GetRandam_Int(2, 3) + if fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_Wait, 0.5, TARGET_SELF, 0, 0, 0) + else + goal:AddSubGoal(GOAL_COMMON_Wait, waittime, TARGET_SELF, 0, 0, 0) + end + return +end + +function DraZonbiLegs342100Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function DraZonbiLegs342100Battle_Terminate(ai, goal) + return +end + +function DraZonbiLegs342100Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/343000_battle.lua b/scripts_decompiled/343000_battle.lua new file mode 100644 index 0000000..58cbdb6 --- /dev/null +++ b/scripts_decompiled/343000_battle.lua @@ -0,0 +1,418 @@ +REGISTER_GOAL(GOAL_Hellkite343000_Battle, "Hellkite343000Battle") +local Att3000_Dist_min = 18 +local Att3000_Dist_max = 34 +local Att3001_Dist_min = 18 +local Att3001_Dist_max = 38 +local Att3002_Dist_min = 20 +local Att3002_Dist_max = 40 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 5 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 5 +local Att3005_Dist_min = 5.5 +local Att3005_Dist_max = 13 +local Att3006_Dist_min = 8 +local Att3006_Dist_max = 13 +local Att3007_Dist_min = 3 +local Att3007_Dist_max = 16 +local Att3008_Dist_min = 0 +local Att3008_Dist_max = 0 +local Att3009_Dist_min = 5 +local Att3009_Dist_max = 25 +local Att3010_Dist_min = 0 +local Att3010_Dist_max = 5.5 +REGISTER_GOAL_NO_UPDATE(GOAL_Hellkite343000_Battle, 1) +function OnIf_343000(ai, goal, codeNo) + local targetDist = ai:GetDist(TARGET_ENE_0) + ai:SetNumber(0, 0) + return +end + +function Hellkite343000Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest(1) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + local fate5 = ai:GetRandam_Int(1, 100) + local fate6 = ai:GetRandam_Int(1, 100) + local fate7 = ai:GetRandam_Int(1, 100) + local fate8 = ai:GetRandam_Int(1, 100) + local fate9 = ai:GetRandam_Int(1, 100) + local fate_Safety = ai:GetRandam_Int(1, 100) + local PARTS_IDX_TAIL = 0 + local tailDmgLv = ai:GetPartsDmg(PARTS_IDX_TAIL) + local Approach30Timer = ai:GetTimer(0) + local Approach12Timer = ai:GetTimer(1) + local ApproachNearestTimer = ai:GetTimer(2) + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act08Per = 0 + local Act09Per = 0 + local Act10Per = 0 + local Act11Per = 0 + local Act12Per = 0 + local Act13Per = 0 + local Act14Per = 0 + local Act15Per = 0 + local Act16Per = 0 + local Act17Per = 0 + ai:AddObserveChrDmySphere(0, TARGET_ENE_0, 100, 2.3) + ai:AddObserveChrDmySphere(1, TARGET_ENE_0, 101, 2.5) + ai:AddObserveChrDmySphere(2, TARGET_ENE_0, 102, 2.3) + ai:SetEventMoveTarget(1012710) + local Dist_Self_1012710 = ai:GetDistAtoB(POINT_EVENT, TARGET_SELF) + local Dist_ENE_1012710 = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + ai:SetEventMoveTarget(1012711) + local Dist_Self_1012711 = ai:GetDistAtoB(POINT_EVENT, TARGET_SELF) + local Dist_ENE_1012711 = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + local TailAttack = 1 + if tailDmgLv == PARTS_DMG_FINAL then + TailAttack = 0 + end + if 0 < Approach30Timer then + if targetDist <= 30 then + Act12Per = 100 + else + Act09Per = 100 + end + elseif 0 < Approach12Timer then + if targetDist <= 12 then + Act12Per = 100 + else + Act09Per = 100 + end + elseif 0 < ApproachNearestTimer then + local NearestPoint = Find_Nearest_Point(ai, goal) + ai:SetEventMoveTarget(NearestPoint) + local Dist_NearestPoint = ai:GetDistAtoB(POINT_EVENT, TARGET_SELF) + if Dist_NearestPoint <= 1 or not ai:IsInsideTargetRegion(TARGET_ENE_0, 1012760) and not ai:IsInsideTargetRegion(TARGET_ENE_0, 1012761) and not ai:IsInsideTargetRegion(TARGET_ENE_0, 1012762) and not ai:IsInsideTargetRegion(TARGET_ENE_0, 1012763) then + Act12Per = 100 + else + Act09Per = 100 + end + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 120) and 3 <= targetDist and targetDist <= 16 and fate <= 50 then + Act08Per = 100 * TailAttack + elseif (not not ai:IsInsideTargetRegion(TARGET_ENE_0, 1012760) or not not ai:IsInsideTargetRegion(TARGET_ENE_0, 1012761) or not not ai:IsInsideTargetRegion(TARGET_ENE_0, 1012762) or ai:IsInsideTargetRegion(TARGET_ENE_0, 1012763)) and fate_Safety <= 60 then + local NearestPoint = Find_Nearest_Point(ai, goal) + ai:SetEventMoveTarget(NearestPoint) + local Dist_NearestPoint = ai:GetDistAtoB(POINT_EVENT, TARGET_SELF) + if 3 <= Dist_NearestPoint then + Act16Per = 100 + else + Act15Per = 100 + end + elseif ai:IsInsideObserve(0) and fate2 <= 40 then + Act04Per = 100 + elseif ai:IsInsideObserve(1) and fate3 <= 40 then + Act05Per = 100 + elseif ai:IsInsideObserve(2) and fate4 <= 40 then + Act06Per = 100 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 30) and 6 <= targetDist and targetDist <= 13 and fate5 <= 40 then + Act07Per = 100 + elseif 40 <= targetDist then + Act10Per = 100 + elseif 34 <= targetDist then + if not (not ai:IsInsideTargetRegion(TARGET_SELF, 1012716) or Dist_ENE_1012710 >= Dist_Self_1012710) or ai:IsInsideTargetRegion(TARGET_SELF, 1012717) and Dist_ENE_1012711 < Dist_Self_1012711 then + Act03Per = 75 + end + Act10Per = 25 + elseif 25 <= targetDist then + if not (not ai:IsInsideTargetRegion(TARGET_SELF, 1012716) or Dist_ENE_1012710 >= Dist_Self_1012710) or ai:IsInsideTargetRegion(TARGET_SELF, 1012717) and Dist_ENE_1012711 < Dist_Self_1012711 then + Act03Per = 60 + end + Act01Per = 15 + Act02Per = 15 + Act10Per = 10 + elseif 20 <= targetDist then + if not (not ai:IsInsideTargetRegion(TARGET_SELF, 1012716) or Dist_ENE_1012710 >= Dist_Self_1012710) or ai:IsInsideTargetRegion(TARGET_SELF, 1012717) and Dist_ENE_1012711 < Dist_Self_1012711 then + Act03Per = 30 + end + if not (not ai:IsInsideTargetRegion(TARGET_SELF, 1012752) or Dist_ENE_1012710 >= Dist_Self_1012710) or ai:IsInsideTargetRegion(TARGET_SELF, 1012753) and Dist_ENE_1012711 < Dist_Self_1012711 then + Act14Per = 40 + end + Act01Per = 14 + Act02Per = 14 + Act11Per = 2 + elseif 18 <= targetDist then + if not (not ai:IsInsideTargetRegion(TARGET_SELF, 1012752) or Dist_ENE_1012710 >= Dist_Self_1012710) or ai:IsInsideTargetRegion(TARGET_SELF, 1012753) and Dist_ENE_1012711 < Dist_Self_1012711 then + Act14Per = 60 + end + Act01Per = 19 + Act02Per = 19 + Act11Per = 2 + elseif 13 <= targetDist then + if not (not ai:IsInsideTargetRegion(TARGET_SELF, 1012752) or Dist_ENE_1012710 >= Dist_Self_1012710) or ai:IsInsideTargetRegion(TARGET_SELF, 1012753) and Dist_ENE_1012711 < Dist_Self_1012711 then + Act14Per = 90 + end + Act01Per = 2 + Act02Per = 2 + Act11Per = 6 + elseif 8 <= targetDist then + if not (not ai:IsInsideTargetRegion(TARGET_SELF, 1012752) or Dist_ENE_1012710 >= Dist_Self_1012710) or ai:IsInsideTargetRegion(TARGET_SELF, 1012753) and Dist_ENE_1012711 < Dist_Self_1012711 then + Act14Per = 60 + end + if not (not ai:IsInsideTargetRegion(TARGET_SELF, 1012751) or Dist_ENE_1012710 >= Dist_Self_1012710) or ai:IsInsideTargetRegion(TARGET_SELF, 1012750) and Dist_ENE_1012711 < Dist_Self_1012711 then + Act13Per = 60 + end + Act06Per = 20 + Act07Per = 20 + elseif 5.5 <= targetDist then + if not (not ai:IsInsideTargetRegion(TARGET_SELF, 1012752) or Dist_ENE_1012710 >= Dist_Self_1012710) or ai:IsInsideTargetRegion(TARGET_SELF, 1012753) and Dist_ENE_1012711 < Dist_Self_1012711 then + Act14Per = 70 + end + if not (not ai:IsInsideTargetRegion(TARGET_SELF, 1012751) or Dist_ENE_1012710 >= Dist_Self_1012710) or ai:IsInsideTargetRegion(TARGET_SELF, 1012750) and Dist_ENE_1012711 < Dist_Self_1012711 then + Act13Per = 70 + end + Act06Per = 30 + else + if not (not ai:IsInsideTargetRegion(TARGET_SELF, 1012752) or Dist_ENE_1012710 >= Dist_Self_1012710) or ai:IsInsideTargetRegion(TARGET_SELF, 1012753) and Dist_ENE_1012711 < Dist_Self_1012711 then + Act14Per = 5 + end + Act15Per = 55 + Act17Per = 40 + end + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per + Act16Per + Act17Per) + if 1 <= eventNo then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, POINT_INITIAL, 0.1, POINT_INITIAL, true, -1) + ai:SetEventMoveTarget(1012711) + goal:AddSubGoal(GOAL_COMMON_Turn, 10, POINT_EVENT, 2, 0, 0) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 30, 3011, TARGET_ENE_0, DIST_None, 0) + elseif fateAct <= Act01Per then + Hellkite343000_Act1(ai, goal) + elseif fateAct <= Act01Per + Act02Per then + Hellkite343000_Act2(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per then + Hellkite343000_Act3(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + Hellkite343000_Act4(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + Hellkite343000_Act5(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + Hellkite343000_Act6(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + Hellkite343000_Act7(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per then + Hellkite343000_Act8(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per then + Hellkite343000_Act9(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per then + ai:SetTimer(0, 10) + Hellkite343000_Turn(ai, goal) + Hellkite343000_Act9(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per then + ai:SetTimer(1, 10) + Hellkite343000_Turn(ai, goal) + Hellkite343000_Act9(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per then + ai:SetTimer(0, 0) + ai:SetTimer(1, 0) + ai:SetTimer(2, 0) + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_SELF) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per then + Hellkite343000_Act13(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per + Act14Per then + Hellkite343000_Act14(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per then + Hellkite343000_Act15(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per + Act16Per then + ai:SetTimer(2, 10) + Hellkite343000_Turn(ai, goal) + Hellkite343000_Act9(ai, goal) + else + Hellkite343000_Act17(ai, goal) + end + return +end + +function Hellkite343000_Turn(ai, goal) + ai:SetEventMoveTarget(1012710) + local Dist_Self_1012710 = ai:GetDistAtoB(POINT_EVENT, TARGET_SELF) + local Dist_ENE_1012710 = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + if Dist_ENE_1012710 <= Dist_Self_1012710 then + ai:SetEventMoveTarget(1012710) + goal:AddSubGoal(GOAL_COMMON_Turn, 10, POINT_EVENT, 2, 0, 0) + else + ai:SetEventMoveTarget(1012711) + goal:AddSubGoal(GOAL_COMMON_Turn, 10, POINT_EVENT, 2, 0, 0) + end + return +end + +function Hellkite343000_Act1(ai, goal) + Hellkite343000_Turn(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 30, 3000, TARGET_ENE_0, DIST_None, 0) + return +end + +function Hellkite343000_Act2(ai, goal) + Hellkite343000_Turn(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 30, 3001, TARGET_ENE_0, DIST_None, 0) + return +end + +function Hellkite343000_Act3(ai, goal) + Hellkite343000_Turn(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 30, 3002, TARGET_ENE_0, DIST_None, 0) + return +end + +function Hellkite343000_Act4(ai, goal) + Hellkite343000_Turn(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 30, 3003, TARGET_ENE_0, DIST_None, 0) + return +end + +function Hellkite343000_Act5(ai, goal) + Hellkite343000_Turn(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 30, 3004, TARGET_ENE_0, DIST_None, 0) + return +end + +function Hellkite343000_Act6(ai, goal) + Hellkite343000_Turn(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 30, 3005, TARGET_ENE_0, DIST_None, 0) + return +end + +function Hellkite343000_Act7(ai, goal) + Hellkite343000_Turn(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 30, 3006, TARGET_ENE_0, DIST_None, 0) + return +end + +function Hellkite343000_Act8(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 30, 3007, TARGET_ENE_0, DIST_None, 0) + return +end + +function Hellkite343000_Act9(ai, goal) + local NearestPoint = Find_Nearest_Point(ai, goal) + ai:SetEventMoveTarget(NearestPoint) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 1, POINT_EVENT, 1, POINT_EVENT, true, -1) + return +end + +function Find_Nearest_Point(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + ai:SetEventMoveTarget(1012721) + local B = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + ai:SetEventMoveTarget(1012722) + local C = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + ai:SetEventMoveTarget(1012723) + local D = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + ai:SetEventMoveTarget(1012724) + local E = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + ai:SetEventMoveTarget(1012725) + local F = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + ai:SetEventMoveTarget(1012726) + local G = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + ai:SetEventMoveTarget(1012727) + local H = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + ai:SetEventMoveTarget(1012728) + local I = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + ai:SetEventMoveTarget(1012729) + local J = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + ai:SetEventMoveTarget(1012730) + local K = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + ai:SetEventMoveTarget(1012731) + local L = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + ai:SetEventMoveTarget(1012732) + local M = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + ai:SetEventMoveTarget(1012733) + local N = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + ai:SetEventMoveTarget(1012734) + local O = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + ai:SetEventMoveTarget(1012735) + local P = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + local minDist = math.min(B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) + if minDist == B then + NearPoint = 1012721 + elseif minDist == C then + NearPoint = 1012722 + elseif minDist == D then + NearPoint = 1012723 + elseif minDist == E then + NearPoint = 1012724 + elseif minDist == F then + NearPoint = 1012725 + elseif minDist == G then + NearPoint = 1012726 + elseif minDist == H then + NearPoint = 1012727 + elseif minDist == I then + NearPoint = 1012728 + elseif minDist == J then + NearPoint = 1012729 + elseif minDist == K then + NearPoint = 1012730 + elseif minDist == L then + NearPoint = 1012731 + elseif minDist == M then + NearPoint = 1012732 + elseif minDist == N then + NearPoint = 1012733 + elseif minDist == O then + NearPoint = 1012734 + elseif minDist == P then + NearPoint = 1012735 + end + return NearPoint +end + +function Hellkite343000_Act13(ai, goal) + Hellkite343000_Turn(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 30, 3008, TARGET_ENE_0, DIST_None, 0) + return +end + +function Hellkite343000_Act14(ai, goal) + Hellkite343000_Turn(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 30, 3009, TARGET_ENE_0, DIST_None, 0) + return +end + +function Hellkite343000_Act15(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 30, 3010, TARGET_ENE_0, DIST_None, 0) + return +end + +function Hellkite343000_Act17(ai, goal) + if ai:IsInsideTargetRegion(TARGET_SELF, 1012751) and ai:IsInsideTargetRegion(TARGET_SELF, 1012750) then + ai:SetEventMoveTarget(1012711) + if ai:IsInsideTarget(POINT_EVENT, AI_DIR_TYPE_F, 180) then + goal:AddSubGoal(GOAL_COMMON_Turn, 10, POINT_EVENT, 2, 0, 0) + else + ai:SetEventMoveTarget(1012710) + goal:AddSubGoal(GOAL_COMMON_Turn, 10, POINT_EVENT, 2, 0, 0) + end + elseif ai:IsInsideTargetRegion(TARGET_SELF, 1012750) then + ai:SetEventMoveTarget(1012711) + goal:AddSubGoal(GOAL_COMMON_Turn, 10, POINT_EVENT, 2, 0, 0) + else + ai:SetEventMoveTarget(1012710) + goal:AddSubGoal(GOAL_COMMON_Turn, 10, POINT_EVENT, 2, 0, 0) + end + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 30, 3008, TARGET_ENE_0, DIST_None, 0) + return +end + +function Hellkite343000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Hellkite343000Battle_Terminate(ai, goal) + return +end + +function Hellkite343000Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/346000_battle.lua b/scripts_decompiled/346000_battle.lua new file mode 100644 index 0000000..74ce1de --- /dev/null +++ b/scripts_decompiled/346000_battle.lua @@ -0,0 +1,192 @@ +REGISTER_GOAL(GOAL_ArmoredTask346000_Battle, "ArmoredTask346000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 2 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 10 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 1.4 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 1.6 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 1.6 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 1.1 +local Att3007_Dist_min = 0 +local Att3007_Dist_max = 3.5 +local Att3008_Dist_min = 0 +local Att3008_Dist_max = 8 +local Att3009_Dist_min = 2.5 +local Att3009_Dist_max = 4 +REGISTER_GOAL_NO_UPDATE(GOAL_ArmoredTask346000_Battle, 1) +Att3000_Dist_min = Att3009_Dist_max +Att3000_Dist_min = Att3009_Dist_min +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3008_Dist_max +Att3000_Dist_min = Att3001_Dist_max +Att3000_Dist_min = Att3002_Dist_max +Att3000_Dist_min = Att3007_Dist_max +function ArmoredTask346000Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local kakutimer = ai:GetRandam_Int(120, 180) + local eventNo = ai:GetEventRequest(0) + local FlagGoHome = 0 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + local GetWellSpace_Odds = 0 + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act08Per = 0 + local Act09Per = 0 + local Act10Per = 0 + ai:SetEventMoveTarget(1012772) + local DistToPointA = ai:GetDistAtoB(POINT_EVENT, TARGET_SELF) + ai:SetEventMoveTarget(1012773) + local DistToPointB = ai:GetDistAtoB(POINT_EVENT, TARGET_SELF) + if eventNo == 1 then + if ai:IsInsideTargetRegion(TARGET_SELF, 1012770) and not ai:IsInsideTargetRegion(TARGET_ENE_0, 1012770) then + FlagGoHome = 1 + Act09Per = 100 + elseif ai:IsInsideTargetRegion(TARGET_SELF, 1012771) and not ai:IsInsideTargetRegion(TARGET_ENE_0, 1012771) then + FlagGoHome = 1 + Act10Per = 100 + end + elseif not ai:IsInsideTargetRegion(TARGET_ENE_0, 1012770) and not ai:IsInsideTargetRegion(TARGET_ENE_0, 1012771) then + FlagGoHome = 1 + Act09Per = 100 + end + if FlagGoHome == 0 then + if ai:IsFinishTimer(0) == true and 12 <= targetDist then + ai:SetTimer(0, kakutimer) + Act04Per = 100 + elseif targetDist <= 1.1 and fate <= 80 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 45) then + Act07Per = 100 + elseif targetDist <= 2 and fate <= 80 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 90) then + Act05Per = 100 + elseif targetDist <= 2 and fate <= 80 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 90) then + Act06Per = 100 + elseif 12 <= targetDist then + Act01Per = 25 + Act02Per = 55 + Act03Per = 20 + Act08Per = 0 + elseif 4 <= targetDist then + Act01Per = 40 + Act02Per = 35 + Act03Per = 20 + Act08Per = 5 + else + Act01Per = 35 + Act02Per = 10 + Act03Per = 35 + Act08Per = 20 + end + end + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per) + if fateAct <= Act01Per then + if 6 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, Att3009_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3009, TARGET_ENE_0, DIST_Middle, 1.5, 30) + elseif 4.5 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, Att3009_Dist_min, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3009, TARGET_ENE_0, DIST_Middle, 1.5, 30) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, 1.5, -1) + end + goal:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_NONE, 0, 0, 0) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per then + if 10 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, Att3008_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3008, TARGET_ENE_0, DIST_Middle, 1.5, 30) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, TARGET_ENE_0, Att3001_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3001, TARGET_ENE_0, DIST_Middle, 1.5, 30) + end + goal:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_NONE, 0, 0, 0) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per then + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, DIST_Middle, 1, 20) + goal:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_NONE, 0, 0, 0) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3003, TARGET_ENE_0, DIST_None) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, Att3008_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3008, TARGET_ENE_0, DIST_Middle, 1.5, 30) + goal:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_NONE, 0, 0, 0) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per then + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3007, TARGET_ENE_0, DIST_Middle, 1.5, 10) + goal:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_NONE, 0, 0, 0) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per then + if 2 <= DistToPointA then + ai:SetEventMoveTarget(1012772) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, POINT_EVENT, 1, TARGET_SELF, true, -1) + end + goal:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_SELF) + goal:AddSubGoal(GOAL_COMMON_Turn, 2, TARGET_ENE_0, 0, 0, 0) + else + if 2 <= DistToPointB then + ai:SetEventMoveTarget(1012773) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, POINT_EVENT, 1, TARGET_SELF, true, -1) + end + goal:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_SELF) + goal:AddSubGoal(GOAL_COMMON_Turn, 2, TARGET_ENE_0, 0, 0, 0) + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + ArmoredTask346000_ActAfter_AdjustSpace(ai, goal) + end + return +end + +function ArmoredTask346000_ActAfter_AdjustSpace(ai, goal) + local KN_fate = ai:GetRandam_Int(1, 100) + if KN_fate > 80 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 3) + end + return +end + +function ArmoredTask346000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function ArmoredTask346000Battle_Terminate(ai, goal) + return +end + +function ArmoredTask346000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + return false +end + +return diff --git a/scripts_decompiled/346100_battle.lua b/scripts_decompiled/346100_battle.lua new file mode 100644 index 0000000..2487ab7 --- /dev/null +++ b/scripts_decompiled/346100_battle.lua @@ -0,0 +1,169 @@ +REGISTER_GOAL(GOAL_ArmoredTask_BackGuard346100_Battle, "ArmoredTask_BackGuard346100Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 2 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 10 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 1.4 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 1.6 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 1.6 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 1.1 +local Att3007_Dist_min = 0 +local Att3007_Dist_max = 3.5 +local Att3008_Dist_min = 0 +local Att3008_Dist_max = 8 +local Att3009_Dist_min = 2.5 +local Att3009_Dist_max = 4 +REGISTER_GOAL_NO_UPDATE(GOAL_ArmoredTask_BackGuard346100_Battle, 1) +Att3000_Dist_min = Att3009_Dist_max +Att3000_Dist_min = Att3009_Dist_min +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3008_Dist_max +Att3000_Dist_min = Att3001_Dist_max +Att3000_Dist_min = Att3002_Dist_max +Att3000_Dist_min = Att3007_Dist_max +function ArmoredTask_BackGuard346100Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local kakutimer = ai:GetRandam_Int(120, 180) + local eventNo = ai:GetEventRequest(0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + local GetWellSpace_Odds = 0 + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act08Per = 0 + local Act09Per = 0 + ai:SetEventMoveTarget(1702751) + local Sumade = ai:GetDistAtoB(POINT_EVENT, TARGET_SELF) + if not not ai:IsInsideTargetRegion(TARGET_ENE_0, 1702750) or ai:IsInsideTargetRegion(TARGET_ENE_0, 1702752) then + Act09Per = 100 + elseif ai:IsFinishTimer(0) == true and 12 <= targetDist then + ai:SetTimer(0, kakutimer) + Act04Per = 100 + elseif targetDist <= 1.1 and fate <= 80 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 45) then + Act07Per = 100 + elseif targetDist <= 2 and fate <= 80 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 90) then + Act05Per = 100 + elseif targetDist <= 2 and fate <= 80 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 90) then + Act06Per = 100 + elseif 12 <= targetDist then + Act01Per = 25 + Act02Per = 55 + Act03Per = 20 + Act08Per = 0 + elseif 4 <= targetDist then + Act01Per = 40 + Act02Per = 35 + Act03Per = 20 + Act08Per = 5 + else + Act01Per = 35 + Act02Per = 10 + Act03Per = 35 + Act08Per = 20 + end + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per) + if fateAct <= Act01Per then + if 6 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, Att3009_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3009, TARGET_ENE_0, DIST_Middle, 1.5, 30) + elseif 4.5 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, Att3009_Dist_min, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3009, TARGET_ENE_0, DIST_Middle, 1.5, 30) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, 1.5, -1) + end + goal:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_NONE, 0, 0, 0) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per then + if 10 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, Att3008_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3008, TARGET_ENE_0, DIST_Middle, 1.5, 30) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, TARGET_ENE_0, Att3001_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3001, TARGET_ENE_0, DIST_Middle, 1.5, 30) + end + goal:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_NONE, 0, 0, 0) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per then + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, DIST_Middle, 1, 20) + goal:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_NONE, 0, 0, 0) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3003, TARGET_ENE_0, DIST_None) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, Att3008_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3008, TARGET_ENE_0, DIST_Middle, 1.5, 30) + goal:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_NONE, 0, 0, 0) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per then + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3007, TARGET_ENE_0, DIST_Middle, 1.5, 10) + goal:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_NONE, 0, 0, 0) + GetWellSpace_Odds = 100 + else + if 2 <= Sumade then + ai:SetEventMoveTarget(1702751) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, POINT_EVENT, 2.5, TARGET_SELF, true, -1) + end + goal:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_SELF) + goal:AddSubGoal(GOAL_COMMON_Turn, 2, TARGET_ENE_0, 0, 0, 0) + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + ArmoredTask_BackGuard346100_ActAfter_AdjustSpace(ai, goal) + end + return +end + +function ArmoredTask_BackGuard346100_ActAfter_AdjustSpace(ai, goal) + local KN_fate = ai:GetRandam_Int(1, 100) + if KN_fate > 80 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 3) + end + return +end + +function ArmoredTask_BackGuard346100Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function ArmoredTask_BackGuard346100Battle_Terminate(ai, goal) + return +end + +function ArmoredTask_BackGuard346100Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + return false +end + +return diff --git a/scripts_decompiled/347100_battle.lua b/scripts_decompiled/347100_battle.lua new file mode 100644 index 0000000..2a10f0d --- /dev/null +++ b/scripts_decompiled/347100_battle.lua @@ -0,0 +1,757 @@ +REGISTER_GOAL(GOAL_GoldenChimera347100_Battle, "GoldenChimera347100Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 2.5 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 4.5 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 5.5 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 2.5 +local Att3006_Dist_min = 2 +local Att3006_Dist_max = 5 +local Att3007_Dist_min = 8.5 +local Att3007_Dist_max = 10.5 +local Att3008_Dist_min = 8.5 +local Att3008_Dist_max = 10.5 +local Att3009_Dist_min = 7.5 +local Att3009_Dist_max = 8.5 +local Att3010_Dist_min = 0 +local Att3010_Dist_max = 8.5 +local Att3012_Dist_min = 0 +local Att3012_Dist_max = 4.5 +local Att3014_Dist_min = 0 +local Att3014_Dist_max = 1 +local Att3020_Dist_min = 10.5 +local Att3020_Dist_max = 14.5 +local Att3021_Dist_min = 13.5 +local Att3021_Dist_max = 16.5 +local Att3022_Dist_min = 2.5 +local Att3022_Dist_max = 12.5 +REGISTER_GOAL_NO_UPDATE(GOAL_GoldenChimera347100_Battle, 1) +function OnIf_347100(ai, goal, codeNo) + if codeNo == 0 then + GoldenChimera347100_ActAfter_RealTime(ai, goal) + end + if codeNo == 1 then + GoldenChimera347100_FlyingDecision01(ai, goal) + end + if codeNo == 2 then + GoldenChimera347100_FlyingDecision02(ai, goal) + end + if codeNo == 3 then + GoldenChimera347100_FlyingDecision03(ai, goal) + end + if codeNo == 4 then + GoldenChimera347100_BackStepDecision01(ai, goal) + end + if codeNo == 5 then + GoldenChimera347100_ChargeDecision01(ai, goal) + end + return +end + +function GoldenChimera347100Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + local PARTS_IDX_TAIL = 0 + local tailDmgLv = ai:GetPartsDmg(PARTS_IDX_TAIL) + local habataki = 1 + if ai:IsFinishTimer(0) == false then + habataki = 0.5 + end + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 270) then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 90) and targetDist <= 5 then + actPerArr[8] = 100 + else + actPerArr[16] = 100 + end + elseif ai:GetNumber(0) == 1 then + actPerArr[15] = 100 + elseif ai:GetNumber(3) == 1 then + actPerArr[14] = 100 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 150) and targetDist <= 3 then + actPerArr[2] = 100 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 150) and targetDist <= 3 then + actPerArr[3] = 100 + elseif 20 <= targetDist then + actPerArr[2] = 5 + actPerArr[3] = 5 + actPerArr[5] = 0 + actPerArr[6] = 15 + actPerArr[7] = 15 + actPerArr[9] = 0 + actPerArr[10] = 10 + actPerArr[12] = 20 + actPerArr[13] = 15 + actPerArr[14] = 15 + actPerArr[17] = 0 + elseif 15 <= targetDist then + actPerArr[2] = 10 + actPerArr[3] = 10 + actPerArr[5] = 0 + actPerArr[6] = 15 + actPerArr[7] = 15 + actPerArr[9] = 0 + actPerArr[10] = 10 + actPerArr[12] = 10 + actPerArr[13] = 10 + actPerArr[14] = 20 + actPerArr[17] = 0 + elseif 10 <= targetDist then + actPerArr[2] = 10 + actPerArr[3] = 10 + actPerArr[5] = 0 + actPerArr[6] = 10 + actPerArr[7] = 10 + actPerArr[9] = 15 + actPerArr[10] = 15 + actPerArr[12] = 10 + actPerArr[13] = 10 + actPerArr[14] = 10 + actPerArr[17] = 0 + elseif 7 <= targetDist then + actPerArr[2] = 5 + actPerArr[3] = 5 + actPerArr[5] = 35 * habataki + actPerArr[6] = 0 + actPerArr[7] = 0 + actPerArr[9] = 25 + actPerArr[10] = 20 + actPerArr[12] = 0 + actPerArr[13] = 5 + actPerArr[14] = 5 + actPerArr[17] = 0 + elseif 4 <= targetDist then + actPerArr[2] = 20 + actPerArr[3] = 20 + actPerArr[5] = 40 * habataki + actPerArr[6] = 0 + actPerArr[7] = 0 + actPerArr[9] = 0 + actPerArr[10] = 0 + actPerArr[12] = 0 + actPerArr[13] = 5 + actPerArr[14] = 5 + actPerArr[17] = 10 + else + actPerArr[2] = 33 + actPerArr[3] = 33 + actPerArr[5] = 0 + actPerArr[6] = 0 + actPerArr[7] = 0 + actPerArr[9] = 0 + actPerArr[10] = 0 + actPerArr[12] = 0 + actPerArr[13] = 0 + actPerArr[14] = 0 + actPerArr[17] = 34 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, GoldenChimera347100_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, GoldenChimera347100_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, GoldenChimera347100_Act03) + actFuncArr[5] = REGIST_FUNC(ai, goal, GoldenChimera347100_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, GoldenChimera347100_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, GoldenChimera347100_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, GoldenChimera347100_Act08) + actFuncArr[9] = REGIST_FUNC(ai, goal, GoldenChimera347100_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, GoldenChimera347100_Act10) + actFuncArr[12] = REGIST_FUNC(ai, goal, GoldenChimera347100_Act12) + actFuncArr[13] = REGIST_FUNC(ai, goal, GoldenChimera347100_Act13) + actFuncArr[14] = REGIST_FUNC(ai, goal, GoldenChimera347100_Act14) + actFuncArr[15] = REGIST_FUNC(ai, goal, GoldenChimera347100_Act15) + actFuncArr[16] = REGIST_FUNC(ai, goal, GoldenChimera347100_Act16) + actFuncArr[17] = REGIST_FUNC(ai, goal, GoldenChimera347100_Act17) + actFuncArr[18] = REGIST_FUNC(ai, goal, GoldenChimera347100_Act18) + local atkAfterFunc = REGIST_FUNC(ai, goal, GoldenChimera347100_ActAfter_AdjustSpace) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +function GoldenChimera347100_Act01(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + ai:SetNumber(1, ai:GetNumber(1) + 50) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3000_Dist_max +function GoldenChimera347100_Act02(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max - 1 + local DashDist = Att3000_Dist_max + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + if fate2 <= 0 then + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3015, TARGET_ENE_0, DIST_Middle, 0) + ai:SetNumber(1, ai:GetNumber(1) + 10) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3015, TARGET_ENE_0, DIST_Middle, 0, 30, 0, 0) + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + ai:SetNumber(1, ai:GetNumber(1) + 20) + else + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3011, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + ai:SetNumber(1, ai:GetNumber(1) + 40) + end + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3000_Dist_max +function GoldenChimera347100_Act03(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max - 1 + local DashDist = Att3000_Dist_max + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + if fate2 <= 0 then + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3016, TARGET_ENE_0, DIST_Middle, 0) + ai:SetNumber(1, ai:GetNumber(1) + 10) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3016, TARGET_ENE_0, DIST_Middle, 0, 30, 0, 0) + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3011, TARGET_ENE_0, DIST_Middle, 0) + ai:SetNumber(1, ai:GetNumber(1) + 20) + else + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3011, TARGET_ENE_0, DIST_Middle, 0) + ai:SetNumber(1, ai:GetNumber(1) + 40) + end + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_max +function GoldenChimera347100_Act05(ai, goal, paramTbl) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3006, TARGET_ENE_0, DIST_Middle, 0, 30, 0, 0) + ai:SetNumber(0, 1) + ai:SetNumber(1, ai:GetNumber(1) + 0) + ai:SetTimer(0, 30) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function GoldenChimera347100_Act06(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3007, TARGET_ENE_0, DIST_None, 0, 0) + ai:SetNumber(1, ai:GetNumber(1) + 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function GoldenChimera347100_Act07(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3008, TARGET_ENE_0, DIST_None, 0, 0) + ai:SetNumber(1, ai:GetNumber(1) + 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function GoldenChimera347100_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local PARTS_IDX_TAIL = 0 + local tailDmgLv = ai:GetPartsDmg(PARTS_IDX_TAIL) + local fate = ai:GetRandam_Int(1, 100) + if tailDmgLv ~= PARTS_DMG_FINAL then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 90) and targetDist <= 5 and fate <= 33 then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + ai:SetNumber(1, ai:GetNumber(1) + 50) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 90) and targetDist <= 5 and fate <= 66 then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + ai:SetNumber(1, ai:GetNumber(1) + 50) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 30) and targetDist <= 3 then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3013, TARGET_ENE_0, DIST_Middle, 0) + ai:SetNumber(1, ai:GetNumber(1) + 50) + else + GoldenChimera347100_Act16(ai, goal) + end + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 30) and targetDist <= 2 and fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3024, TARGET_NONE, DIST_Middle, 0) + ai:SetNumber(1, ai:GetNumber(1) + 0) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 30) and targetDist <= 3 and fate <= 100 then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3013, TARGET_ENE_0, DIST_Middle, 0) + ai:SetNumber(1, ai:GetNumber(1) + 50) + else + GoldenChimera347100_Act16(ai, goal) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3009_Dist_max +function GoldenChimera347100_Act09(ai, goal, paramTbl) + local AppDist = Att3009_Dist_max + local DashDist = Att3009_Dist_max + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_If, 10, 4) + return +end + +Att3000_Dist_min = Att3010_Dist_max +function GoldenChimera347100_Act10(ai, goal, paramTbl) + local AppDist = Att3010_Dist_max + local DashDist = Att3010_Dist_max + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_If, 10, 5) + return +end + +Att3000_Dist_min = Att3020_Dist_max +function GoldenChimera347100_Act12(ai, goal, paramTbl) + local AppDist = Att3020_Dist_max + local DashDist = Att3020_Dist_max + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_If, 10, 1) + return +end + +Att3000_Dist_min = Att3021_Dist_max +function GoldenChimera347100_Act13(ai, goal, paramTbl) + local AppDist = Att3021_Dist_max + local DashDist = Att3021_Dist_max + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_If, 10, 2) + return +end + +Att3000_Dist_min = Att3022_Dist_max +function GoldenChimera347100_Act14(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3022_Dist_max + local DashDist = Att3022_Dist_max + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_If, 10, 3) + return +end + +function GoldenChimera347100_Act15(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if ai:HasSpecialEffectId(TARGET_ENE_0, 5521) then + if targetDist <= 8 then + if ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_F, 10, 1212000) then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3010, TARGET_ENE_0, DIST_Middle, 0, 0) + GetWellSpace_Odds = 100 + ai:SetNumber(1, ai:GetNumber(1) + 40) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3007, TARGET_ENE_0, DIST_Middle, 0, 0) + GetWellSpace_Odds = 100 + ai:SetNumber(1, ai:GetNumber(1) + 0) + end + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3007, TARGET_ENE_0, DIST_Middle, 0, 0) + GetWellSpace_Odds = 100 + ai:SetNumber(1, ai:GetNumber(1) + 0) + end + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 711, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + GetWellSpace_Odds = 0 + ai:SetNumber(1, ai:GetNumber(1) + 0) + end + ai:SetNumber(0, 0) + return GetWellSpace_Odds +end + +function GoldenChimera347100_Act16(ai, goal, paramTbl) + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 712, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 713, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 0) + end + ai:SetNumber(1, ai:GetNumber(1) + 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3014_Dist_max +function GoldenChimera347100_Act17(ai, goal, paramTbl) + local AppDist = Att3014_Dist_max + local DashDist = Att3014_Dist_max + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3014, TARGET_ENE_0, DIST_Middle, 0, 30, 0, 0) + ai:SetNumber(1, ai:GetNumber(1) + 20) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function GoldenChimera347100_ActAfter_AdjustSpace(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_If, 10, 0) + return +end + +function GoldenChimera347100_ActAfter_RealTime(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + if 20 <= ai:GetNumber(2) then + local CanStepFR = 0 + local CanStepFL = 0 + local CanStepB = 0 + local CanStepR = 0 + local CanStepL = 0 + if ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_F, 20, 1212000) then + if ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_R, 10, 1212000) then + if ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_L, 10, 1212000) then + CanStepFR = 1 + CanStepFL = 1 + else + CanStepFR = 1 + end + elseif ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_L, 10, 1212000) then + CanStepFL = 1 + end + end + if ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_B, 25, 1212000) then + CanStepB = 1 + end + if ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_F, 10, 1212000) and ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_L, 10, 1212000) then + CanStepL = 1 + end + if ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_F, 10, 1212000) and ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_R, 10, 1212000) then + CanStepR = 1 + end + if CanStepFR == 1 then + if CanStepFL == 1 then + if CanStepB == 1 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 711, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + ai:SetNumber(3, 1) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 20) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 10, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, -1) + end + end + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 711, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + ai:SetNumber(3, 1) + end + elseif CanStepB == 1 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 711, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + ai:SetNumber(3, 1) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 20) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 10, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, -1) + end + end + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 711, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + ai:SetNumber(3, 1) + end + elseif CanStepFL == 1 then + if CanStepB == 1 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 711, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + ai:SetNumber(3, 1) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 20) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 10, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, -1) + end + end + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 711, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + ai:SetNumber(3, 1) + end + elseif CanStepB == 1 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 20) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 10, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, -1) + end + elseif CanStepL == 1 then + if CanStepR == 1 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 10) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 10) + end + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 10) + end + elseif CanStepR == 1 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 10) + end + ai:SetNumber(2, 0) + elseif 40 <= ai:GetNumber(1) then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 90) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 711, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 90) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 712, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 90) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 713, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + else + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 712, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 713, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + end + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 711, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + end + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 5, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, -1) + end + ai:SetNumber(1, 0) + ai:SetNumber(2, ai:GetNumber(2) + 10) + end + return +end + +function GoldenChimera347100_FlyingDecision01(ai, goal) + if ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_F, 25, 1212000) then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3020, TARGET_ENE_0, DIST_None, 0, 0) + ai:SetNumber(1, ai:GetNumber(1) + 10) + GetWellSpace_Odds = 100 + else + goal:ClearSubGoal() + GetWellSpace_Odds = 0 + end + return GetWellSpace_Odds +end + +function GoldenChimera347100_FlyingDecision02(ai, goal) + if ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_F, 25, 1212000) then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3021, TARGET_ENE_0, DIST_None, 0, 0) + ai:SetNumber(1, ai:GetNumber(1) + 10) + GetWellSpace_Odds = 100 + else + goal:ClearSubGoal() + GetWellSpace_Odds = 0 + end + return GetWellSpace_Odds +end + +function GoldenChimera347100_FlyingDecision03(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_F, 20, 1212000) then + if ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_R, 10, 1212000) then + if ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_L, 10, 1212000) then + if fate <= 50 then + if targetDist <= 8 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3025, TARGET_ENE_0, DIST_None, 0, 0) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3022, TARGET_ENE_0, DIST_None, 0, 0) + end + elseif targetDist <= 8 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3026, TARGET_ENE_0, DIST_None, 0, 0) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3023, TARGET_ENE_0, DIST_None, 0, 0) + end + elseif targetDist <= 8 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3025, TARGET_ENE_0, DIST_None, 0, 0) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3022, TARGET_ENE_0, DIST_None, 0, 0) + end + ai:SetNumber(1, 0) + GetWellSpace_Odds = 100 + elseif ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_L, 10, 1212000) then + if targetDist <= 8 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3026, TARGET_ENE_0, DIST_None, 0, 0) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3023, TARGET_ENE_0, DIST_None, 0, 0) + end + ai:SetNumber(1, 0) + GetWellSpace_Odds = 100 + else + goal:ClearSubGoal() + GetWellSpace_Odds = 0 + end + else + goal:ClearSubGoal() + GetWellSpace_Odds = 0 + end + ai:SetNumber(3, 0) + return GetWellSpace_Odds +end + +function GoldenChimera347100_BackStepDecision01(ai, goal) + if ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_B, 25, 1212000) then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3009, TARGET_ENE_0, DIST_Middle, 0, 0) + ai:SetNumber(1, 0) + GetWellSpace_Odds = 100 + else + goal:ClearSubGoal() + GetWellSpace_Odds = 0 + end + return GetWellSpace_Odds +end + +function GoldenChimera347100_ChargeDecision01(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + if ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_F, 15, 1212000) then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3010, TARGET_ENE_0, DIST_Middle, 0, 0) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 711, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + ai:SetNumber(1, 0) + GetWellSpace_Odds = 0 + else + ai:SetNumber(1, ai:GetNumber(1) + 20) + GetWellSpace_Odds = 100 + end + else + goal:ClearSubGoal() + GetWellSpace_Odds = 0 + end + return GetWellSpace_Odds +end + +function GoldenChimera347100Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function GoldenChimera347100Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3014_Dist_max +Att3000_Dist_min = Att3010_Dist_max +Att3000_Dist_min = Att3020_Dist_max +function GoldenChimera347100Battle_Interupt(ai, goal) + if ai:GetNumber(0) == 0 then + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if ai:IsInterupt(INTERUPT_GuardBreak) then + if fate <= 50 then + if targetDist <= 2 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 60) then + local AppDist = Att3014_Dist_max + local DashDist = 0 + local Odds_Guard = 0 + goal:ClearSubGoal() + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 1, 3014, TARGET_ENE_0, DIST_None, 0) + return true + elseif targetDist <= 8 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 90) then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 1, 3010, TARGET_ENE_0, DIST_None, 0) + return true + else + return false + end + else + return false + end + elseif ai:IsInterupt(INTERUPT_UseItem) then + if fate <= 50 then + if targetDist <= 2 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 60) then + local AppDist = Att3014_Dist_max + local DashDist = 0 + local Odds_Guard = 0 + goal:ClearSubGoal() + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 1, 3014, TARGET_ENE_0, DIST_None, 0) + return true + elseif targetDist <= 8 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 90) then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 1, 3010, TARGET_ENE_0, DIST_None, 0) + return true + elseif targetDist <= 13 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 120) then + goal:ClearSubGoal() + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 1, 3007, TARGET_ENE_0, DIST_None, 0) + else + local AppDist = Att3010_Dist_max + local DashDist = Att3010_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 1, 3010, TARGET_ENE_0, DIST_None, 0) + end + return true + else + return false + end + else + return false + end + elseif ai:IsInterupt(INTERUPT_Shoot) then + if fate <= 80 then + if targetDist <= 8 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 90) then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 1, 3010, TARGET_ENE_0, DIST_None, 0) + return true + elseif targetDist <= 13 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 120) then + goal:ClearSubGoal() + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 1, 3007, TARGET_ENE_0, DIST_None, 0) + elseif fate2 <= 75 then + local AppDist = Att3010_Dist_max + local DashDist = Att3010_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 1, 3010, TARGET_ENE_0, DIST_None, 0) + else + goal:ClearSubGoal() + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 1, 712, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 10) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 1, 713, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 10) + end + end + return true + elseif targetDist <= 20 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 150) then + goal:ClearSubGoal() + if fate2 <= 50 then + local AppDist = Att3020_Dist_max + local DashDist = 0 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 3, 3020, TARGET_ENE_0, DIST_None, 0) + elseif fate2 <= 75 then + local AppDist = Att3010_Dist_max + local DashDist = 0 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 3, 3010, TARGET_ENE_0, DIST_None, 0) + elseif fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 1, 712, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 10) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 1, 713, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 10) + end + return true + else + return false + end + else + return false + end + elseif ai:HasSpecialEffectId(TARGET_SELF, 5522) then + goal:ClearSubGoal() + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 180) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 711, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 712, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 713, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + end + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/347101_battle.lua b/scripts_decompiled/347101_battle.lua new file mode 100644 index 0000000..6f83203 --- /dev/null +++ b/scripts_decompiled/347101_battle.lua @@ -0,0 +1,958 @@ +REGISTER_GOAL(GOAL_GoldenChimera347101_Battle, "GoldenChimera347101Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 2.5 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 4.5 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 5.5 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 2.5 +local Att3006_Dist_min = 2 +local Att3006_Dist_max = 5 +local Att3007_Dist_min = 8.5 +local Att3007_Dist_max = 10.5 +local Att3008_Dist_min = 8.5 +local Att3008_Dist_max = 10.5 +local Att3009_Dist_min = 7.5 +local Att3009_Dist_max = 8.5 +local Att3010_Dist_min = 0 +local Att3010_Dist_max = 8.5 +local Att3012_Dist_min = 0 +local Att3012_Dist_max = 4.5 +local Att3014_Dist_min = 0 +local Att3014_Dist_max = 1 +local Att3020_Dist_min = 10.5 +local Att3020_Dist_max = 14.5 +local Att3021_Dist_min = 13.5 +local Att3021_Dist_max = 16.5 +local Att3022_Dist_min = 2.5 +local Att3022_Dist_max = 12.5 +REGISTER_GOAL_NO_UPDATE(GOAL_GoldenChimera347101_Battle, 1) +function OnIf_347101(ai, goal, codeNo) + if codeNo == 0 then + GoldenChimera347101_ActAfter_RealTime(ai, goal) + end + if codeNo == 1 then + GoldenChimera347101_FlyingDecision01(ai, goal) + end + if codeNo == 2 then + GoldenChimera347101_FlyingDecision02(ai, goal) + end + if codeNo == 3 then + GoldenChimera347101_FlyingDecision03(ai, goal) + end + if codeNo == 4 then + GoldenChimera347101_BackStepDecision01(ai, goal) + end + if codeNo == 5 then + GoldenChimera347101_ChargeDecision01(ai, goal) + end + return +end + +function GoldenChimera347101Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act08Per = 0 + local Act09Per = 0 + local Act10Per = 0 + local Act11Per = 0 + local Act12Per = 0 + local Act13Per = 0 + local Act14Per = 0 + local Act15Per = 0 + local Act16Per = 0 + local Act17Per = 0 + local Act18Per = 0 + local Act19Per = 0 + local Act20Per = 0 + local targetDist = ai:GetDist(TARGET_ENE_0) + local friendDist = ai:GetDist(TARGET_FRI_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + local PARTS_IDX_TAIL = 0 + local tailDmgLv = ai:GetPartsDmg(PARTS_IDX_TAIL) + local eventNo = ai:GetEventRequest(1) + local habataki = 1 + if ai:IsFinishTimer(0) == false then + habataki = 0.5 + end + if ai:GetTeamOrder(ORDER_TYPE_Role) == ROLE_TYPE_Attack then + if eventNo == 10 then + Act19Per = 100 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 270) then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 90) and targetDist <= 5 then + Act08Per = 100 + else + Act16Per = 100 + end + elseif ai:GetNumber(0) == 1 then + Act15Per = 100 + elseif ai:GetNumber(3) == 1 then + Act14Per = 100 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 150) and targetDist <= 3 then + Act02Per = 100 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 150) and targetDist <= 3 then + Act03Per = 100 + elseif 20 <= targetDist then + Act02Per = 5 + Act03Per = 5 + Act05Per = 0 + Act06Per = 15 + Act07Per = 15 + Act09Per = 0 + Act10Per = 10 + Act12Per = 20 + Act13Per = 15 + Act14Per = 15 + Act17Per = 0 + elseif 15 <= targetDist then + Act02Per = 10 + Act03Per = 10 + Act05Per = 0 + Act06Per = 15 + Act07Per = 15 + Act09Per = 0 + Act10Per = 10 + Act12Per = 10 + Act13Per = 10 + Act14Per = 20 + Act17Per = 0 + elseif 10 <= targetDist then + Act02Per = 10 + Act03Per = 10 + Act05Per = 0 + Act06Per = 10 + Act07Per = 10 + Act09Per = 15 + Act10Per = 15 + Act12Per = 10 + Act13Per = 10 + Act14Per = 10 + Act17Per = 0 + elseif 7 <= targetDist then + Act02Per = 5 + Act03Per = 5 + Act05Per = 35 * habataki + Act06Per = 0 + Act07Per = 0 + Act09Per = 25 + Act10Per = 20 + Act12Per = 0 + Act13Per = 0 + Act14Per = 0 + Act17Per = 0 + elseif 4 <= targetDist then + Act02Per = 20 + Act03Per = 20 + Act05Per = 40 * habataki + Act06Per = 0 + Act07Per = 0 + Act09Per = 0 + Act10Per = 0 + Act12Per = 0 + Act13Per = 5 + Act14Per = 5 + Act17Per = 10 + else + Act02Per = 33 + Act03Per = 33 + Act05Per = 0 + Act06Per = 0 + Act07Per = 0 + Act09Per = 0 + Act10Per = 0 + Act12Per = 0 + Act13Per = 0 + Act14Per = 0 + Act17Per = 34 + end + elseif ai:GetTeamOrder(ORDER_TYPE_Role) == ROLE_TYPE_Torimaki then + if eventNo == 10 then + Act19Per = 100 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 270) then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 30) and targetDist <= 3 then + Act08Per = 100 + else + Act16Per = 100 + end + elseif ai:GetNumber(3) == 1 then + Act14Per = 100 + elseif not (not ai:IsInsideTarget(TARGET_FRI_0, AI_DIR_TYPE_F, 9.5) or friendDist > 30) or not (not ai:IsInsideTarget(TARGET_FRI_0, AI_DIR_TYPE_F, 11.4) or friendDist > 25) or not (not ai:IsInsideTarget(TARGET_FRI_0, AI_DIR_TYPE_F, 14.3) or friendDist > 20) or not (not ai:IsInsideTarget(TARGET_FRI_0, AI_DIR_TYPE_F, 18.9) or friendDist > 15) or ai:IsInsideTarget(TARGET_FRI_0, AI_DIR_TYPE_F, 28.1) and friendDist <= 10 then + Act18Per = 100 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 150) and targetDist <= 3 then + Act02Per = 100 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 150) and targetDist <= 3 then + Act03Per = 100 + elseif 20 <= targetDist then + Act02Per = 5 + Act03Per = 5 + Act05Per = 0 + Act06Per = 15 + Act07Per = 15 + Act09Per = 0 + Act10Per = 10 + Act12Per = 20 + Act13Per = 15 + Act14Per = 15 + Act17Per = 0 + elseif 15 <= targetDist then + Act02Per = 10 + Act03Per = 10 + Act05Per = 0 + Act06Per = 15 + Act07Per = 15 + Act09Per = 0 + Act10Per = 10 + Act12Per = 10 + Act13Per = 10 + Act14Per = 20 + Act17Per = 0 + elseif 10 <= targetDist then + Act02Per = 15 + Act03Per = 15 + Act05Per = 0 + Act06Per = 10 + Act07Per = 10 + Act09Per = 15 + Act10Per = 15 + Act12Per = 10 + Act13Per = 10 + Act14Per = 10 + Act17Per = 0 + elseif 7 <= targetDist then + Act02Per = 5 + Act03Per = 5 + Act05Per = 0 + Act06Per = 0 + Act07Per = 0 + Act09Per = 25 + Act10Per = 20 + Act12Per = 0 + Act13Per = 5 + Act14Per = 5 + Act17Per = 0 + elseif 4 <= targetDist then + Act02Per = 20 + Act03Per = 20 + Act05Per = 0 + Act06Per = 0 + Act07Per = 0 + Act09Per = 0 + Act10Per = 0 + Act12Per = 0 + Act13Per = 5 + Act14Per = 5 + Act17Per = 10 + else + Act02Per = 33 + Act03Per = 33 + Act05Per = 0 + Act06Per = 0 + Act07Per = 0 + Act09Per = 0 + Act10Per = 0 + Act12Per = 0 + Act13Per = 0 + Act14Per = 0 + Act17Per = 34 + end + else + Act02Per = 100 + end + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per + Act16Per + Act17Per + Act18Per) + if fateAct <= Act01Per then + GoldenChimera347101_Act01(ai, goal) + elseif fateAct <= Act01Per + Act02Per then + GoldenChimera347101_Act02(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per then + GoldenChimera347101_Act03(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + GoldenChimera347101_Act04(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + GoldenChimera347101_Act05(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + GoldenChimera347101_Act06(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + GoldenChimera347101_Act07(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per then + GoldenChimera347101_Act08(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per then + GoldenChimera347101_Act09(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per then + GoldenChimera347101_Act10(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per then + GoldenChimera347101_Act11(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per then + GoldenChimera347101_Act12(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per then + GoldenChimera347101_Act13(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per + Act14Per then + GoldenChimera347101_Act14(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per then + GoldenChimera347101_Act15(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per + Act16Per then + GoldenChimera347101_Act16(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per + Act16Per + Act17Per then + GoldenChimera347101_Act17(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per + Act16Per + Act17Per + Act18Per then + GoldenChimera347101_Act18(ai, goal) + else + GoldenChimera347101_Act19(ai, goal) + end + return +end + +function GoldenChimera347101_Act01(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + ai:SetNumber(1, ai:GetNumber(1) + 50) + GoldenChimera347101_ActAfter_AdjustSpace(ai, goal) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function GoldenChimera347101_Act02(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max - 1 + local DashDist = Att3000_Dist_max + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + if fate2 <= 0 then + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3015, TARGET_ENE_0, DIST_Middle, 0) + ai:SetNumber(1, ai:GetNumber(1) + 10) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3015, TARGET_ENE_0, DIST_Middle, 0, 30, 0, 0) + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + ai:SetNumber(1, ai:GetNumber(1) + 20) + else + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3011, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + ai:SetNumber(1, ai:GetNumber(1) + 40) + end + end + GoldenChimera347101_ActAfter_AdjustSpace(ai, goal) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function GoldenChimera347101_Act03(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max - 1 + local DashDist = Att3000_Dist_max + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + if fate2 <= 0 then + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3016, TARGET_ENE_0, DIST_Middle, 0) + ai:SetNumber(1, ai:GetNumber(1) + 10) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3016, TARGET_ENE_0, DIST_Middle, 0, 30, 0, 0) + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3011, TARGET_ENE_0, DIST_Middle, 0) + ai:SetNumber(1, ai:GetNumber(1) + 20) + else + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3011, TARGET_ENE_0, DIST_Middle, 0) + ai:SetNumber(1, ai:GetNumber(1) + 40) + end + end + GoldenChimera347101_ActAfter_AdjustSpace(ai, goal) + return +end + +Att3000_Dist_min = Att3006_Dist_max +function GoldenChimera347101_Act05(ai, goal, paramTbl) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3006, TARGET_ENE_0, DIST_Middle, 0, 30, 0, 0) + ai:SetNumber(0, 1) + ai:SetNumber(1, ai:GetNumber(1) + 0) + ai:SetTimer(0, 30) + return +end + +function GoldenChimera347101_Act06(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3007, TARGET_ENE_0, DIST_None, 0, 0) + ai:SetNumber(1, ai:GetNumber(1) + 0) + GoldenChimera347101_ActAfter_AdjustSpace(ai, goal) + return +end + +function GoldenChimera347101_Act07(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3008, TARGET_ENE_0, DIST_None, 0, 0) + ai:SetNumber(1, ai:GetNumber(1) + 0) + GoldenChimera347101_ActAfter_AdjustSpace(ai, goal) + return +end + +function GoldenChimera347101_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local PARTS_IDX_TAIL = 0 + local tailDmgLv = ai:GetPartsDmg(PARTS_IDX_TAIL) + local fate = ai:GetRandam_Int(1, 100) + if tailDmgLv ~= PARTS_DMG_FINAL then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 90) and targetDist <= 5 and fate <= 33 then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + ai:SetNumber(1, ai:GetNumber(1) + 50) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 90) and targetDist <= 5 and fate <= 66 then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + ai:SetNumber(1, ai:GetNumber(1) + 50) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 30) and targetDist <= 3 then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3013, TARGET_ENE_0, DIST_Middle, 0) + ai:SetNumber(1, ai:GetNumber(1) + 50) + else + GoldenChimera347101_Act16(ai, goal) + end + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 30) and targetDist <= 2 and fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3024, TARGET_NONE, DIST_Middle, 0) + ai:SetNumber(1, ai:GetNumber(1) + 0) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 30) and targetDist <= 3 and fate <= 100 then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3013, TARGET_ENE_0, DIST_Middle, 0) + ai:SetNumber(1, ai:GetNumber(1) + 50) + else + GoldenChimera347101_Act16(ai, goal) + end + GoldenChimera347101_ActAfter_AdjustSpace(ai, goal) + return +end + +Att3000_Dist_min = Att3009_Dist_max +function GoldenChimera347101_Act09(ai, goal, paramTbl) + local AppDist = Att3009_Dist_max + local DashDist = Att3009_Dist_max + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_If, 10, 4) + return +end + +Att3000_Dist_min = Att3010_Dist_max +function GoldenChimera347101_Act10(ai, goal, paramTbl) + local AppDist = Att3010_Dist_max + local DashDist = Att3010_Dist_max + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_If, 10, 5) + return +end + +Att3000_Dist_min = Att3020_Dist_max +function GoldenChimera347101_Act12(ai, goal, paramTbl) + local AppDist = Att3020_Dist_max + local DashDist = Att3020_Dist_max + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_If, 10, 1) + return +end + +Att3000_Dist_min = Att3021_Dist_max +function GoldenChimera347101_Act13(ai, goal, paramTbl) + local AppDist = Att3021_Dist_max + local DashDist = Att3021_Dist_max + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_If, 10, 2) + return +end + +Att3000_Dist_min = Att3022_Dist_max +function GoldenChimera347101_Act14(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3022_Dist_max + local DashDist = Att3022_Dist_max + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_If, 10, 3) + return +end + +function GoldenChimera347101_Act15(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local GetWellSpace_Odds = 0 + if ai:HasSpecialEffectId(TARGET_ENE_0, 5521) then + if targetDist <= 8 then + if ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_F, 10, 1212000) then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3010, TARGET_ENE_0, DIST_Middle, 0, 0) + GetWellSpace_Odds = 100 + ai:SetNumber(1, ai:GetNumber(1) + 40) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3007, TARGET_ENE_0, DIST_Middle, 0, 0) + GetWellSpace_Odds = 100 + ai:SetNumber(1, ai:GetNumber(1) + 0) + end + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3007, TARGET_ENE_0, DIST_Middle, 0, 0) + GetWellSpace_Odds = 100 + ai:SetNumber(1, ai:GetNumber(1) + 0) + end + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 711, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + GetWellSpace_Odds = 0 + ai:SetNumber(1, ai:GetNumber(1) + 0) + end + ai:SetNumber(0, 0) + GoldenChimera347101_ActAfter_AdjustSpace(ai, goal) + return +end + +function GoldenChimera347101_Act16(ai, goal, paramTbl) + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 712, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 713, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 0) + end + ai:SetNumber(1, ai:GetNumber(1) + 0) + return +end + +Att3000_Dist_min = Att3014_Dist_max +function GoldenChimera347101_Act17(ai, goal, paramTbl) + local AppDist = Att3014_Dist_max + local DashDist = Att3014_Dist_max + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3014, TARGET_ENE_0, DIST_Middle, 0, 30, 0, 0) + ai:SetNumber(1, ai:GetNumber(1) + 20) + GoldenChimera347101_ActAfter_AdjustSpace(ai, goal) + return +end + +function GoldenChimera347101_Act18(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + if ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_F, 10, 1212000) then + if ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_L, 10, 1212000) then + if ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_R, 10, 1212000) then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 0) + end + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 0) + end + elseif ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_R, 10, 1212000) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 0) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 5, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, -1) + end + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 5, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, -1) + end + ai:SetNumber(1, ai:GetNumber(1) + 0) + return +end + +Att3000_Dist_min = Att3008_Dist_max +function GoldenChimera347101_Act19(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3008_Dist_max + local DashDist = Att3008_Dist_max + local Odds_Guard = 0 + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, POINT_INITIAL, 3, TARGET_SELF, false, -1) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3018, TARGET_ENE_0, DIST_None, 0, 0) + elseif fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3019, TARGET_ENE_0, DIST_None, 0, 0) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3017, TARGET_ENE_0, DIST_None, 0, 0) + end + ai:SetNumber(1, ai:GetNumber(1) + 0) + return +end + +function GoldenChimera347101_ActAfter_AdjustSpace(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_If, 10, 0) + return +end + +function GoldenChimera347101_ActAfter_RealTime(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + if 20 <= ai:GetNumber(2) then + local CanStepFR = 0 + local CanStepFL = 0 + local CanStepB = 0 + local CanStepR = 0 + local CanStepL = 0 + if ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_F, 20, 1212000) then + if ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_R, 10, 1212000) then + if ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_L, 10, 1212000) then + CanStepFR = 1 + CanStepFL = 1 + else + CanStepFR = 1 + end + elseif ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_L, 10, 1212000) then + CanStepFL = 1 + end + end + if ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_B, 25, 1212000) then + CanStepB = 1 + end + if ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_F, 10, 1212000) and ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_L, 10, 1212000) then + CanStepL = 1 + end + if ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_F, 10, 1212000) and ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_R, 10, 1212000) then + CanStepR = 1 + end + if CanStepFR == 1 then + if CanStepFL == 1 then + if CanStepB == 1 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 711, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + ai:SetNumber(3, 1) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 20) + GoldenChimera347101_SideWalk(ai, goal) + end + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 711, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + ai:SetNumber(3, 1) + end + elseif CanStepB == 1 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 711, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + ai:SetNumber(3, 1) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 20) + GoldenChimera347101_SideWalk(ai, goal) + end + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 711, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + ai:SetNumber(3, 1) + end + elseif CanStepFL == 1 then + if CanStepB == 1 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 711, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + ai:SetNumber(3, 1) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 20) + GoldenChimera347101_SideWalk(ai, goal) + end + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 711, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + ai:SetNumber(3, 1) + end + elseif CanStepB == 1 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 20) + GoldenChimera347101_SideWalk(ai, goal) + elseif CanStepL == 1 then + if CanStepR == 1 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 10) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 10) + end + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 10) + end + elseif CanStepR == 1 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 10) + end + ai:SetNumber(2, 0) + elseif 40 <= ai:GetNumber(1) then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 90) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 711, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 90) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 712, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 90) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 713, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + else + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 712, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 713, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + end + goal:AddSubGoal(GOAL_COMMON_SpinStep, 20, 711, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + end + GoldenChimera347101_SideWalk(ai, goal) + ai:SetNumber(1, 0) + ai:SetNumber(2, ai:GetNumber(2) + 10) + end + return +end + +function GoldenChimera347101_SideWalk(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + if ai:GetTeamOrder(ORDER_TYPE_Role) == ROLE_TYPE_Attack then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 5, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, -1) + end + elseif ai:GetTeamOrder(ORDER_TYPE_Role) == ROLE_TYPE_Torimaki then + if fate <= 100 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 7.5, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(45, 60), true, true, -1) + end + elseif ai:GetTeamOrder(ORDER_TYPE_Role) == ROLE_TYPE_Kankyaku and fate <= 100 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 10, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(60, 75), true, true, -1) + end + return +end + +function GoldenChimera347101_FlyingDecision01(ai, goal) + local GetWellSpace_Odds = 0 + if ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_F, 25, 1212000) then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3020, TARGET_ENE_0, DIST_None, 0, 0) + ai:SetNumber(1, ai:GetNumber(1) + 10) + GetWellSpace_Odds = 100 + else + goal:ClearSubGoal() + GetWellSpace_Odds = 0 + end + if GetWellSpace_Odds == 100 then + GoldenChimera347101_ActAfter_AdjustSpace(ai, goal) + end + return +end + +function GoldenChimera347101_FlyingDecision02(ai, goal) + local GetWellSpace_Odds = 0 + if ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_F, 25, 1212000) then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3021, TARGET_ENE_0, DIST_None, 0, 0) + ai:SetNumber(1, ai:GetNumber(1) + 10) + GetWellSpace_Odds = 100 + else + goal:ClearSubGoal() + GetWellSpace_Odds = 0 + end + if GetWellSpace_Odds == 100 then + GoldenChimera347101_ActAfter_AdjustSpace(ai, goal) + end + return +end + +function GoldenChimera347101_FlyingDecision03(ai, goal) + local GetWellSpace_Odds = 0 + local fate = ai:GetRandam_Int(1, 100) + if ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_F, 20, 1212000) then + if ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_R, 10, 1212000) then + if ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_L, 10, 1212000) then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3022, TARGET_ENE_0, DIST_None, 0, 0) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3023, TARGET_ENE_0, DIST_None, 0, 0) + end + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3022, TARGET_ENE_0, DIST_None, 0, 0) + end + ai:SetNumber(1, 0) + GetWellSpace_Odds = 100 + elseif ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_L, 10, 1212000) then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3023, TARGET_ENE_0, DIST_None, 0, 0) + ai:SetNumber(1, 0) + GetWellSpace_Odds = 100 + else + goal:ClearSubGoal() + GetWellSpace_Odds = 0 + end + else + goal:ClearSubGoal() + GetWellSpace_Odds = 0 + end + ai:SetNumber(3, 0) + if GetWellSpace_Odds == 100 then + GoldenChimera347101_ActAfter_AdjustSpace(ai, goal) + end + return +end + +function GoldenChimera347101_BackStepDecision01(ai, goal) + local GetWellSpace_Odds = 0 + if ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_B, 25, 1212000) then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3009, TARGET_ENE_0, DIST_Middle, 0, 0) + ai:SetNumber(1, 0) + GetWellSpace_Odds = 100 + else + goal:ClearSubGoal() + GetWellSpace_Odds = 0 + end + if GetWellSpace_Odds == 100 then + GoldenChimera347101_ActAfter_AdjustSpace(ai, goal) + end + return +end + +function GoldenChimera347100_ChargeDecision01(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + if ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_F, 15, 1212000) then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3010, TARGET_ENE_0, DIST_Middle, 0, 0) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 711, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + ai:SetNumber(1, 0) + GetWellSpace_Odds = 0 + else + ai:SetNumber(1, ai:GetNumber(1) + 20) + GetWellSpace_Odds = 100 + end + else + goal:ClearSubGoal() + GetWellSpace_Odds = 0 + end + return GetWellSpace_Odds +end + +function GoldenChimera347101Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function GoldenChimera347101Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3014_Dist_max +Att3000_Dist_min = Att3010_Dist_max +Att3000_Dist_min = Att3020_Dist_max +function GoldenChimera347101Battle_Interupt(ai, goal) + if ai:GetNumber(0) == 0 then + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest(1) + if ai:IsInterupt(INTERUPT_GuardBreak) then + if fate <= 50 then + if targetDist <= 2 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 60) then + local AppDist = Att3014_Dist_max + local DashDist = 0 + local Odds_Guard = 0 + goal:ClearSubGoal() + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 1, 3014, TARGET_ENE_0, DIST_None, 0) + return true + elseif targetDist <= 8 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 90) then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 1, 3010, TARGET_ENE_0, DIST_None, 0) + return true + else + return false + end + else + return false + end + elseif ai:IsInterupt(INTERUPT_UseItem) then + if fate <= 50 then + if targetDist <= 2 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 60) then + local AppDist = Att3014_Dist_max + local DashDist = 0 + local Odds_Guard = 0 + goal:ClearSubGoal() + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 1, 3014, TARGET_ENE_0, DIST_None, 0) + return true + elseif targetDist <= 8 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 90) then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 1, 3010, TARGET_ENE_0, DIST_None, 0) + return true + elseif targetDist <= 13 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 120) then + goal:ClearSubGoal() + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 1, 3007, TARGET_ENE_0, DIST_None, 0) + else + local AppDist = Att3010_Dist_max + local DashDist = Att3010_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 1, 3010, TARGET_ENE_0, DIST_None, 0) + end + return true + else + return false + end + else + return false + end + elseif ai:IsInterupt(INTERUPT_Shoot) then + if eventNo == 10 then + goal:ClearSubGoal() + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 712, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 10) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 713, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 10) + end + end + if fate <= 80 then + if targetDist <= 8 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 90) then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 1, 3010, TARGET_ENE_0, DIST_None, 0) + return true + elseif targetDist <= 13 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 120) then + goal:ClearSubGoal() + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 1, 3007, TARGET_ENE_0, DIST_None, 0) + elseif fate2 <= 75 then + local AppDist = Att3010_Dist_max + local DashDist = Att3010_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 1, 3010, TARGET_ENE_0, DIST_None, 0) + else + goal:ClearSubGoal() + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 1, 712, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 10) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 1, 713, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 10) + end + end + return true + elseif targetDist <= 20 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 150) then + goal:ClearSubGoal() + if fate2 <= 50 then + local AppDist = Att3020_Dist_max + local DashDist = 0 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 3, 3020, TARGET_ENE_0, DIST_None, 0) + elseif fate2 <= 75 then + local AppDist = Att3010_Dist_max + local DashDist = 0 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 3, 3010, TARGET_ENE_0, DIST_None, 0) + elseif fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 1, 712, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 10) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 1, 713, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 10) + end + return true + else + return false + end + else + return false + end + elseif ai:HasSpecialEffectId(TARGET_SELF, 5522) then + goal:ClearSubGoal() + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 180) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 711, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 712, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 713, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + end + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/348000_battle.lua b/scripts_decompiled/348000_battle.lua new file mode 100644 index 0000000..8c43c75 --- /dev/null +++ b/scripts_decompiled/348000_battle.lua @@ -0,0 +1,64 @@ +REGISTER_GOAL(GOAL_Taiyoutyuu347000_Battle, "Taiyoutyuu347000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 30 +REGISTER_GOAL_NO_UPDATE(GOAL_Taiyoutyuu347000_Battle, 1) +function Taiyoutyuu347000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest() + local fate = ai:GetRandam_Int(1, 4) + if 10 <= targetDist then + if ai:IsFinishTimer(0) == true then + ai:SetTimer(0, fate) + actPerArr[1] = 0 + actPerArr[2] = 100 + else + actPerArr[1] = 100 + actPerArr[2] = 0 + end + elseif ai:IsFinishTimer(0) == true then + ai:SetTimer(0, fate) + actPerArr[1] = 0 + actPerArr[2] = 100 + else + actPerArr[1] = 100 + actPerArr[2] = 0 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Taiyoutyuu347000_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Taiyoutyuu347000_Act02) + local local0 = {0, 100, 0, 0, 0, 0} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +function Taiyoutyuu347000_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 1, TARGET_ENE_0, 100, TARGET_SELF, false, -1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Taiyoutyuu347000_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3000, TARGET_ENE_0, 0, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Taiyoutyuu347000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Taiyoutyuu347000Battle_Terminate(ai, goal) + return +end + +function Taiyoutyuu347000Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/349000_battle.lua b/scripts_decompiled/349000_battle.lua new file mode 100644 index 0000000..d491505 --- /dev/null +++ b/scripts_decompiled/349000_battle.lua @@ -0,0 +1,84 @@ +REGISTER_GOAL(GOAL_DriftItemGood349000_Battle, "DriftItemGood349000Battle") +REGISTER_GOAL_NO_UPDATE(GOAL_DriftItemGood349000_Battle, 1) +function DriftItemGood349000Battle_Activate(ai, goal) + local RUNAWAY_LIFETIME = 6 + if 0 == ai:GetNumber(0) then + goal:AddSubGoal(GOAL_DriftItemGood349000_Runaway, RUNAWAY_LIFETIME) + end + goal:AddSubGoal(GOAL_DriftItemGood349000_Hide, 10) + return +end + +function DriftItemGood349000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function DriftItemGood349000Battle_Terminate(ai, goal) + return +end + +function DriftItemGood349000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local jumptimer = ai:GetRandam_Int(4, 8) + if not not ai:IsInterupt(INTERUPT_Damaged) or ai:IsInterupt(INTERUPT_Damaged_Stranger) then + ai:Replaning() + ai:SetNumber(0, 0) + end + if ai:IsFinishTimer(2) == true and fate <= 30 then + goal:ClearSubGoal() + ai:SetTimer(2, jumptimer) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3000, TARGET_SELF, DIST_NONE, 0) + return true + else + return false + end +end + +REGISTER_GOAL(GOAL_DriftItemGood349000_Runaway, "DriftItemGood349000Runaway") +REGISTER_GOAL_NO_INTERUPT(GOAL_DriftItemGood349000_Runaway, true) +function DriftItemGood349000Runaway_Activate(ai, goal) + local life_time = goal:GetLife() + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, life_time, TARGET_ENE_0, 100, TARGET_SELF, false, -1) + return +end + +function DriftItemGood349000Runaway_Update(ai, goal) + if goal:GetLastSubGoalResult() == GOAL_RESULT_Failed then + return GOAL_RESULT_Success + else + return GOAL_RESULT_Continue + end +end + +function DriftItemGood349000Runaway_Terminate(ai, goal) + return +end + +function DriftItemGood349000Runaway_Interupt(ai, goal) + return false +end + +REGISTER_GOAL(GOAL_DriftItemGood349000_Hide, "DriftItemGood349000Hide") +REGISTER_GOAL_NO_UPDATE(GOAL_DriftItemGood349000_Hide, true) +REGISTER_GOAL_NO_INTERUPT(GOAL_DriftItemGood349000_Hide, true) +function DriftItemGood349000Hide_Activate(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3001, TARGET_ENE_0, DIST_None, 0) + local life_time = goal:GetLife() + goal:AddSubGoal(GOAL_COMMON_Wait, life_time, TARGET_ENE_0) + ai:SetNumber(0, 1) + return +end + +function DriftItemGood349000Hide_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function DriftItemGood349000Hide_Terminate(ai, goal) + return +end + +function DriftItemGood349000Hide_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/349100_battle.lua b/scripts_decompiled/349100_battle.lua new file mode 100644 index 0000000..abf406d --- /dev/null +++ b/scripts_decompiled/349100_battle.lua @@ -0,0 +1,125 @@ +REGISTER_GOAL(GOAL_DriftItemEvil349100_Battle, "DriftItemEvil349100Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 0.9 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 1 +local Att3003_Dist_min = 6 +local Att3003_Dist_max = 14 +REGISTER_GOAL_NO_UPDATE(GOAL_DriftItemEvil349100_Battle, 1) +function DriftItemEvil349100Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if 10 <= targetDist then + actPerArr[2] = 5 + actPerArr[3] = 5 + actPerArr[4] = 90 + elseif 6 <= targetDist then + actPerArr[2] = 20 + actPerArr[3] = 20 + actPerArr[4] = 60 + else + actPerArr[2] = 55 + actPerArr[3] = 45 + actPerArr[4] = 0 + end + actFuncArr[2] = REGIST_FUNC(ai, goal, DriftItemEvil349100_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, DriftItemEvil349100_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, DriftItemEvil349100_Act04) + local local0 = {0, 70, 10, 10, 10, 0} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function DriftItemEvil349100_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local jumptimer = ai:GetRandam_Int(20, 30) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + if ai:IsFinishTimer(0) == true then + if 10 <= targetDist then + ai:SetTimer(0, jumptimer) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, 10, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3004, TARGET_SELF, DIST_NONE, 0) + elseif 7 <= targetDist then + ai:SetTimer(0, jumptimer) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, 7, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3004, TARGET_SELF, DIST_NONE, 0) + elseif 3.8 <= targetDist then + ai:SetTimer(0, jumptimer) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, 3.8, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3004, TARGET_SELF, DIST_NONE, 0) + end + end + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3002_Dist_max +function DriftItemEvil349100_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local jumptimer = ai:GetRandam_Int(20, 30) + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 0 + if ai:IsFinishTimer(0) == true then + if 10 <= targetDist then + ai:SetTimer(0, jumptimer) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, 10, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3004, TARGET_SELF, DIST_NONE, 0) + elseif 7 <= targetDist then + ai:SetTimer(0, jumptimer) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, 7, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3004, TARGET_SELF, DIST_NONE, 0) + elseif 3.8 <= targetDist then + ai:SetTimer(0, jumptimer) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, 3.8, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3004, TARGET_SELF, DIST_NONE, 0) + end + end + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3002, TARGET_ENE_0, DIST_Middle) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3003_Dist_max +function DriftItemEvil349100_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3003, TARGET_ENE_0, DIST_Middle, -1, 40) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function DriftItemEvil349100Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function DriftItemEvil349100Battle_Terminate(ai, goal) + return +end + +function DriftItemEvil349100Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/350000_battle.lua b/scripts_decompiled/350000_battle.lua new file mode 100644 index 0000000..d9515be --- /dev/null +++ b/scripts_decompiled/350000_battle.lua @@ -0,0 +1,141 @@ +REGISTER_GOAL(GOAL_Bigjelly350000_Battle, "Bigjelly350000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 4.5 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 12 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 5 +local Att3004_Dist_min = 4 +local Att3004_Dist_max = 8 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 100 +REGISTER_GOAL_NO_UPDATE(GOAL_Bigjelly350000_Battle, 1) +Att3000_Dist_min = Att3002_Dist_max +Att3000_Dist_min = Att3000_Dist_max +function Bigjelly350000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local activeBreathChr = ai:GetEventRequest(0) + local Wisp_Odds = 1 + if ai:IsFinishTimer(0) == false then + Wisp_Odds = 0 + elseif activeBreathChr == 0 then + Wisp_Odds = 5 + elseif activeBreathChr == 1 then + Wisp_Odds = 1.5 + elseif activeBreathChr == 2 then + Wisp_Odds = 0.8 + elseif activeBreathChr == 3 then + Wisp_Odds = 0.4 + elseif activeBreathChr == 4 then + Wisp_Odds = 0.2 + elseif activeBreathChr == 5 then + Wisp_Odds = 0.1 + elseif activeBreathChr == 6 then + Wisp_Odds = 0 + else + Wisp_Odds = 5 + end + if 12 <= targetDist then + actPerArr[1] = 50 + actPerArr[2] = 0 + actPerArr[4] = 0 + actPerArr[5] = 30 + actPerArr[6] = 20 * Wisp_Odds + elseif 8 <= targetDist then + actPerArr[1] = 25 + actPerArr[2] = 0 + actPerArr[4] = 5 + actPerArr[5] = 50 + actPerArr[6] = 20 * Wisp_Odds + elseif 4 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 20 + actPerArr[4] = 40 + actPerArr[5] = 0 + actPerArr[6] = 20 * Wisp_Odds + else + actPerArr[1] = 5 + actPerArr[2] = 45 + actPerArr[4] = 30 + actPerArr[5] = 0 + actPerArr[6] = 20 * Wisp_Odds + end + local local0 = {Att3002_Dist_max, 0, 3002, DIST_Middle} + defFuncParamTbl[1] = local0 + local0 = {} + local local1, local2, local3, local4 = nil + local0[1] = Att3000_Dist_max + local0[2] = 0 + local0[3] = 10 + local0[4] = 90 + local0[5] = local1 + local0[6] = local2 + local0[7] = local3 + local0[8] = local4 + defFuncParamTbl[2] = local0 + actFuncArr[4] = REGIST_FUNC(ai, goal, Bigjelly350000_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, Bigjelly350000_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, Bigjelly350000_Act06) + local0 = {0, 90, 0, 5, 5, 0} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3003_Dist_max +function Bigjelly350000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3003 + local AttDist = DIST_None + local TurnTime = 1.5 + local TurnFaceAngle = 20 + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist, TurnTime, TurnFaceAngle) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3004_Dist_max +function Bigjelly350000_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3004 + local AttDist = DIST_None + local TurnTime = 1.5 + local TurnFaceAngle = 20 + Approach_and_Attack_Act(ai, goal, AppDist, DashDist, Odds_Guard, AttID, AttDist, TurnTime, TurnFaceAngle) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Bigjelly350000_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_SELF, DIST_None, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Bigjelly350000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Bigjelly350000Battle_Terminate(ai, goal) + return +end + +function Bigjelly350000Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/350100_battle.lua b/scripts_decompiled/350100_battle.lua new file mode 100644 index 0000000..e352968 --- /dev/null +++ b/scripts_decompiled/350100_battle.lua @@ -0,0 +1,35 @@ +REGISTER_GOAL(GOAL_Wisp350100_Battle, "Wisp350100Battle") +REGISTER_GOAL_NO_UPDATE(GOAL_Wisp350100_Battle, 1) +function Wisp350100Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if goal:GetNumber(0) == 1 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_SELF, DIST_None, 0) + elseif 20 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 1), 0, 0, 0, 0) + elseif 6 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 1, TARGET_ENE_0, 5.5, TARGET_SELF, true, -1) + elseif 3.5 <= targetDist then + goal:SetNumber(0, 1) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 1, TARGET_ENE_0, 3.4, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_SELF, DIST_None, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_SELF, DIST_None, 0) + end + return +end + +function Wisp350100Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Wisp350100Battle_Terminate(ai, goal) + return +end + +function Wisp350100Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/351000_battle.lua b/scripts_decompiled/351000_battle.lua new file mode 100644 index 0000000..f879c42 --- /dev/null +++ b/scripts_decompiled/351000_battle.lua @@ -0,0 +1,33 @@ +REGISTER_GOAL(GOAL_BigCrow351000_Battle, "BigCrow351000Battle") +REGISTER_GOAL_NO_UPDATE(GOAL_BigCrow351000_Battle, 1) +function BigCrow351000Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if fate <= 33 then + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Int(30, 100), TARGET_NONE, 0, 0, 0) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3000, TARGET_SELF, DIST_None) + elseif fate <= 66 then + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Int(30, 100), TARGET_NONE, 0, 0, 0) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3001, TARGET_SELF, DIST_None) + else + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Int(30, 100), TARGET_NONE, 0, 0, 0) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3002, TARGET_SELF, DIST_None) + end + return +end + +function BigCrow351000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function BigCrow351000Battle_Terminate(ai, goal) + return +end + +function BigCrow351000Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/352000_battle.lua b/scripts_decompiled/352000_battle.lua new file mode 100644 index 0000000..acf87ea --- /dev/null +++ b/scripts_decompiled/352000_battle.lua @@ -0,0 +1,147 @@ +REGISTER_GOAL(GOAL_wyvern352000_Battle, "wyvern352000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 10 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 4 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 12 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 16 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 12 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 16 +REGISTER_GOAL_NO_UPDATE(GOAL_wyvern352000_Battle, 1) +function wyvern352000Battle_Activate(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + local fate5 = ai:GetRandam_Int(1, 100) + local GetWellSpace_Odds = 0 + local targetDist = ai:GetDist(TARGET_ENE_0) + local targetdistXZ = ai:GetDistXZ(TARGET_ENE_0) + local targetdistYSigned = ai:GetDistYSigned(TARGET_ENE_0) + local targetdistY = ai:GetDistY(TARGET_ENE_0) + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act08Per = 0 + local Act09Per = 0 + local AttFlag = 0 + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1512700) then + AttFlag = 1 + end + local HeightFlag = 0 + if targetdistYSigned <= -4 and -7 <= targetdistYSigned then + HeightFlag = 1 + end + local DiveAttFlag = 0 + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1512701) and ai:IsInsideTargetRegion(TARGET_SELF, 1512701) then + DiveAttFlag = 1 + end + if AttFlag == 0 then + Act09Per = 100 + elseif HeightFlag == 0 then + Act08Per = 100 + elseif targetdistY * 2 <= targetdistXZ then + Act01Per = 0 + Act02Per = 5 + Act03Per = 25 + Act04Per = 70 + Act07Per = 0 + elseif targetdistY <= targetdistXZ then + Act01Per = 5 + Act02Per = 20 + Act03Per = 75 + Act04Per = 0 + Act07Per = 0 + elseif targetdistY * 0.5 <= targetdistXZ then + Act01Per = 15 + Act02Per = 75 + Act03Per = 0 + Act04Per = 0 + Act07Per = 10 + else + Act01Per = 65 + Act02Per = 5 + Act03Per = 0 + Act04Per = 0 + Act07Per = 30 + end + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per) + if fateAct <= Act01Per then + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, 10, TARGET_ENE_0, AI_DIR_TYPE_Top, 2, TARGET_SELF, true, 5) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Far, -1, -1) + GetWellSpace_Odds = 90 + elseif fateAct <= Act01Per + Act02Per then + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, 10, TARGET_ENE_0, AI_DIR_TYPE_Top, 3, TARGET_SELF, true, 5) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3001, TARGET_ENE_0, DIST_Far, -1, -1) + GetWellSpace_Odds = 80 + elseif fateAct <= Act01Per + Act02Per + Act03Per then + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, 10, TARGET_ENE_0, AI_DIR_TYPE_Top, 6.5, TARGET_SELF, true, 5) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, DIST_Far, -1, -1) + GetWellSpace_Odds = 60 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, 10, TARGET_ENE_0, AI_DIR_TYPE_Top, 12, TARGET_SELF, true, 5) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3003, TARGET_ENE_0, DIST_Far, -1, -1) + GetWellSpace_Odds = 40 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, 10, TARGET_ENE_0, AI_DIR_TYPE_Top, 10, TARGET_SELF, true, 8) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3004, TARGET_ENE_0, DIST_Far, -1, -1) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, 10, TARGET_ENE_0, AI_DIR_TYPE_Top, 10, TARGET_SELF, true, 8) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3005, TARGET_ENE_0, DIST_Far, -1, -1) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, 5, POINT_MOVE_POINT, AI_DIR_TYPE_CENTER, 3, TARGET_SELF, true) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per then + goal:AddSubGoal(GOAL_COMMON_KeepDistYAxis, 10, TARGET_ENE_0, 4, 7, TARGET_ENE_0) + GetWellSpace_Odds = 0 + else + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, 10, POINT_MOVE_POINT, AI_DIR_TYPE_CENTER, 3, TARGET_SELF, true) + GetWellSpace_Odds = 0 + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + wyvern352000_ActAfter_AdjustSpace(ai, goal) + end + return +end + +function wyvern352000_ActAfter_AdjustSpace(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if fate > 0 then + if fate2 <= 20 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, 0, -1, 0) + elseif fate2 <= 60 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 702, TARGET_ENE_0, 0, -1, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 703, TARGET_ENE_0, 0, -1, 0) + end + end + return +end + +function wyvern352000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function wyvern352000Battle_Terminate(ai, goal) + return +end + +function wyvern352000Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/352002_battle.lua b/scripts_decompiled/352002_battle.lua new file mode 100644 index 0000000..88fd10f --- /dev/null +++ b/scripts_decompiled/352002_battle.lua @@ -0,0 +1,233 @@ +REGISTER_GOAL(GOAL_wyvern_on_earth352002_Battle, "wyvern_on_earth352002Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 2.3 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 2.5 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 4.3 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 8 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 8 +local Att3005_Dist_min = 0.5 +local Att3005_Dist_max = 7.3 +local Att3006_Dist_min = 4.5 +local Att3006_Dist_max = 13 +REGISTER_GOAL_NO_UPDATE(GOAL_wyvern_on_earth352002_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3001_Dist_max +Att3000_Dist_min = Att3003_Dist_max +Att3000_Dist_min = Att3004_Dist_max +function wyvern_on_earth352002Battle_Activate(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + local fate5 = ai:GetRandam_Int(1, 100) + local GetWellSpace_Odds = 0 + local targetDist = ai:GetDist(TARGET_ENE_0) + ai:AddObserveRegion(0, TARGET_ENE_0, 1602801) + ai:AddObserveRegion(1, TARGET_ENE_0, 1602802) + ai:AddObserveRegion(2, TARGET_ENE_0, 1602803) + ai:AddObserveRegion(3, TARGET_ENE_0, 1602804) + ai:AddObserveRegion(4, TARGET_ENE_0, 1602805) + ai:AddObserveRegion(5, TARGET_ENE_0, 1602806) + ai:AddObserveRegion(6, TARGET_ENE_0, 1602807) + ai:AddObserveRegion(7, TARGET_ENE_0, 1602808) + ai:AddObserveRegion(8, TARGET_ENE_0, 1602809) + ai:AddObserveRegion(9, TARGET_ENE_0, 1602810) + ai:AddObserveRegion(10, TARGET_ENE_0, 1602811) + ai:AddObserveRegion(11, TARGET_ENE_0, 1602812) + ai:AddObserveRegion(12, TARGET_ENE_0, 1602813) + ai:AddObserveRegion(13, TARGET_ENE_0, 1602814) + ai:AddObserveRegion(14, TARGET_ENE_0, 1602815) + ai:AddObserveRegion(15, TARGET_ENE_0, 1602816) + ai:AddObserveRegion(16, TARGET_ENE_0, 1602735) + local canAct12 = 0 + local canAct08 = 0 + local canAct11 = 0 + local canAct07 = 0 + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_F, 17.5) then + canAct12 = 1 + end + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_F, 12.8) then + canAct08 = 1 + end + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_F, 12.5) then + canAct11 = 1 + end + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_B, 11.6) then + canAct07 = 1 + end + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act08Per = 0 + local Act09Per = 0 + local Act10Per = 0 + local Act11Per = 0 + local Act12Per = 0 + local Act13Per = 0 + local Act14Per = 0 + ai:SetEventMoveTarget(1602735) + local Sumade = ai:GetDistAtoB(POINT_EVENT, TARGET_SELF) + if 8.5 <= targetDist and targetDist <= 14.5 and canAct12 == 1 then + Act12Per = 150 + end + if 4 <= targetDist and targetDist <= 8.2 and canAct08 == 1 then + Act08Per = 150 + end + if 4 <= targetDist and targetDist <= 8.2 and (not (not ai:IsInsideTargetRegion(TARGET_SELF, 1602808) or not ai:IsInsideTargetRegion(TARGET_ENE_0, 1602808)) or not (not ai:IsInsideTargetRegion(TARGET_SELF, 1602808) or not ai:IsInsideTargetRegion(TARGET_ENE_0, 1602809)) or not (not ai:IsInsideTargetRegion(TARGET_SELF, 1602808) or not ai:IsInsideTargetRegion(TARGET_ENE_0, 1602810)) or not (not ai:IsInsideTargetRegion(TARGET_SELF, 1602810) or not ai:IsInsideTargetRegion(TARGET_ENE_0, 1602808)) or not (not ai:IsInsideTargetRegion(TARGET_SELF, 1602810) or not ai:IsInsideTargetRegion(TARGET_ENE_0, 1602810)) or not (not ai:IsInsideTargetRegion(TARGET_SELF, 1602810) or not ai:IsInsideTargetRegion(TARGET_ENE_0, 1602812)) or ai:IsInsideTargetRegion(TARGET_SELF, 1602810) and ai:IsInsideTargetRegion(TARGET_ENE_0, 1602814)) then + Act06Per = 150 + end + if 0 <= targetDist and targetDist <= 10 and (not (not ai:IsInsideTargetRegion(TARGET_SELF, 1602808) or not ai:IsInsideTargetRegion(TARGET_ENE_0, 1602810)) or not (not ai:IsInsideTargetRegion(TARGET_SELF, 1602808) or not ai:IsInsideTargetRegion(TARGET_ENE_0, 1602815)) or ai:IsInsideTargetRegion(TARGET_SELF, 1602815) and ai:IsInsideTargetRegion(TARGET_ENE_0, 1602808)) then + Act10Per = 150 + end + if 0 <= targetDist and targetDist <= 6 and canAct11 == 1 then + Act11Per = 150 + end + if 0 <= targetDist and targetDist <= 1.5 and (not not ai:IsInsideTargetRegion(TARGET_SELF, 1602811) or not not ai:IsInsideTargetRegion(TARGET_SELF, 1602812) or not not ai:IsInsideTargetRegion(TARGET_SELF, 1602808) or ai:IsInsideTargetRegion(TARGET_SELF, 1602810)) then + Act09Per = 150 + end + if 0 <= targetDist and targetDist <= 1.5 and canAct07 == 1 then + Act07Per = 150 + end + if 6 <= targetDist then + Act04Per = 50 + Act05Per = 50 + Act01Per = 0 + elseif 2.5 <= targetDist then + if ai:IsFinishTimer(0) == true then + Act14Per = 10 + end + Act04Per = 20 + Act05Per = 40 + Act01Per = 40 + else + if ai:IsFinishTimer(0) == true then + Act14Per = 40 + end + Act04Per = 10 + Act05Per = 15 + Act01Per = 45 + end + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per + Act14Per) + if fateAct <= Act01Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3001_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, TARGET_ENE_0, Att3003_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, TARGET_ENE_0, Att3004_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + wyvern_on_earth352002_Turn(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3008, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per then + wyvern_on_earth352002_Turn(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3010, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3011, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per then + if 2 <= Sumade then + ai:SetEventMoveTarget(1602736) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, POINT_EVENT, 3, TARGET_SELF, True, -1) + end + goal:AddSubGoal(GOAL_COMMON_If, 10, 0) + GetWellSpace_Odds = 0 + else + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 0, 701, TARGET_NONE, -1, AI_DIR_TYPE_B, 4.2) + elseif fate3 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 0, 702, TARGET_NONE, -1, AI_DIR_TYPE_L, 4.2) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 0, 703, TARGET_NONE, -1, AI_DIR_TYPE_R, 4.2) + end + ai:SetTimer(0, 5) + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + wyvern_on_earth352002_ActAfter_AdjustSpace(ai, goal) + end + return +end + +function wyvern_on_earth352002_Turn(ai, goal) + ai:SetEventMoveTarget(1602817) + local Dist_Self_1602817 = ai:GetDistAtoB(POINT_EVENT, TARGET_SELF) + local Dist_ENE_1602817 = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + if Dist_ENE_1602817 <= Dist_Self_1602817 then + ai:SetEventMoveTarget(1602817) + goal:AddSubGoal(GOAL_COMMON_Turn, 10, POINT_EVENT, 2, 0, 0) + else + ai:SetEventMoveTarget(1602818) + goal:AddSubGoal(GOAL_COMMON_Turn, 10, POINT_EVENT, 2, 0, 0) + end + return +end + +function wyvern_on_earth352002_ActAfter_AdjustSpace(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + return +end + +function OnIf_352002(ai, goal, codeNo) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if codeNo == 0 then + goal:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_SELF) + goal:AddSubGoal(GOAL_COMMON_Turn, 2, TARGET_ENE_0, 0, 0, 0) + GetWellSpace_Odds = 0 + end + return +end + +function wyvern_on_earth352002Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function wyvern_on_earth352002Battle_Terminate(ai, goal) + return +end + +function wyvern_on_earth352002Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + return false +end + +return diff --git a/scripts_decompiled/352003_battle.lua b/scripts_decompiled/352003_battle.lua new file mode 100644 index 0000000..98f1b33 --- /dev/null +++ b/scripts_decompiled/352003_battle.lua @@ -0,0 +1,209 @@ +REGISTER_GOAL(GOAL_wyvern_on_earth352003_Battle, "wyvern_on_earth352003Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 2.3 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 2.5 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 4.3 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 8 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 8 +local Att3005_Dist_min = 0.5 +local Att3005_Dist_max = 7.3 +local Att3006_Dist_min = 4.5 +local Att3006_Dist_max = 13 +REGISTER_GOAL_NO_UPDATE(GOAL_wyvern_on_earth352003_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3001_Dist_max +Att3000_Dist_min = Att3003_Dist_max +Att3000_Dist_min = Att3004_Dist_max +function wyvern_on_earth352003Battle_Activate(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + local fate5 = ai:GetRandam_Int(1, 100) + local GetWellSpace_Odds = 0 + local targetDist = ai:GetDist(TARGET_ENE_0) + local canAct12 = 0 + local canAct08 = 0 + local canAct11 = 0 + local canAct07 = 0 + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_F, 17.5) then + canAct12 = 1 + end + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_F, 12.8) then + canAct08 = 1 + end + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_F, 12.5) then + canAct11 = 1 + end + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_B, 11.6) then + canAct07 = 1 + end + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act08Per = 0 + local Act09Per = 0 + local Act10Per = 0 + local Act11Per = 0 + local Act12Per = 0 + local Act13Per = 0 + local Act14Per = 0 + if 8.5 <= targetDist and targetDist <= 14.5 and canAct12 == 1 then + Act12Per = 150 + end + if 4 <= targetDist and targetDist <= 8.2 and canAct08 == 1 then + Act08Per = 150 + end + if 0 <= targetDist and targetDist <= 6 and canAct11 == 1 then + Act11Per = 150 + end + if 0 <= targetDist and targetDist <= 1.5 and canAct07 == 1 then + Act07Per = 150 + end + if 6 <= targetDist then + Act04Per = 50 + Act05Per = 50 + Act01Per = 0 + elseif 2.5 <= targetDist then + if ai:IsFinishTimer(0) == true then + Act14Per = 10 + end + Act04Per = 20 + Act05Per = 40 + Act01Per = 40 + else + if ai:IsFinishTimer(0) == true then + Act14Per = 40 + end + Act04Per = 10 + Act05Per = 15 + Act01Per = 45 + end + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per + Act14Per) + if fateAct <= Act01Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3001_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, TARGET_ENE_0, Att3003_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, TARGET_ENE_0, Att3004_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + wyvern_on_earth352003_Turn(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + wyvern_on_earth352003_Turn(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per then + wyvern_on_earth352003_Turn(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3008, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per then + wyvern_on_earth352003_Turn(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per then + wyvern_on_earth352003_Turn(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3010, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per then + wyvern_on_earth352003_Turn(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3011, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per then + if 2 <= Sumade then + ai:SetEventMoveTarget(1602736) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, POINT_EVENT, 3, TARGET_SELF, True, -1) + end + goal:AddSubGoal(GOAL_COMMON_If, 10, 0) + GetWellSpace_Odds = 0 + else + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 0, 701, TARGET_NONE, -1, AI_DIR_TYPE_B, 4.2) + elseif fate3 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 0, 702, TARGET_NONE, -1, AI_DIR_TYPE_L, 4.2) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 0, 703, TARGET_NONE, -1, AI_DIR_TYPE_R, 4.2) + end + ai:SetTimer(0, 5) + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + wyvern_on_earth352003_ActAfter_AdjustSpace(ai, goal) + end + return +end + +function wyvern_on_earth352003_Turn(ai, goal) + ai:SetEventMoveTarget(1602817) + local Dist_Self_1602817 = ai:GetDistAtoB(POINT_EVENT, TARGET_SELF) + local Dist_ENE_1602817 = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + if Dist_ENE_1602817 <= Dist_Self_1602817 then + ai:SetEventMoveTarget(1602817) + goal:AddSubGoal(GOAL_COMMON_Turn, 10, POINT_EVENT, 2, 0, 0) + else + ai:SetEventMoveTarget(1602818) + goal:AddSubGoal(GOAL_COMMON_Turn, 10, POINT_EVENT, 2, 0, 0) + end + return +end + +function wyvern_on_earth352003_ActAfter_AdjustSpace(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + return +end + +function OnIf_352003(ai, goal, codeNo) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if codeNo == 0 then + goal:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_SELF) + goal:AddSubGoal(GOAL_COMMON_Turn, 2, TARGET_ENE_0, 0, 0, 0) + GetWellSpace_Odds = 0 + end + return +end + +function wyvern_on_earth352003Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function wyvern_on_earth352003Battle_Terminate(ai, goal) + return +end + +function wyvern_on_earth352003Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + return false +end + +return diff --git a/scripts_decompiled/352005_battle.lua b/scripts_decompiled/352005_battle.lua new file mode 100644 index 0000000..3eae6cd --- /dev/null +++ b/scripts_decompiled/352005_battle.lua @@ -0,0 +1,79 @@ +REGISTER_GOAL(GOAL_wyvern352005_Battle, "wyvern352005Battle") +REGISTER_GOAL_NO_UPDATE(GOAL_wyvern352005_Battle, 1) +function OnIf_352005(ai, goal, codeNo) + local targetDist = ai:GetDist(TARGET_ENE_0) + local targetDistY = ai:GetDistYSigned(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if codeNo == 0 then + local NearestPoint = Find_Nearest_Point(ai, goal) + ai:SetEventMoveTarget(NearestPoint) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, POINT_EVENT, 5, TARGET_SELF, false, -1) + end + return +end + +function wyvern352005Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, 10, TARGET_ENE_0, AI_DIR_TYPE_Top, 23, TARGET_SELF, false, 17) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_None, 0, 180) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3001, TARGET_ENE_0, DIST_None, 0, 180) + end + goal:AddSubGoal(GOAL_COMMON_If, 10, 0) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3005, TARGET_ENE_0, DIST_None, 0, 180) + return +end + +function Find_Nearest_Point(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local idParam = ai:GetNpcThinkParamID() + if idParam == 352005 then + ai:SetEventMoveTarget(1602720) + local A = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + ai:SetEventMoveTarget(1602721) + local B = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + ai:SetEventMoveTarget(1602722) + local C = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + local minDist = math.min(A, B, C) + if minDist == A then + NearPoint = 1602720 + elseif minDist == B then + NearPoint = 1602721 + elseif minDist == C then + NearPoint = 1602722 + end + else + ai:SetEventMoveTarget(1602730) + local A = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + ai:SetEventMoveTarget(1602731) + local B = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + ai:SetEventMoveTarget(1602732) + local C = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + local minDist = math.min(A, B, C) + if minDist == A then + NearPoint = 1602730 + elseif minDist == B then + NearPoint = 1602731 + elseif minDist == C then + NearPoint = 1602732 + end + end + return NearPoint +end + +function wyvern352005Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function wyvern352005Battle_Terminate(ai, goal) + return +end + +function wyvern352005Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/353000_battle.lua b/scripts_decompiled/353000_battle.lua new file mode 100644 index 0000000..141d00a --- /dev/null +++ b/scripts_decompiled/353000_battle.lua @@ -0,0 +1,282 @@ +REGISTER_GOAL(GOAL_LakeBeast353000_Battle, "LakeBeast353000Battle") +local Att3000_Dist_min = 29.5 +local Att3000_Dist_max = 41 +local Att3001_Dist_min = 37.6 +local Att3001_Dist_max = 42.2 +local Att3002_Dist_min = 36.4 +local Att3002_Dist_max = 45.9 +local Att3003_Dist_min = 52 +local Att3003_Dist_max = 58.5 +local Att3004_Dist_min = 61.7 +local Att3004_Dist_max = 72 +local Att3005_Dist_min = 38 +local Att3005_Dist_max = 57.2 +local Att3006_Dist_min = 42.9 +local Att3006_Dist_max = 58.6 +local Att3007_Dist_min = 39.8 +local Att3007_Dist_max = 60 +local Att3008_Dist_min = 61.5 +local Att3008_Dist_max = 71.8 +REGISTER_GOAL_NO_UPDATE(GOAL_LakeBeast353000_Battle, 1) +function OnIf_353000(ai, goal, codeNo) + local targetDist = ai:GetDist(TARGET_ENE_0) + local targetDistY = ai:GetDistYSigned(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if codeNo == 0 then + if 72 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(2, 4), TARGET_ENE_0, 0, 0, 0) + elseif 40 <= targetDist then + if fate <= 35 then + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(2, 4), TARGET_ENE_0, 0, 0, 0) + elseif fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(2, 4), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Float(30, 50), true, true, -1) + LakeBeast353000_Act07(ai, goal) + else + local LeaveDist = targetDist + 10 + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Float(3, 5), TARGET_ENE_0, LeaveDist, TARGET_ENE_0, true, -1) + end + elseif fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(2, 4), TARGET_ENE_0, 0, 0, 0) + else + local LeaveDist = targetDist + 10 + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, ai:GetRandam_Float(3, 5), TARGET_ENE_0, LeaveDist, TARGET_ENE_0, true, -1) + end + elseif codeNo == 1 then + if 5 <= targetDistY and 67 <= targetDist then + LakeBeast353000_Act05(ai, goal) + elseif 2.5 <= targetDistY and 54 <= targetDist then + if fate <= 80 then + LakeBeast353000_Act11(ai, goal) + else + LakeBeast353000_Act05(ai, goal) + end + elseif 90 <= targetDist then + LakeBeast353000_Act05(ai, goal) + elseif 80 <= targetDist then + if fate <= 50 then + LakeBeast353000_Act05(ai, goal) + else + LakeBeast353000_Act11(ai, goal) + end + elseif 58 <= targetDist then + if fate <= 90 then + LakeBeast353000_Act11(ai, goal) + else + LakeBeast353000_Act05(ai, goal) + end + elseif 51 <= targetDist then + LakeBeast353000_Act04(ai, goal) + elseif 42.9 <= targetDist and targetDist <= 58.6 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 37) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) and fate <= 80 then + LakeBeast353000_Act09(ai, goal) + elseif 39.8 <= targetDist and targetDist <= 60 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 28.4) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 180) and fate <= 80 then + LakeBeast353000_Act10(ai, goal) + elseif 37.6 <= targetDist and targetDist <= 42.2 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 49.2) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) and fate <= 80 then + LakeBeast353000_Act02(ai, goal) + elseif 36.4 <= targetDist and targetDist <= 45.9 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 52.4) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 180) and fate <= 80 then + LakeBeast353000_Act03(ai, goal) + elseif 41 <= targetDist then + LakeBeast353000_Act08(ai, goal) + elseif 38 <= targetDist then + if fate <= 50 then + LakeBeast353000_Act01(ai, goal) + else + LakeBeast353000_Act08(ai, goal) + end + else + LakeBeast353000_Act01(ai, goal) + end + end + return +end + +function LakeBeast353000Battle_Activate(ai, goal) + local hprate = ai:GetHpRate(TARGET_SELF) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local GetWellSpace_Odds = 0 + ai:AddObserveRegion(0, TARGET_ENE_0, 1322703) + ai:AddObserveRegion(1, TARGET_ENE_0, 1322704) + ai:AddObserveRegion(2, TARGET_SELF, 1322705) + ai:AddObserveRegion(3, TARGET_SELF, 1322706) + local ApproachTarget_Odds = 0 + if ai:IsInsideTargetRegion(TARGET_SELF, 1322705) then + if 72 <= targetDist then + ApproachTarget_Odds = 100 + elseif 45.9 <= targetDist then + ApproachTarget_Odds = 50 + else + ApproachTarget_Odds = 20 + end + elseif ai:IsInsideTargetRegion(TARGET_SELF, 1322706) then + if 72 <= targetDist then + ApproachTarget_Odds = 100 + elseif 45.9 <= targetDist then + ApproachTarget_Odds = 50 + else + ApproachTarget_Odds = 20 + end + else + ApproachTarget_Odds = 0 + end + local fateApproach = ai:GetRandam_Int(1, 100) + if fateApproach <= ApproachTarget_Odds then + LakeBeast353000_Act07(ai, goal) + end + goal:AddSubGoal(GOAL_COMMON_If, 10, 1) + local fateGWS = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_If, 10, 0) + return +end + +function LakeBeast353000_Act01(ai, goal) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, 40, -1, 20) + return +end + +function LakeBeast353000_Act02(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3001, TARGET_ENE_0, 40) + return +end + +function LakeBeast353000_Act03(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3002, TARGET_ENE_0, 40) + return +end + +function LakeBeast353000_Act04(ai, goal) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 20, 3003, TARGET_ENE_0, 60, -1, 20) + return +end + +function LakeBeast353000_Act05(ai, goal) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3004, TARGET_ENE_0, 70, -1, 20) + return +end + +function LakeBeast353000_Act06(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3010, TARGET_ENE_0, DIST_None) + return +end + +function LakeBeast353000_Act07(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + if ai:IsInsideTargetRegion(TARGET_SELF, 1322705) then + ai:SetEventMoveTarget(1322751) + local A1 = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + ai:SetEventMoveTarget(1322752) + local A2 = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + ai:SetEventMoveTarget(1322753) + local A3 = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + ai:SetEventMoveTarget(1322754) + local A4 = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + ai:SetEventMoveTarget(1322755) + local A5 = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + ai:SetEventMoveTarget(1322756) + local A6 = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + local minDist = math.min(A1, A2, A3, A4, A5, A6) + if minDist == A1 then + NearPoint = 1322751 + elseif minDist == A2 then + NearPoint = 1322752 + elseif minDist == A3 then + NearPoint = 1322753 + elseif minDist == A4 then + NearPoint = 1322754 + elseif minDist == A5 then + NearPoint = 1322755 + else + NearPoint = 1322756 + end + else + ai:SetEventMoveTarget(1322761) + local B1 = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + ai:SetEventMoveTarget(1322762) + local B2 = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + ai:SetEventMoveTarget(1322763) + local B3 = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + ai:SetEventMoveTarget(1322764) + local B4 = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + ai:SetEventMoveTarget(1322765) + local B5 = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + ai:SetEventMoveTarget(1322766) + local B6 = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + ai:SetEventMoveTarget(1322767) + local B7 = ai:GetDistAtoB(POINT_EVENT, TARGET_ENE_0) + local minDist = math.min(B1, B2, B3, B4, B5, B6, B7) + if minDist == B1 then + NearPoint = 1322761 + elseif minDist == B2 then + NearPoint = 1322762 + elseif minDist == B3 then + NearPoint = 1322763 + elseif minDist == B4 then + NearPoint = 1322764 + elseif minDist == B5 then + NearPoint = 1322765 + elseif minDist == B6 then + NearPoint = 1322766 + else + NearPoint = 1322767 + end + end + ai:SetEventMoveTarget(NearPoint) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, POINT_EVENT, 1, TARGET_ENE_0, true, -1) + return +end + +function LakeBeast353000_Act08(ai, goal) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 20, 3005, TARGET_ENE_0, 45, -1, 20) + return +end + +function LakeBeast353000_Act09(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3006, TARGET_ENE_0, 45) + return +end + +function LakeBeast353000_Act10(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3007, TARGET_ENE_0, 45) + return +end + +function LakeBeast353000_Act11(ai, goal) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3008, TARGET_ENE_0, 70, -1, 20) + return +end + +function LakeBeast353000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function LakeBeast353000Battle_Terminate(ai, goal) + return +end + +function LakeBeast353000Battle_Interupt(ai, goal) + if ai:IsInterupt(INTERUPT_Inside_ObserveArea) and ai:IsFinishTimer(0) == true and ai:IsInsideTargetRegion(TARGET_SELF, 1322705) and ai:IsInsideTargetRegion(TARGET_ENE_0, 1322703) then + goal:ClearSubGoal() + ai:SetTimer(0, 60) + goal:AddSubGoal(GOAL_COMMON_Attack, 20, 3010, TARGET_ENE_0, DIST_Far, 0) + return true + elseif ai:IsInterupt(INTERUPT_Inside_ObserveArea) and ai:IsFinishTimer(0) == true and ai:IsInsideTargetRegion(TARGET_SELF, 1322706) and ai:IsInsideTargetRegion(TARGET_ENE_0, 1322704) then + goal:ClearSubGoal() + ai:SetTimer(0, 60) + goal:AddSubGoal(GOAL_COMMON_Attack, 20, 3010, TARGET_ENE_0, DIST_Far, 0) + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/353001_battle.lua b/scripts_decompiled/353001_battle.lua new file mode 100644 index 0000000..7000af2 --- /dev/null +++ b/scripts_decompiled/353001_battle.lua @@ -0,0 +1,155 @@ +REGISTER_GOAL(GOAL_LakeBeast_m12_353001_Battle, "LakeBeast_m12_353001Battle") +REGISTER_GOAL_NO_UPDATE(GOAL_LakeBeast_m12_353001_Battle, 1) +function LakeBeast_m12_353001Battle_Activate(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + local fate5 = ai:GetRandam_Int(1, 100) + local GetWellSpace_Odds = 0 + local targetDist = ai:GetDist(TARGET_ENE_0) + local targetDistY = ai:GetDistYSigned(TARGET_ENE_0) + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act08Per = 0 + local Act09Per = 0 + local Act10Per = 0 + if 44.6 <= targetDist and targetDist <= 61.3 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 38.4) then + Act06Per = 100 + end + if targetDist <= 44.6 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 32.6) then + Act01Per = 100 + end + if 45.1 <= targetDist and targetDist <= 56.1 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 34.4) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then + Act07Per = 100 + end + if targetDist <= 45.1 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 50) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then + Act02Per = 100 + end + if 46.4 <= targetDist and targetDist <= 60.7 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 38.6) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 180) then + Act08Per = 100 + end + if targetDist <= 46.4 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 47.4) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 180) then + Act03Per = 100 + end + if 53.4 <= targetDist and targetDist <= 65 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 38.4) then + Act04Per = 100 + end + if 65 <= targetDist and targetDist <= 90 and targetDistY <= 10 then + Act09Per = 100 + end + if 80 <= targetDist and targetDist <= 120 and targetDistY <= 17 then + Act05Per = 100 + end + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per) + if fateAct <= Act01Per then + LakeBeast_m12_353001_Act01(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per then + LakeBeast_m12_353001_Act02(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per then + LakeBeast_m12_353001_Act03(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + LakeBeast_m12_353001_Act04(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + LakeBeast_m12_353001_Act05(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + LakeBeast_m12_353001_Act06(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + LakeBeast_m12_353001_Act07(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per then + LakeBeast_m12_353001_Act08(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per then + LakeBeast_m12_353001_Act09(ai, goal) + GetWellSpace_Odds = 0 + else + LakeBeast_m12_353001_Act10(ai, goal) + GetWellSpace_Odds = 0 + end + return +end + +function LakeBeast_m12_353001_Act01(ai, goal) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, 40, -1, 20) + return +end + +function LakeBeast_m12_353001_Act02(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningComboAttack, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + return +end + +function LakeBeast_m12_353001_Act03(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningComboAttack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + return +end + +function LakeBeast_m12_353001_Act04(ai, goal) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3003, TARGET_ENE_0, 60, -1, 20) + return +end + +function LakeBeast_m12_353001_Act05(ai, goal) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3004, TARGET_ENE_0, 70, -1, 20) + return +end + +function LakeBeast_m12_353001_Act06(ai, goal) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 20, 3005, TARGET_ENE_0, 45, -1, 20) + return +end + +function LakeBeast_m12_353001_Act07(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3006, TARGET_ENE_0, 45) + return +end + +function LakeBeast_m12_353001_Act08(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3007, TARGET_ENE_0, 45) + return +end + +function LakeBeast_m12_353001_Act09(ai, goal) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3008, TARGET_ENE_0, 70, -1, 20) + return +end + +function LakeBeast_m12_353001_Act10(ai, goal) + goal:AddSubGoal(GOAL_COMMON_Turn, 2, TARGET_ENE_0, 0, 0, 0) + return +end + +function LakeBeast_m12_353001_ActAfter_AdjustSpace(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + return +end + +function LakeBeast_m12_353001Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function LakeBeast_m12_353001Battle_Terminate(ai, goal) + return +end + +function LakeBeast_m12_353001Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + return false +end + +return diff --git a/scripts_decompiled/409000_battle.lua b/scripts_decompiled/409000_battle.lua new file mode 100644 index 0000000..3aeff90 --- /dev/null +++ b/scripts_decompiled/409000_battle.lua @@ -0,0 +1,435 @@ +REGISTER_GOAL(GOAL_SniperA409000_Battle, "SniperA409000Battle") +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 2 +REGISTER_GOAL_NO_UPDATE(GOAL_SniperA409000_Battle, 1) +function OnIf_409000(ai, goal, codeNo) + if codeNo == 0 then + SniperA409000_ActAfter(ai, goal) + end + if codeNo == 1 then + SniperA409000_KickAfter(ai, goal) + end + return +end + +function SniperA409000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local hprate = ai:GetHpRate(TARGET_SELF) + local targetDist = ai:GetDist(TARGET_ENE_0) + local targetDistY = ai:GetDistYSigned(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + ai:AddObserveChrDmySphere(0, TARGET_ENE_0, 6, 6) + ai:SetNumber(0, 0) + if ai:IsFinishTimer(0) == true then + ai:SetNumber(1, 0) + end + if 20 <= targetDist then + actPerArr[1] = 60 + actPerArr[2] = 40 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 0 + elseif 12 <= targetDist then + actPerArr[1] = 50 + actPerArr[2] = 30 + actPerArr[3] = 0 + actPerArr[4] = 20 + actPerArr[5] = 0 + elseif 7 <= targetDist then + actPerArr[1] = 30 + actPerArr[2] = 30 + actPerArr[3] = 10 + actPerArr[4] = 30 + actPerArr[5] = 0 + elseif 2.5 <= targetDist then + actPerArr[1] = 15 + actPerArr[2] = 30 + actPerArr[3] = 15 + actPerArr[4] = 20 + actPerArr[5] = 20 + else + actPerArr[1] = 0 + actPerArr[2] = 30 + actPerArr[3] = 30 + actPerArr[4] = 0 + actPerArr[5] = 40 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, SniperA409000_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, SniperA409000_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, SniperA409000_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, SniperA409000_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, SniperA409000_Act05) + local atkAfterFunc = REGIST_FUNC(ai, goal, SniperA409000_ActAfter_AdjustSpace) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +function SniperA409000_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local FirstAttID = 3000 + local ComAttID = 3001 + local ShootNum = ai:GetRandam_Int(1, 1) + local AppDist = 45 + local DashDist = 45 + local Odds_Guard = 0 + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 5) + end + if 15 <= targetDist then + ShootNum = ai:GetRandam_Int(1, 5) + elseif 10 <= targetDist then + ShootNum = ai:GetRandam_Int(1, 4) + elseif 7 <= targetDist then + ShootNum = ai:GetRandam_Int(1, 3) + elseif 4 <= targetDist then + ShootNum = ai:GetRandam_Int(1, 2) + else + ShootNum = ai:GetRandam_Int(1, 1) + end + ai:SetNumber(0, 1) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + GetWellSpace_Odds = 50 + return GetWellSpace_Odds +end + +function SniperA409000_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local FirstAttID = 3002 + local ComAttID = 3003 + local ShootNum = ai:GetRandam_Int(1, 1) + local AppDist = 45 + local DashDist = 45 + local Odds_Guard = 0 + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 5) + end + if 15 <= targetDist then + ShootNum = ai:GetRandam_Int(3, 5) + elseif 10 <= targetDist then + ShootNum = ai:GetRandam_Int(2, 4) + elseif 7 <= targetDist then + ShootNum = ai:GetRandam_Int(2, 3) + elseif 4 <= targetDist then + ShootNum = ai:GetRandam_Int(1, 2) + else + ShootNum = ai:GetRandam_Int(1, 1) + end + ai:SetNumber(0, 1) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + GetWellSpace_Odds = 50 + return GetWellSpace_Odds +end + +function SniperA409000_Act03(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if 8 <= targetDist then + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 3007, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5.5) + elseif fate <= 65 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 3008, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 3009, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + elseif 4 <= targetDist then + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 3007, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5.5) + elseif fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 3008, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 3009, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 3007, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5.5) + end + GetWellSpace_Odds = 50 + return GetWellSpace_Odds +end + +function SniperA409000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = 8 + local DashDist = 10 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + if fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_NONE, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3005, TARGET_ENE_0, DIST_NONE, -1, 50) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3005, TARGET_ENE_0, DIST_NONE, 0) + end + GetWellSpace_Odds = 50 + return GetWellSpace_Odds +end + +Att3006_Dist_min = Att3006_Dist_max +function SniperA409000_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = 2.5 + local DashDist = 2 + local Odds_Guard = 0 + local AttDist = Att3006_Dist_max + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3006, TARGET_ENE_0, AttDist, 0, 50) + goal:AddSubGoal(GOAL_COMMON_If, 10, 1) + GetWellSpace_Odds = 50 + return GetWellSpace_Odds +end + +function SniperA409000_KickAfter(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if targetDist <= 2 then + if fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3006, TARGET_ENE_0, DIST_None, 0) + elseif fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 3007, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5.5) + elseif fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5.5) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2, TARGET_ENE_0, 4, TARGET_ENE_0, true, -1) + end + elseif targetDist <= 5 then + if fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3002, TARGET_ENE_0, DIST_None, 0) + elseif fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 3007, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5.5) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5.5) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2, TARGET_ENE_0, 8, TARGET_ENE_0, true, -1) + end + elseif fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 2, TARGET_ENE_0, bRight, ai:GetRandam_Int(30, 45), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2, TARGET_ENE_0, 8, TARGET_ENE_0, true, -1) + end + return +end + +function SniperA409000_ActAfter(ai, goal) + local GW_fate = ai:GetRandam_Int(1, 100) + local fate = ai:GetRandam_Int(1, 100) + local bRight = ai:GetRandam_Int(0, 1) + local targetDist = ai:GetDist(TARGET_ENE_0) + if targetDist <= 3 then + if GW_fate <= 80 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 140) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5.5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + elseif GW_fate <= 100 then + if fate <= 0 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 2, TARGET_ENE_0, bRight, ai:GetRandam_Int(60, 60), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2, TARGET_ENE_0, 5, TARGET_ENE_0, true, -1) + end + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3004, TARGET_ENE_0, AppDist, -1, 50) + end + elseif targetDist <= 7 then + if GW_fate <= 65 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 140) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5.5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + elseif GW_fate <= 90 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 2, TARGET_ENE_0, bRight, ai:GetRandam_Int(60, 60), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2, TARGET_ENE_0, 10, TARGET_ENE_0, true, -1) + end + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3004, TARGET_ENE_0, AppDist, -1, 50) + end + elseif targetDist <= 10 then + if GW_fate <= 25 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 140) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5.5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + elseif GW_fate <= 80 then + if fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 2.5, TARGET_ENE_0, bRight, ai:GetRandam_Int(60, 60), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 12, TARGET_ENE_0, true, -1) + end + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3004, TARGET_ENE_0, AppDist, -1, 50) + end + elseif GW_fate <= 0 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 140) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5.5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + elseif GW_fate <= 75 then + if fate <= 100 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, bRight, ai:GetRandam_Int(60, 60), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, 15, TARGET_ENE_0, true, -1) + end + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3004, TARGET_ENE_0, AppDist, -1, 50) + end + return +end + +function SniperA409000_ActAfter_AdjustSpace(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_If, 10, 0) + return +end + +function SniperA409000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function SniperA409000Battle_Terminate(ai, goal) + return +end + +Att3006_Dist_min = Att3006_Dist_max +function SniperA409000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local targetDistY = ai:GetDistYSigned(TARGET_ENE_0) + if ai:IsInterupt(INTERUPT_Damaged) and fate <= 100 and targetDist <= 5 then + goal:ClearSubGoal() + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 120) and ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_B, 5.5) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 3, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 0) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) and ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_L, 5) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 3, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 0) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 180) and ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_R, 5) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 3, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 2, 3006, TARGET_ENE_0, DIST_None, 0) + end + return false + elseif ai:IsInterupt(INTERUPT_Inside_ObserveArea) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 120) and ai:GetNumber(0) == 1 then + ai:SetNumber(0, 0) + if fate <= 30 and 3 < targetDist then + goal:ClearSubGoal() + if fate2 <= 60 then + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5.5) + elseif fate3 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + elseif fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 3007, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5.5) + elseif fate3 <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 3008, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 3009, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + return true + elseif fate <= 40 and targetDist <= 3 then + goal:ClearSubGoal() + if fate2 <= 50 then + if fate3 <= 60 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5.5) + elseif fate3 <= 80 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + elseif fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 3007, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5.5) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 2, 3006, TARGET_ENE_0, DIST_None, 0) + end + return true + end + end + local distUseItem_Act = 20 + local oddsUseItem_Act = 30 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + local AtkDist1 = Att3006_Dist_max + goal:ClearSubGoal() + if targetDist <= 2 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 2, 3006, TARGET_ENE_0, AtkDist1, -1, 50) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 2, 3002, TARGET_ENE_0, DIST_NONE, -1, 50) + end + return true + elseif ai:IsInterupt(INTERUPT_Shoot) then + ai:SetNumber(1, 1) + ai:SetTimer(0, 3) + end + if ai:GetNumber(1) == 1 and ai:IsInterupt(INTERUPT_Damaged) and 10 <= targetDist then + goal:ClearSubGoal() + ai:SetNumber(1, 0) + Approach_Act(ai, goal, targetDist - 5, 0, 0, 4) + return true + elseif ai:GetNumber(1) == 1 and ai:IsInterupt(INTERUPT_Damaged) and targetDistY <= -0.5 then + goal:ClearSubGoal() + ai:SetNumber(1, 0) + Approach_Act(ai, goal, targetDist - 4, 0, 0, 3) + return true + else + local distResNear = 10 + local distResFar = 50 + local oddsResNear = 50 + local oddsResFar = 70 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:ClearSubGoal() + if fate <= 70 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 3008, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 3009, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + return true + elseif ResBehavID == 2 then + goal:ClearSubGoal() + if fate <= 30 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 3008, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 3009, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + return true + else + return false + end + end +end + +return diff --git a/scripts_decompiled/410000_battle.lua b/scripts_decompiled/410000_battle.lua new file mode 100644 index 0000000..69cc4ac --- /dev/null +++ b/scripts_decompiled/410000_battle.lua @@ -0,0 +1,776 @@ +REGISTER_GOAL(GOAL_Artorius410000_Battle, "Artorius410000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 5 +local Att3002_Dist_min = 2 +local Att3002_Dist_max = 6.5 +local Att3003_Dist_min = 7 +local Att3003_Dist_max = 9 +local Att3004_Dist_min = 4 +local Att3004_Dist_max = 6 +local Att3005_Dist_min = 10 +local Att3005_Dist_max = 13.5 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 20 +local Att3007_Dist_min = 4 +local Att3007_Dist_max = 5.5 +local Att3008_Dist_min = 0 +local Att3008_Dist_max = 2 +local Att3010_Dist_min = 0 +local Att3010_Dist_max = 2 +local Att3011_Dist_min = 0 +local Att3011_Dist_max = 2 +local Att3012_Dist_min = 0 +local Att3012_Dist_max = 4 +local Att3023_Dist_min = 0 +local Att3023_Dist_max = 5 +REGISTER_GOAL_NO_UPDATE(GOAL_Artorius410000_Battle, 1) +function OnIf_410000(ai, goal, codeNo) + if codeNo == 0 then + ai:SetTimer(0, 40) + end + if codeNo == 1 then + ai:SetTimer(1, 10) + end + if codeNo == 2 then + Artorius410000_ActAfter(ai, goal) + end + if codeNo == 3 then + ai:SetTimer(2, 10) + end + return +end + +function Artorius410000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + ai:SetNumber(0, 0) + local hprate = ai:GetHpRate(TARGET_SELF) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = 1 + if ai:IsFinishTimer(1) == true then + fate3 = 1 + else + fate3 = 2 + end + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 120) and fate <= 70 then + if targetDist <= 3 then + actPerArr[10] = 80 + actPerArr[20] = 20 + else + actPerArr[10] = 0 + actPerArr[20] = 100 + end + elseif targetDist <= 3.5 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 130) and fate <= 70 and ai:IsFinishTimer(2) == true then + actPerArr[11] = 100 + elseif hprate <= 0.25 and 0.15 <= hprate and fate2 <= 5 and ai:IsFinishTimer(0) == true and 1 <= ai:GetNumber(1) then + actPerArr[12] = 100 + elseif hprate <= 0.8 and 0.15 <= hprate and fate2 <= 7 and ai:IsFinishTimer(0) == true and 1 <= ai:GetNumber(1) then + actPerArr[12] = 100 + elseif hprate <= 1 and 0.15 <= hprate and fate2 <= 0 and ai:IsFinishTimer(0) == true and 1 <= ai:GetNumber(1) then + actPerArr[12] = 100 + elseif hprate <= 0.25 and fate2 <= 100 and ai:IsFinishTimer(0) == true and ai:GetNumber(1) == 2 then + actPerArr[12] = 100 + elseif hprate <= 0.5 and fate2 <= 100 and ai:IsFinishTimer(0) == true and ai:GetNumber(1) == 1 then + actPerArr[12] = 100 + elseif hprate <= 0.8 and fate2 <= 100 and ai:IsFinishTimer(0) == true and ai:GetNumber(1) == 0 then + actPerArr[12] = 100 + elseif hprate == 1 and ai:GetNumber(2) == 0 then + actPerArr[7] = 100 + elseif 15 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 25 + actPerArr[4] = 20 + actPerArr[5] = 40 + actPerArr[6] = 0 + actPerArr[8] = 15 + actPerArr[9] = 0 + actPerArr[13] = 0 + elseif 9 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 20 + actPerArr[4] = 20 + actPerArr[5] = 25 * fate3 + actPerArr[6] = 0 + actPerArr[8] = 35 + actPerArr[9] = 0 + actPerArr[13] = 0 + elseif 7 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 15 + actPerArr[3] = 30 + actPerArr[4] = 30 + actPerArr[5] = 0 * fate3 + actPerArr[6] = 0 + actPerArr[8] = 25 * fate3 + actPerArr[9] = 0 + actPerArr[13] = 0 + elseif 5 <= targetDist then + actPerArr[1] = 15 + actPerArr[2] = 15 + actPerArr[3] = 20 * fate3 + actPerArr[4] = 20 * fate3 + actPerArr[5] = 0 + actPerArr[6] = 0 + actPerArr[8] = 15 * fate3 + actPerArr[9] = 0 + actPerArr[13] = 15 + elseif 3 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 15 + actPerArr[3] = 10 + actPerArr[4] = 10 + actPerArr[5] = 0 + actPerArr[6] = 10 + actPerArr[8] = 15 * fate3 + actPerArr[9] = 0 + actPerArr[13] = 20 + else + actPerArr[1] = 25 + actPerArr[2] = 10 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 25 + actPerArr[8] = 0 + actPerArr[9] = 20 + actPerArr[13] = 20 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Artorius410000_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Artorius410000_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, Artorius410000_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, Artorius410000_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, Artorius410000_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, Artorius410000_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, Artorius410000_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, Artorius410000_Act08) + actFuncArr[9] = REGIST_FUNC(ai, goal, Artorius410000_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, Artorius410000_Act10) + actFuncArr[11] = REGIST_FUNC(ai, goal, Artorius410000_Act11) + actFuncArr[12] = REGIST_FUNC(ai, goal, Artorius410000_Act12) + actFuncArr[13] = REGIST_FUNC(ai, goal, Artorius410000_Act13) + actFuncArr[20] = REGIST_FUNC(ai, goal, Artorius410000_Act20) + local atkAfterFunc = REGIST_FUNC(ai, goal, Artorius410000_ActAfter_AdjustSpace) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function Artorius410000_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3000_Dist_max - 1 + local DashDist = Att3000_Dist_max + 1 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local AttDist = Att3000_Dist_max + 0 + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + if fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, AttDist, 0, 90) + elseif fate <= 60 then + if fate2 <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, AppDist, 0) + elseif fate2 <= 80 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3014, TARGET_ENE_0, AppDist, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, AppDist, 0) + end + elseif fate2 <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, AppDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, AppDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3014, TARGET_ENE_0, AppDist, 0) + elseif fate2 <= 80 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, AppDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, AppDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, AppDist, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, AppDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, AppDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3011, TARGET_ENE_0, AppDist, 0) + end + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 50 + else + GetWellSpace_Odds = 70 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3002_Dist_max +function Artorius410000_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3002_Dist_max - 1 + local DashDist = Att3002_Dist_max + 1 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local AttDist = Att3002_Dist_max + 0 + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + if fate <= 15 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, AttDist, 0, 90) + elseif fate <= 60 then + if fate2 <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3002, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, AppDist, 0) + elseif fate2 <= 80 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3011, TARGET_ENE_0, AppDist, 0) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, AppDist, 0) + end + elseif fate2 <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3002, TARGET_ENE_0, AppDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, AppDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, AppDist, 0) + elseif fate2 <= 80 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3002, TARGET_ENE_0, AppDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, AppDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3014, TARGET_ENE_0, AppDist, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3002, TARGET_ENE_0, AppDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, AppDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3011, TARGET_ENE_0, AppDist, 0) + end + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 50 + else + GetWellSpace_Odds = 70 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3004_Dist_max +function Artorius410000_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 0 + local AttDist = Att3004_Dist_max + ai:SetTimer(1, 0) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, AttDist, 0) + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 30 + else + GetWellSpace_Odds = 70 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3007_Dist_max +function Artorius410000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + local AttDist = Att3007_Dist_max + ai:SetTimer(1, 0) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + if fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3007, TARGET_ENE_0, AttDist, -1, 25) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3007, TARGET_ENE_0, AttDist, -1, 25) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3011, TARGET_ENE_0, AttDist, 0) + end + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 30 + else + GetWellSpace_Odds = 70 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3005_Dist_max +Att3000_Dist_min = Att3005_Dist_min +function Artorius410000_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3005_Dist_max - 1 + local DashDist = Att3005_Dist_max + 0 + local Odds_Guard = 0 + local AttDist = Att3005_Dist_max + 2 + local Distmin = Att3005_Dist_min - 1 + local Distmax = Att3005_Dist_max + 0 + ai:SetTimer(1, 0) + if Distmin <= targetDist and targetDist <= Distmax then + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3005, TARGET_ENE_0, AttDist, 0) + elseif targetDist <= Distmin then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 5, 3005, TARGET_ENE_0, AttDist, 0) + else + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 5, 3005, TARGET_ENE_0, AttDist, 0) + end + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 30 + else + GetWellSpace_Odds = 100 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3011_Dist_max +function Artorius410000_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3011_Dist_max + local DashDist = Att3011_Dist_max + 2 + local Odds_Guard = 0 + local AttDist = Att3011_Dist_max + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 3, 3011, TARGET_ENE_0, AttDist, 0, 90) + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 30 + else + GetWellSpace_Odds = 70 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_max +function Artorius410000_Act07(ai, goal, paramTbl) + local AttDist = Att3006_Dist_max + ai:SetNumber(2, 1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3006, TARGET_ENE_0, AttDist, 1, 30) + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 0 + else + GetWellSpace_Odds = 0 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3003_Dist_max +function Artorius410000_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + local AttDist = Att3003_Dist_max + 0 + local fate = ai:GetRandam_Int(1, 100) + ai:SetTimer(1, 0) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3003, TARGET_ENE_0, AttDist, -1, 60) + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 20 + else + GetWellSpace_Odds = 60 + end + elseif fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3003, TARGET_ENE_0, AttDist, -1, 60) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3009, TARGET_ENE_0, AttDist, 0) + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 10 + else + GetWellSpace_Odds = 80 + end + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3003, TARGET_ENE_0, AttDist, -1, 60) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3009, TARGET_ENE_0, AttDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3009, TARGET_ENE_0, AttDist, 0) + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 50 + else + GetWellSpace_Odds = 100 + end + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3010_Dist_max +function Artorius410000_Act09(ai, goal, paramTbl) + local AppDist = Att3010_Dist_max + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local AttDist = Att3010_Dist_max + 8 + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3010, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_If, 10, 1) + elseif fate2 <= 20 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 5, 3010, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3006, TARGET_ENE_0, AttDist, 0) + elseif fate2 <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 5, 3010, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3004, TARGET_ENE_0, AttDist, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 5, 3010, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, AttDist, 0) + end + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 30 + else + GetWellSpace_Odds = 80 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3008_Dist_max +function Artorius410000_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AttDist = Att3008_Dist_max + 8 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 3, 3008, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_If, 10, 1) + elseif fate2 <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 3, 3008, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3006, TARGET_ENE_0, AttDist, 0) + elseif fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 3, 3008, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3004, TARGET_ENE_0, AttDist, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 3, 3008, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, AttDist, 0) + end + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 30 + else + GetWellSpace_Odds = 80 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3012_Dist_max +function Artorius410000_Act11(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AttDist = Att3012_Dist_max + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_If, 10, 3) + if fate <= 90 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 3, 3012, TARGET_ENE_0, AttDist, 0, -1) + ai:SetNumber(0, 1) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 2, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 3, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + goal:AddSubGoal(GOAL_COMMON_If, 10, 1) + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 10 + else + GetWellSpace_Odds = 70 + end + return GetWellSpace_Odds +end + +function Artorius410000_Act12(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local hprate = ai:GetHpRate(TARGET_SELF) + local AttDist = 20 + local fate = ai:GetRandam_Int(1, 100) + if targetDist <= 4 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 120) and ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_B, 3) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 120) and ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_F, 3) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 700, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 4) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 60) and ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_L, 3) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + end + if targetDist <= 8 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 240) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 0) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 700, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 0) + end + end + goal:AddSubGoal(GOAL_COMMON_If, 10, 0) + if hprate <= 0.25 then + ai:SetNumber(1, 3) + elseif hprate <= 0.5 then + ai:SetNumber(1, 2) + elseif hprate <= 0.8 then + ai:SetNumber(1, 1) + else + ai:SetNumber(1, 0) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3013, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 1.5, TARGET_ENE_0, 9, TARGET_ENE_0, true, -1) + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 0 + else + GetWellSpace_Odds = 0 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3023_Dist_max +function Artorius410000_Act13(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3023_Dist_max + 0 + local DashDist = Att3023_Dist_max + 1 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local AttDist = Att3023_Dist_max + 0 + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + if fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3023, TARGET_ENE_0, AttDist, 0, 60) + elseif fate2 <= 25 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3023, TARGET_ENE_0, AttDist, 0, 60) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3000, TARGET_ENE_0, AppDist, 0) + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3023, TARGET_ENE_0, AttDist, 0, 60) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, AppDist, 0) + elseif fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3023, TARGET_ENE_0, AttDist, 0, 60) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, AppDist, 0) + elseif fate2 <= 85 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3023, TARGET_ENE_0, AttDist, 0, 60) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3011, TARGET_ENE_0, AppDist, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, AttDist, 0, 60) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, AppDist, 0) + end + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 50 + else + GetWellSpace_Odds = 70 + end + return GetWellSpace_Odds +end + +function Artorius410000_Act20(ai, goal, paramTbl) + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3021, TARGET_ENE_0, DIST_None, 0, 90) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 180) then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3020, TARGET_ENE_0, DIST_None, 0, 90) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3021, TARGET_ENE_0, DIST_None, 0, 90) + end + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 0 + else + GetWellSpace_Odds = 0 + end + return GetWellSpace_Odds +end + +function Artorius410000_ActAfter(ai, goal) + local GW_fate = ai:GetRandam_Int(1, 100) + local fate = ai:GetRandam_Int(1, 100) + local bRight = ai:GetRandam_Int(0, 1) + local targetDist = ai:GetDist(TARGET_ENE_0) + if targetDist <= 2 then + if GW_fate <= 75 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 120) and ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_B, 3) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 3, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 120) and ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_F, 3) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 3, 700, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 60) and ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_L, 3) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 3, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 3, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + goal:AddSubGoal(GOAL_COMMON_If, 10, 1) + elseif GW_fate <= 100 then + if fate <= 0 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 2, TARGET_ENE_0, bRight, ai:GetRandam_Int(60, 60), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2, TARGET_ENE_0, 4, TARGET_ENE_0, true, -1) + end + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, DIST_None, 0, 90) + end + elseif targetDist <= 5 then + if GW_fate <= 65 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 120) and ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_B, 3) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 3, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 120) and ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_F, 3) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 3, 700, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 60) and ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_L, 3) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 3, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 3, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + goal:AddSubGoal(GOAL_COMMON_If, 10, 1) + elseif GW_fate <= 90 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 2.5, TARGET_ENE_0, bRight, ai:GetRandam_Int(60, 60), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 8, TARGET_ENE_0, true, -1) + end + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, DIST_None, 0, 90) + end + elseif targetDist <= 10 then + if GW_fate <= 25 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 120) and ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_B, 3) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 3, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 120) and ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_F, 3) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 3, 700, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 60) and ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_L, 3) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 3, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 3, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + goal:AddSubGoal(GOAL_COMMON_If, 10, 1) + elseif GW_fate <= 80 then + if fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, bRight, ai:GetRandam_Int(60, 60), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, 12, TARGET_ENE_0, true, -1) + end + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, DIST_None, 0, 90) + end + elseif GW_fate <= 0 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 120) and ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_B, 3) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 3, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 120) and ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_F, 3) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 3, 700, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 60) and ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_L, 3) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 3, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 3, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + goal:AddSubGoal(GOAL_COMMON_If, 10, 1) + elseif GW_fate <= 80 then + if fate <= 100 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, bRight, ai:GetRandam_Int(60, 60), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, 12, TARGET_ENE_0, true, -1) + end + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, DIST_None, 0, 90) + end + return +end + +function Artorius410000_ActAfter_AdjustSpace(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_If, 10, 2) + return +end + +function Artorius410000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Artorius410000Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3005_Dist_max +function Artorius410000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local hprate = ai:GetHpRate(TARGET_SELF) + if ai:IsInterupt(INTERUPT_TargetIsGuard) and ai:GetNumber(0) == 1 then + ai:SetNumber(0, 0) + goal:ClearSubGoal() + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 180) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 180) then + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 2, 3023, TARGET_ENE_0, DIST_None, -1) + elseif fate <= 50 and 0.3 <= hprate then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 2, 3006, TARGET_ENE_0, DIST_None, 0, 90) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + return true + else + local distDamagedStep = 3 + local oddsDamagedStep = 30 + local bkStepPer = 50 + local leftStepPer = 25 + local rightStepPer = 25 + local safetyDist = 5 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distUseItem_Act = 20 + local oddsUseItem_Act = 20 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 0 + goal:ClearSubGoal() + if targetDist <= 2 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 120) then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 1, 3008, TARGET_ENE_0, DIST_None, 0, 0) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 120) then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 1, 3021, TARGET_ENE_0, DIST_None, 0, 90) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 180) then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 1, 3020, TARGET_ENE_0, DIST_None, 0, 90) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 1, 3021, TARGET_ENE_0, DIST_None, 0, 90) + end + elseif targetDist <= 5 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 2, 3023, TARGET_ENE_0, DIST_None, 0, 90) + elseif targetDist <= 7 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 2, 3004, TARGET_ENE_0, DIST_None, -1, 25) + elseif targetDist <= 10 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 2, 3003, TARGET_ENE_0, DIST_None, 0, 90) + else + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 2) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 2, 3005, TARGET_ENE_0, DIST_None, 0, 90) + end + return true + else + local distResNear = 6 + local distResFar = 20 + local oddsResNear = 60 + local oddsResFar = 80 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + if fate <= 80 then + if targetDist <= 5 then + goal:AddSubGoal(GOAL_COMMON_Attack, 2, 3023, TARGET_ENE_0, DIST_None, 0) + elseif targetDist <= 7 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 2, 3004, TARGET_ENE_0, DIST_None, -1, 25) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 2, 3003, TARGET_ENE_0, DIST_None, 0, 90) + end + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + return true + elseif ResBehavID == 2 then + if fate <= 60 then + if targetDist <= 11 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 2, 3003, TARGET_ENE_0, DIST_None, 0, 90) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 2, 3005, TARGET_ENE_0, DIST_None, 0, 90) + end + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + return true + else + return false + end + end + end + end +end + +return diff --git a/scripts_decompiled/411000_battle.lua b/scripts_decompiled/411000_battle.lua new file mode 100644 index 0000000..e3ffcd3 --- /dev/null +++ b/scripts_decompiled/411000_battle.lua @@ -0,0 +1,296 @@ +REGISTER_GOAL(GOAL_Go_HawkEye411000_Battle, "Go_HawkEye411000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 1 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 1 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 2 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 2 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 2.5 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 2.5 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 2 +local Att3007_Dist_min = 0 +local Att3007_Dist_max = 2 +local Att3008_Dist_min = 0 +local Att3008_Dist_max = 100 +REGISTER_GOAL_NO_UPDATE(GOAL_Go_HawkEye411000_Battle, 1) +function OnIf_411000(ai, goal, codeNo) + if codeNo == 0 then + Go_HawkEye411000_ActAfter_RealTime(ai, goal) + end + return +end + +function Go_HawkEye411000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + local eventNo = ai:GetEventRequest(0) + if eventNo == 10 then + actPerArr[10] = 100 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 90) then + if targetDist <= 1 then + actPerArr[7] = 100 + else + actPerArr[5] = 0 + actPerArr[6] = 0 + actPerArr[7] = 0 + actPerArr[8] = 0 + actPerArr[9] = 0 + if ai:GetNumber(0) == 1 then + actPerArr[1] = 0 + actPerArr[2] = 50 + actPerArr[3] = 0 + actPerArr[4] = 50 + else + actPerArr[1] = 50 + actPerArr[2] = 0 + actPerArr[3] = 50 + actPerArr[4] = 0 + end + end + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 90) then + actPerArr[1] = 33 + actPerArr[2] = 0 + actPerArr[3] = 33 + actPerArr[4] = 0 + actPerArr[5] = 34 + actPerArr[6] = 0 + actPerArr[7] = 0 + actPerArr[8] = 0 + actPerArr[9] = 0 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 90) then + actPerArr[1] = 0 + actPerArr[2] = 33 + actPerArr[3] = 0 + actPerArr[4] = 33 + actPerArr[5] = 0 + actPerArr[6] = 34 + actPerArr[7] = 0 + actPerArr[8] = 0 + actPerArr[9] = 0 + elseif targetDist <= 1 then + actPerArr[8] = 100 + else + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[7] = 0 + actPerArr[8] = 0 + actPerArr[9] = 0 + if ai:GetNumber(0) == 1 then + actPerArr[1] = 0 + actPerArr[2] = 50 + actPerArr[5] = 0 + actPerArr[6] = 50 + else + actPerArr[1] = 50 + actPerArr[2] = 0 + actPerArr[5] = 50 + actPerArr[6] = 0 + end + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Go_HawkEye411000_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Go_HawkEye411000_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, Go_HawkEye411000_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, Go_HawkEye411000_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, Go_HawkEye411000_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, Go_HawkEye411000_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, Go_HawkEye411000_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, Go_HawkEye411000_Act08) + actFuncArr[9] = REGIST_FUNC(ai, goal, Go_HawkEye411000_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, Go_HawkEye411000_Act10) + local atkAfterFunc = REGIST_FUNC(ai, goal, Go_HawkEye411000_ActAfter_AdjustSpace) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function Go_HawkEye411000_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + if fate <= 25 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, 2, 45) + ai:SetNumber(0, 1) + elseif fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, 0, 30, 0, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3011, TARGET_ENE_0, DIST_Middle, 0) + ai:SetNumber(0, 0) + elseif fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, 0, 30, 0, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3011, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3012, TARGET_ENE_0, DIST_Middle, 0) + ai:SetNumber(0, 1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, 0, 30, 0, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3011, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3012, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3013, TARGET_ENE_0, DIST_Middle, 0) + ai:SetNumber(0, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3001_Dist_max +function Go_HawkEye411000_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3001_Dist_max + local DashDist = Att3001_Dist_max + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + if fate <= 33 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3001, TARGET_ENE_0, DIST_Middle, 2, 45) + ai:SetNumber(0, 0) + elseif fate <= 66 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3001, TARGET_ENE_0, DIST_Middle, 0, 30, 0, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3012, TARGET_ENE_0, DIST_Middle, 0) + ai:SetNumber(0, 1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3001, TARGET_ENE_0, DIST_Middle, 0, 30, 0, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3012, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3013, TARGET_ENE_0, DIST_Middle, 0) + ai:SetNumber(0, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3002_Dist_max +function Go_HawkEye411000_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, DIST_Middle, 2, 45) + ai:SetNumber(0, 1) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3002, TARGET_ENE_0, DIST_Middle, 0, 30, 0, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3013, TARGET_ENE_0, DIST_Middle, 0) + ai:SetNumber(0, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3003_Dist_max +function Go_HawkEye411000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + local Odds_Guard = 0 + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3003, TARGET_ENE_0, DIST_Middle, 2, 45) + ai:SetNumber(0, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3004_Dist_max +function Go_HawkEye411000_Act05(ai, goal, paramTbl) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + local Odds_Guard = 0 + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3004, TARGET_ENE_0, DIST_Middle, 0, 360) + ai:SetNumber(0, 1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3005_Dist_max +function Go_HawkEye411000_Act06(ai, goal, paramTbl) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + local Odds_Guard = 0 + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3005, TARGET_ENE_0, DIST_Middle, 0, 360) + ai:SetNumber(0, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_max +function Go_HawkEye411000_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + local Odds_Guard = 0 + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, DIST_Middle, 0, 360) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3007_Dist_max +function Go_HawkEye411000_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + local Odds_Guard = 0 + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3007, TARGET_ENE_0, DIST_Middle, 0, 360) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Go_HawkEye411000_Act09(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3008, TARGET_ENE_0, DIST_Middle, 0, 360) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Go_HawkEye411000_Act10(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 30, POINT_INITIAL, 0, TARGET_NONE, false, -1) + return +end + +function Go_HawkEye411000_ActAfter_AdjustSpace(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_If, 10, 0) + return +end + +function Go_HawkEye411000_ActAfter_RealTime(ai, goal) + return +end + +function Go_HawkEye411000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Go_HawkEye411000Battle_Terminate(ai, goal) + return +end + +function Go_HawkEye411000Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/411000_logic.lua b/scripts_decompiled/411000_logic.lua new file mode 100644 index 0000000..5174fd3 --- /dev/null +++ b/scripts_decompiled/411000_logic.lua @@ -0,0 +1,20 @@ +REGISTER_LOGIC_FUNC(LOGIC_ID_Go_HawkEye411000, "Go_HawkEye411000_Logic", "Go_HawkEye411000_Interupt") +function Go_HawkEye411000_Logic(ai) + if ai:IsChangeState() then + if ai:IsSearchTarget(TARGET_ENE_0) == false then + ai:AddTopGoal(GOAL_COMMON_NonspinningAttack, 10, 3008, TARGET_ENE_0, DIST_Middle) + return true + end + ai:AddTopGoal(GOAL_COMMON_NonspinningAttack, 10, 3009, TARGET_ENE_0, DIST_Middle) + COMMON_EasySetup3(ai) + else + COMMON_EasySetup3(ai) + end + return +end + +function Go_HawkEye411000_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/412000_battle.lua b/scripts_decompiled/412000_battle.lua new file mode 100644 index 0000000..7ba497b --- /dev/null +++ b/scripts_decompiled/412000_battle.lua @@ -0,0 +1,242 @@ +REGISTER_GOAL(GOAL_Kyu_DoguKishi412000_Battle, "Kyu_DoguKishi412000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 1.6 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 3.5 +local Att3005_Dist_min = 4 +local Att3005_Dist_max = 5.5 +local Att3006_Dist_min = 4 +local Att3006_Dist_max = 6.2 +local Att3007_Dist_min = 0 +local Att3007_Dist_max = 2 +REGISTER_GOAL_NO_UPDATE(GOAL_Kyu_DoguKishi412000_Battle, 1) +function Kyu_DoguKishi412000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distY = ai:GetDistY(TARGET_ENE_0) + if 20 <= distY then + actPerArr[6] = 100 + elseif 8 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 50 + actPerArr[4] = 50 + actPerArr[5] = 0 + elseif 4 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 50 + actPerArr[4] = 50 + actPerArr[5] = 0 + elseif 2.5 <= targetDist then + actPerArr[1] = 35 + actPerArr[2] = 35 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 30 + else + actPerArr[1] = 40 + actPerArr[2] = 40 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 20 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Kyu_DoguKishi412000_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Kyu_DoguKishi412000_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, Kyu_DoguKishi412000_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, Kyu_DoguKishi412000_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, Kyu_DoguKishi412000_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, Kyu_DoguKishi412000_Act06) + local local0 = {0, 20, 30, 35, 15, 0, 0} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace_IncludeSidestep, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function Kyu_DoguKishi412000_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 30 + local AttDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + if fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, AttDist, 1, 90) + elseif fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, AttDist, 1, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, AttDist, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, AttDist, 1, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, AttDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, AttDist, 0) + end + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3003_Dist_max +function Kyu_DoguKishi412000_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 30 + local AttDist = Att3003_Dist_max - 0.2 + local Odds_Guard = 0 + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3003, TARGET_ENE_0, AttDist, 1, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3004, TARGET_ENE_0, AttDist, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3005_Dist_max +function Kyu_DoguKishi412000_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 30 + local AttDist = Att3005_Dist_max - 2.2 + local Odds_Guard = 0 + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3005, TARGET_ENE_0, AttDist, 1, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3004, TARGET_ENE_0, AttDist, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_max +function Kyu_DoguKishi412000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 30 + local AttDist = Att3006_Dist_max + 1 + local Odds_Guard = 0 + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + if ai:IsFinishTimer(0) == false then + goal:AddSubGoal(GOAL_COMMON_Wait, 0.35, TARGET_ENE_0, 0, 0, 0) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, AttDist, 1, 90) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3007_Dist_max +function Kyu_DoguKishi412000_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 30 + local AttDist = Att3007_Dist_max + 0.5 + local Odds_Guard = 0 + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3007, TARGET_ENE_0, AttDist, 1, 90) + ai:SetTimer(0, 7) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function Kyu_DoguKishi412000_Act06(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, POINT_INITIAL, 2, TARGET_ENE_0, false, -1) + return +end + +function Kyu_DoguKishi412000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Kyu_DoguKishi412000Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3005_Dist_max +Att3000_Dist_min = Att3006_Dist_max +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3003_Dist_max +function Kyu_DoguKishi412000Battle_Interupt(ai, goal) + local distGuardBreak_Act = 6.5 + local oddsGuardBreak_Act = 35 + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local Odds_Guard = 0 + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if 4 <= targetDist then + if fate <= 50 then + local AttDist = Att3005_Dist_max + 0.8 + local DashDist = Att3005_Dist_max + 30 + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 1, 3005, TARGET_ENE_0, AttDist, 1, 90) + else + local AttDist = Att3006_Dist_max + 1 + local DashDist = Att3006_Dist_max + 30 + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 1, 3006, TARGET_ENE_0, AttDist, 1, 90) + end + elseif fate <= 50 then + local AttDist = Att3000_Dist_max + 0.5 + local DashDist = Att3000_Dist_max + 30 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 1, 3000, TARGET_ENE_0, AttDist, 1, 90) + else + local AttDist = Att3003_Dist_max + 0.8 + local DashDist = Att3003_Dist_max + 30 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 1, 3003, TARGET_ENE_0, AttDist, 1, 90) + end + return true + else + local distResNear = 6.5 + local distResFar = 20 + local oddsResNear = 60 + local oddsResFar = 85 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + if 4 <= targetDist then + if fate <= 50 then + local AttDist = Att3005_Dist_max + 0.8 + local DashDist = Att3005_Dist_max + 30 + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 1, 3005, TARGET_ENE_0, AttDist, 1, 90) + else + local AttDist = Att3006_Dist_max + 1 + local DashDist = Att3006_Dist_max + 30 + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 1, 3006, TARGET_ENE_0, AttDist, 1, 90) + end + elseif fate <= 50 then + local AppDist = Att3000_Dist_max + local AttDist = Att3000_Dist_max + 0.5 + local DashDist = Att3000_Dist_max + 30 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 1, 3000, TARGET_ENE_0, AttDist, 1, 90) + else + local AppDist = Att3003_Dist_max + local AttDist = Att3003_Dist_max + 0.8 + local DashDist = Att3003_Dist_max + 30 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 1, 3003, TARGET_ENE_0, AttDist, 1, 90) + end + return true + elseif ResBehavID == 2 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, TARGET_ENE_0, 4, TARGET_SELF, false, -1) + return true + else + return false + end + end +end + +return diff --git a/scripts_decompiled/413000_battle.lua b/scripts_decompiled/413000_battle.lua new file mode 100644 index 0000000..b46cc49 --- /dev/null +++ b/scripts_decompiled/413000_battle.lua @@ -0,0 +1,600 @@ +REGISTER_GOAL(GOAL_Kyu_Jujin413000_Battle, "Kyu_Jujin413000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 2.5 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 2 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 2 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 2.5 +local Att3004_Dist_min = 4 +local Att3004_Dist_max = 9 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 3 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 100 +local Att3007_Dist_min = 0 +local Att3007_Dist_max = 2.5 +local Att3010_Dist_min = 0 +local Att3010_Dist_max = 2 +local Att3011_Dist_min = 0 +local Att3011_Dist_max = 2 +local Att3012_Dist_min = 0 +local Att3012_Dist_max = 1 +local Att3013_Dist_min = 2 +local Att3013_Dist_max = 4 +local Att3014_Dist_min = 0 +local Att3014_Dist_max = 2 +local Att3015_Dist_min = 0 +local Att3015_Dist_max = 2 +local Att3016_Dist_min = 0 +local Att3016_Dist_max = 100 +REGISTER_GOAL_NO_UPDATE(GOAL_Kyu_Jujin413000_Battle, 1) +function OnIf_413000(ai, goal, codeNo) + if codeNo == 0 then + Kyu_Jujin413000_ActAfter_RealTime(ai, goal) + end + return +end + +function Kyu_Jujin413000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act09Per = 0 + local Act07Per = 0 + local Act08Per = 0 + local Act10Per = 0 + local Act11Per = 0 + local Act13Per = 0 + local Act14Per = 0 + local Act15Per = 0 + local Act16Per = 0 + local Act20Per = 0 + local targetDist = ai:GetDist(TARGET_ENE_0) + local distY = ai:GetDistY(TARGET_ENE_0) + local eventNo = ai:GetEventRequest() + if eventNo == 10 then + Act10Per = 100 + elseif 20 <= distY then + Act20Per = 100 + elseif ai:GetNpcThinkParamID() <= 413009 then + if ai:GetTeamOrder(ORDER_TYPE_Role) == ROLE_TYPE_Attack then + if ai:GetNumber(0) == 0 then + ai:SetTimer(0, ai:GetRandam_Int(8, 12)) + ai:SetNumber(0, 1) + end + if 4 <= targetDist then + Act01Per = 20 + Act02Per = 0 + Act03Per = 0 + Act04Per = 10 + Act05Per = 40 + Act06Per = 10 + Act09Per = 20 + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 270) then + Act05Per = 0 + end + elseif 2 <= targetDist then + Act01Per = 25 + Act02Per = 0 + Act03Per = 0 + Act04Per = 25 + Act05Per = 0 + Act06Per = 25 + Act09Per = 25 + elseif 1 <= targetDist then + Act01Per = 20 + Act02Per = 30 + Act03Per = 30 + Act04Per = 0 + Act05Per = 0 + Act06Per = 0 + Act09Per = 20 + else + Act01Per = 20 + Act02Per = 30 + Act03Per = 50 + Act04Per = 0 + Act05Per = 0 + Act06Per = 0 + Act09Per = 0 + end + elseif ai:GetTeamOrder(ORDER_TYPE_Role) == ROLE_TYPE_Torimaki then + if ai:GetNumber(0) == 0 then + ai:SetTimer(0, ai:GetRandam_Int(18, 22)) + ai:SetNumber(0, 1) + end + Act01Per = 3 + Act04Per = 2 + Act05Per = 3 + Act06Per = 2 + Act07Per = 45 + Act08Per = 45 + Act09Per = 0 + elseif ai:GetTeamOrder(ORDER_TYPE_Role) == ROLE_TYPE_Kankyaku then + if ai:GetNumber(0) == 0 then + ai:SetTimer(0, ai:GetRandam_Int(38, 42)) + ai:SetNumber(0, 1) + end + Act07Per = 50 + Act08Per = 50 + end + elseif ai:GetTeamOrder(ORDER_TYPE_Role) == ROLE_TYPE_Attack then + if ai:GetNumber(0) == 0 then + ai:SetTimer(0, ai:GetRandam_Int(8, 12)) + ai:SetNumber(0, 1) + end + if 6 <= targetDist then + Act11Per = 25 + Act13Per = 25 + Act14Per = 50 + Act15Per = 0 + Act16Per = 0 + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 270) then + Act14Per = 0 + end + elseif 4 <= targetDist then + Act11Per = 33 + Act13Per = 33 + Act14Per = 34 + Act15Per = 0 + Act16Per = 0 + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 270) then + Act14Per = 0 + end + elseif 2 <= targetDist then + Act11Per = 50 + Act13Per = 50 + Act14Per = 0 + Act15Per = 0 + Act16Per = 0 + elseif 1 <= targetDist then + Act11Per = 50 + Act13Per = 50 + Act14Per = 0 + Act15Per = 0 + Act16Per = 0 + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 150) then + Act15Per = 50 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 150) then + Act16Per = 50 + end + else + Act11Per = 50 + Act13Per = 50 + Act14Per = 0 + Act15Per = 0 + Act16Per = 0 + end + elseif ai:GetTeamOrder(ORDER_TYPE_Role) == ROLE_TYPE_Torimaki then + if ai:GetNumber(0) == 0 then + ai:SetTimer(0, ai:GetRandam_Int(18, 22)) + ai:SetNumber(0, 1) + end + Act11Per = 20 + Act07Per = 40 + Act08Per = 40 + elseif ai:GetTeamOrder(ORDER_TYPE_Role) == ROLE_TYPE_Kankyaku then + if ai:GetNumber(0) == 0 then + ai:SetTimer(0, ai:GetRandam_Int(38, 42)) + ai:SetNumber(0, 1) + end + Act07Per = 50 + Act08Per = 50 + end + if ai:GetNpcThinkParamID() <= 413009 then + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per) + if fateAct <= Act01Per then + Kyu_Jujin413000_Act01(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per then + Kyu_Jujin413000_Act02(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per then + Kyu_Jujin413000_Act03(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + Kyu_Jujin413000_Act04(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + Kyu_Jujin413000_Act05(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + Kyu_Jujin413000_Act06(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + Kyu_Jujin413000_Act07(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per then + Kyu_Jujin413000_Act08(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per then + Kyu_Jujin413000_Act09(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per then + Kyu_Jujin413000_Act10(ai, goal) + GetWellSpace_Odds = 0 + else + Kyu_Jujin413000_Act20(ai, goal) + GetWellSpace_Odds = 0 + end + else + local fateAct = ai:GetRandam_Int(1, Act11Per + Act13Per + Act14Per + Act15Per + Act16Per + Act07Per + Act08Per) + if fateAct <= Act11Per then + Kyu_Jujin413000_Act11(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act11Per + Act13Per then + Kyu_Jujin413000_Act13(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act11Per + Act13Per + Act14Per then + Kyu_Jujin413000_Act14(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act11Per + Act13Per + Act14Per + Act15Per then + Kyu_Jujin413000_Act15(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act11Per + Act13Per + Act14Per + Act15Per + Act16Per then + Kyu_Jujin413000_Act16(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act11Per + Act13Per + Act14Per + Act15Per + Act16Per + Act07Per then + Kyu_Jujin413000_Act07(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act11Per + Act13Per + Act14Per + Act15Per + Act16Per + Act07Per + Act08Per then + Kyu_Jujin413000_Act08(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act11Per + Act13Per + Act14Per + Act15Per + Act16Per + Act07Per + Act08Per + Act10Per then + Kyu_Jujin413000_Act10(ai, goal) + GetWellSpace_Odds = 0 + else + Kyu_Jujin413000_Act20(ai, goal) + GetWellSpace_Odds = 0 + end + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + Kyu_Jujin413000_ActAfter_AdjustSpace(ai, goal) + end + return +end + +Att3000_Dist_min = Att3000_Dist_max +function Kyu_Jujin413000_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 4 + local Odds_Guard = 0 + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, AppDist, 1, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, AppDist, 1, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3007, TARGET_ENE_0, AppDist, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3001_Dist_max +function Kyu_Jujin413000_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3001_Dist_max + local DashDist = Att3001_Dist_max + 4 + local Odds_Guard = 0 + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3001, TARGET_ENE_0, AppDist, 1, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3002_Dist_max +function Kyu_Jujin413000_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 4 + local Odds_Guard = 0 + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, AppDist, 1, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3003_Dist_max +function Kyu_Jujin413000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3003, TARGET_ENE_0, AppDist, 1, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3004_Dist_max +Att3000_Dist_min = Att3004_Dist_min +function Kyu_Jujin413000_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + local Odds_Guard = 0 + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 3004, TARGET_ENE_0, 0, AI_DIR_TYPE_F, Att3004_Dist_min) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 3008, TARGET_ENE_0, 0, AI_DIR_TYPE_F, Att3004_Dist_min) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3005_Dist_max +function Kyu_Jujin413000_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 0 + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3005, TARGET_ENE_0, AppDist, 1, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Kyu_Jujin413000_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = 10 + local DashDist = 12 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_KeepDist, 3, TARGET_ENE_0, 8, 12, TARGET_ENE_0, true, -1) + return +end + +function Kyu_Jujin413000_Act08(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, -1) + return +end + +Att3000_Dist_min = Att3007_Dist_max +function Kyu_Jujin413000_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 4 + local Odds_Guard = 0 + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3007, TARGET_ENE_0, AppDist, 1, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Kyu_Jujin413000_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 30, POINT_INITIAL, 2, TARGET_SELF, false, -1) + return +end + +Att3000_Dist_min = Att3010_Dist_max +function Kyu_Jujin413000_Act11(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3010_Dist_max + local DashDist = Att3010_Dist_max + 0 + local Odds_Guard = 0 + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + if fate <= 25 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, AppDist, 1, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, AppDist, 1, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, AppDist, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3012_Dist_max +function Kyu_Jujin413000_Act13(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3012_Dist_max + local DashDist = Att3012_Dist_max + 0 + local Odds_Guard = 0 + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, AppDist, 1, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3013_Dist_max +function Kyu_Jujin413000_Act14(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3013_Dist_max + local DashDist = Att3013_Dist_max + 0 + local Odds_Guard = 0 + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3003, TARGET_ENE_0, AppDist, 1, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3014_Dist_max +function Kyu_Jujin413000_Act15(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3014_Dist_max + local DashDist = Att3014_Dist_max + 0 + local Odds_Guard = 0 + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3004, TARGET_ENE_0, AppDist, 1, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3015_Dist_max +function Kyu_Jujin413000_Act16(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3015_Dist_max + local DashDist = Att3015_Dist_max + 0 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3005, TARGET_ENE_0, AppDist, 1, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function Kyu_Jujin413000_Act20(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, POINT_INITIAL, 2, TARGET_ENE_0, false, -1) + return +end + +function Kyu_Jujin413000_ActAfter_AdjustSpace(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_If, 10, 0) + return +end + +function Kyu_Jujin413000_ActAfter_RealTime(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local bRight = ai:GetRandam_Int(0, 1) + local targetDist = ai:GetDist(TARGET_ENE_0) + local targetDist_F = ai:GetDist(TARGET_FRI_0) + local GW_time = ai:GetRandam_Int(3, 5) + local GW_angle = ai:GetRandam_Int(45, 60) + if ai:GetNpcThinkParamID() <= 413009 then + if ai:GetTeamOrder(ORDER_TYPE_Role) == ROLE_TYPE_Attack then + if ai:IsFinishTimer(0) == true then + if fate <= 33 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3006, TARGET_ENE_0, DIST_None) + elseif ai:IsInsideTarget(TARGET_FRI_0, AI_DIR_TYPE_L, 120) then + if fate2 <= 20 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + elseif fate2 <= 80 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + ai:SetNumber(0, 0) + elseif ai:IsInsideTarget(TARGET_FRI_0, AI_DIR_TYPE_L, 120) then + if fate > 15 then + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, GW_time, TARGET_ENE_0, 4, TARGET_ENE_0, true, -1) + elseif fate <= 90 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, GW_time, TARGET_ENE_0, 1, GW_angle, true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, GW_time, TARGET_ENE_0, 0, GW_angle, true, true, -1) + end + end + elseif ai:IsInsideTarget(TARGET_FRI_0, AI_DIR_TYPE_R, 90) then + if fate > 15 then + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, GW_time, TARGET_ENE_0, 4, TARGET_ENE_0, true, -1) + elseif fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, GW_time, TARGET_ENE_0, 1, GW_angle, true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, GW_time, TARGET_ENE_0, 0, GW_angle, true, true, -1) + end + end + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, GW_time, TARGET_ENE_0, 4, TARGET_ENE_0, true, -1) + end + elseif ai:GetTeamOrder(ORDER_TYPE_Role) == ROLE_TYPE_Torimaki then + if ai:IsFinishTimer(0) == true then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3006, TARGET_ENE_0, DIST_None) + ai:SetNumber(0, 0) + end + elseif ai:GetTeamOrder(ORDER_TYPE_Role) == ROLE_TYPE_Kankyaku and ai:IsFinishTimer(0) == true then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3006, TARGET_ENE_0, DIST_None) + ai:SetNumber(0, 0) + end + elseif ai:GetTeamOrder(ORDER_TYPE_Role) == ROLE_TYPE_Attack then + if ai:IsFinishTimer(0) == true then + if fate <= 33 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3006, TARGET_ENE_0, DIST_None) + elseif ai:IsInsideTarget(TARGET_FRI_0, AI_DIR_TYPE_L, 90) then + if fate2 <= 20 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + elseif fate2 <= 80 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + ai:SetNumber(0, 0) + elseif ai:IsInsideTarget(TARGET_FRI_0, AI_DIR_TYPE_L, 120) then + if fate > 15 then + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, GW_time, TARGET_ENE_0, 4, TARGET_ENE_0, true, -1) + elseif fate <= 90 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, GW_time, TARGET_ENE_0, 1, GW_angle, true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, GW_time, TARGET_ENE_0, 0, GW_angle, true, true, -1) + end + end + elseif ai:IsInsideTarget(TARGET_FRI_0, AI_DIR_TYPE_R, 120) then + if fate > 15 then + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, GW_time, TARGET_ENE_0, 4, TARGET_ENE_0, true, -1) + elseif fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, GW_time, TARGET_ENE_0, 1, GW_angle, true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, GW_time, TARGET_ENE_0, 0, GW_angle, true, true, -1) + end + end + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, GW_time, TARGET_ENE_0, 4, TARGET_ENE_0, true, -1) + end + elseif ai:GetTeamOrder(ORDER_TYPE_Role) == ROLE_TYPE_Torimaki then + if ai:IsFinishTimer(0) == true then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3006, TARGET_ENE_0, DIST_None) + ai:SetNumber(0, 0) + end + elseif ai:GetTeamOrder(ORDER_TYPE_Role) == ROLE_TYPE_Kankyaku and ai:IsFinishTimer(0) == true then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3006, TARGET_ENE_0, DIST_None) + ai:SetNumber(0, 0) + end + return +end + +function Kyu_Jujin413000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Kyu_Jujin413000Battle_Terminate(ai, goal) + return +end + +function Kyu_Jujin413000Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/415000_battle.lua b/scripts_decompiled/415000_battle.lua new file mode 100644 index 0000000..9753ce7 --- /dev/null +++ b/scripts_decompiled/415000_battle.lua @@ -0,0 +1,492 @@ +REGISTER_GOAL(GOAL_ShinenBito415000_Battle, "ShinenBito415000Battle") +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 1.5 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 1.5 +local Att3007_Dist_min = 3 +local Att3007_Dist_max = 5 +local Att3008_Dist_min = 3 +local Att3008_Dist_max = 5 +local Att3009_Dist_min = 0 +local Att3009_Dist_max = 1 +REGISTER_GOAL_NO_UPDATE(GOAL_ShinenBito415000_Battle, 1) +function OnIf_415000(ai, goal, codeNo) + if codeNo == 0 then + ShinenBito415000_ActAfter_RealTime(ai, goal) + end + return +end + +function ShinenBito415000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act08Per = 0 + local Act10Per = 0 + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local insane = 1 + if ai:GetNpcThinkParamID() <= 415019 then + insane = 0.5 + end + if ai:GetNumber(2) == 0 then + ai:SetTimer(2, ai:GetRandam_Int(10, 20)) + ai:SetNumber(2, 1) + end + if ai:GetTeamOrder(ORDER_TYPE_Role) == ROLE_TYPE_Attack then + if fate <= 50 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 90) then + Act08Per = 100 + elseif 6 <= targetDist then + Act01Per = 10 + Act02Per = 10 + Act03Per = 50 + Act04Per = 30 + Act05Per = 0 + if ai:GetNumber(3) == 1 then + Act03Per = 80 * insane + Act04Per = 0 + else + Act03Per = 0 + Act04Per = 80 * insane + end + elseif 4 <= targetDist then + Act01Per = 25 + Act02Per = 25 + Act03Per = 30 + Act04Per = 20 + Act05Per = 0 + if ai:GetNumber(3) == 1 then + Act03Per = 50 * insane + Act04Per = 0 + else + Act03Per = 0 + Act04Per = 50 * insane + end + elseif 3 <= targetDist then + Act01Per = 25 + Act02Per = 25 + Act03Per = 20 + Act04Per = 20 + Act05Per = 10 * insane + if ai:GetNumber(3) == 1 then + Act03Per = 40 * insane + Act04Per = 0 + else + Act03Per = 0 + Act04Per = 40 * insane + end + elseif 2 <= targetDist then + Act01Per = 30 + Act02Per = 30 + Act03Per = 10 + Act04Per = 10 + Act05Per = 20 * insane + if ai:GetNumber(3) == 1 then + Act03Per = 20 * insane + Act04Per = 0 + else + Act03Per = 0 + Act04Per = 20 * insane + end + else + Act01Per = 40 + Act02Per = 40 + Act03Per = 0 + Act04Per = 0 + Act05Per = 20 * insane + end + elseif ai:GetTeamOrder(ORDER_TYPE_Role) == ROLE_TYPE_Torimaki then + Act01Per = 5 + Act02Per = 5 + Act03Per = 5 + Act04Per = 7 + Act05Per = 8 + Act06Per = 35 + Act07Per = 35 + elseif ai:GetTeamOrder(ORDER_TYPE_Role) == ROLE_TYPE_Kankyaku then + Act06Per = 50 + Act07Per = 50 + end + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act10Per) + if fateAct <= Act01Per then + ShinenBito415000_Act01(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per then + ShinenBito415000_Act02(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per then + ShinenBito415000_Act03(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + ShinenBito415000_Act04(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + ShinenBito415000_Act05(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + ShinenBito415000_Act06(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + ShinenBito415000_Act07(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per then + ShinenBito415000_Act08(ai, goal) + GetWellSpace_Odds = 0 + else + ShinenBito415000_Act10(ai, goal) + GetWellSpace_Odds = 0 + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + ShinenBito415000_ActAfter_AdjustSpace(ai, goal) + end + return +end + +Att3002_Dist_min = Att3002_Dist_max +function ShinenBito415000_Act01(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local AppDist = Att3002_Dist_max + local DashDist = 0 + local Odds_Guard = 0 + local AttDist = Att3002_Dist_max + local targetDist = ai:GetDist(TARGET_ENE_0) + if ai:GetNpcThinkParamID() <= 415019 and fate <= 60 then + DashDist = Att3002_Dist_max + 2.5 + end + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + if fate2 <= 33 then + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, AttDist, 0) + elseif fate2 <= 66 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3002, TARGET_ENE_0, AttDist, 1, 30, 0, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, AttDist, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3002, TARGET_ENE_0, AttDist, 1, 30, 0, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3003, TARGET_ENE_0, AttDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3004, TARGET_ENE_0, AttDist, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3002_Dist_min = Att3005_Dist_max +function ShinenBito415000_Act02(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local AppDist = Att3005_Dist_max + local DashDist = 0 + local Odds_Guard = 0 + local AttDist = Att3005_Dist_max + local targetDist = ai:GetDist(TARGET_ENE_0) + if ai:GetNpcThinkParamID() <= 415019 and fate <= 60 then + DashDist = Att3005_Dist_max + 2.5 + end + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3005, TARGET_ENE_0, AttDist, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3005, TARGET_ENE_0, AttDist, 1, 30, 0, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3006, TARGET_ENE_0, AttDist, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3002_Dist_min = Att3007_Dist_max +function ShinenBito415000_Act03(ai, goal, paramTbl) + local AppDist = Att3007_Dist_max + local DashDist = 0 + local Odds_Guard = 0 + local AttDist = Att3007_Dist_max + local targetDist = ai:GetDist(TARGET_ENE_0) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3007, TARGET_ENE_0, AttDist, 1, 90) + ai:SetNumber(3, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3002_Dist_min = Att3008_Dist_max +function ShinenBito415000_Act04(ai, goal, paramTbl) + local AppDist = Att3008_Dist_max + local DashDist = 0 + local Odds_Guard = 0 + local AttDist = Att3008_Dist_max + local targetDist = ai:GetDist(TARGET_ENE_0) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3008, TARGET_ENE_0, AttDist, 1, 90) + ai:SetNumber(3, 1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3002_Dist_min = Att3009_Dist_max +function ShinenBito415000_Act05(ai, goal, paramTbl) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3009_Dist_max + local DashDist = 0 + local Odds_Guard = 0 + local AttDist = Att3009_Dist_max + local targetDist = ai:GetDist(TARGET_ENE_0) + if ai:GetNpcThinkParamID() <= 415019 and fate <= 60 then + DashDist = Att3009_Dist_max + 2 + end + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3009, TARGET_ENE_0, AttDist, 1, 30) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function ShinenBito415000_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = 10 + local DashDist = 12 + local Odds_Guard = 0 + local targetDist = ai:GetDist(TARGET_ENE_0) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_KeepDist, 3, TARGET_ENE_0, 8, 12, TARGET_ENE_0, true, -1) + return +end + +function ShinenBito415000_Act07(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, -1) + return +end + +function ShinenBito415000_Act08(ai, goal, paramTbl) + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3013, TARGET_ENE_0, DIST_None, 0, 90) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3012, TARGET_ENE_0, DIST_None, 0, 90) + end + return +end + +function ShinenBito415000_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_Wait, 0.1, TARGET_NONE, 0, 0, 0) + return +end + +function ShinenBito415000_ActAfter_AdjustSpace(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_If, 10, 0) + return +end + +function ShinenBito415000_ActAfter_RealTime(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if ai:GetTeamOrder(ORDER_TYPE_Role) == ROLE_TYPE_Attack then + if ai:IsFinishTimer(2) == true then + if targetDist <= 4 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + end + if fate > 33 then + if fate <= 66 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + end + if fate2 <= 33 then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3010, TARGET_ENE_0, DIST_None) + end + ai:SetNumber(2, 0) + elseif ai:GetNpcThinkParamID() <= 415019 then + if fate > 25 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + elseif fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, -1) + elseif fate > 33 then + if fate <= 58 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + elseif fate <= 66 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + elseif fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + elseif fate <= 87 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, 4, TARGET_ENE_0, true, -1) + elseif 4 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, -1) + end + end + elseif ai:GetTeamOrder(ORDER_TYPE_Role) == ROLE_TYPE_Torimaki then + if ai:IsFinishTimer(2) == true then + if targetDist <= 4 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + end + if fate > 33 then + if fate <= 66 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + end + if fate2 <= 66 then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3010, TARGET_ENE_0, DIST_None) + end + ai:SetNumber(2, 0) + end + elseif ai:GetTeamOrder(ORDER_TYPE_Role) == ROLE_TYPE_Kankyaku and ai:IsFinishTimer(2) == true then + if targetDist <= 4 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + end + if fate > 33 then + if fate <= 66 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + end + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3010, TARGET_ENE_0, DIST_None) + ai:SetNumber(2, 0) + end + return +end + +function ShinenBito415000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function ShinenBito415000Battle_Terminate(ai, goal) + return +end + +Att3002_Dist_min = Att3007_Dist_max +Att3002_Dist_min = Att3005_Dist_max +function ShinenBito415000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distResponse = 3 + local oddsResponse = 15 + local oddsStep = 100 + local bkStepPer = 50 + local leftStepPer = 25 + local rightStepPer = 25 + local safetyDist = 4 + local oddsLeaveAndSide = 0 + local timeSide = 0 + local distLeave = 0 + if FindAttack_Step_or_Guard(ai, goal, distResponse, oddsResponse, oddsStep, bkStepPer, leftStepPer, rightStepPer, safetyDist, oddsLeaveAndSide, timeSide, distLeave) then + return true + end + local distResponse = 3 + local oddsResponse = 25 + local oddsStep = 100 + local bkStepPer = 50 + local leftStepPer = 25 + local rightStepPer = 25 + local safetyDist = 4 + local oddsLeaveAndSide = 0 + local timeSide = 0 + local distLeave = 0 + if Damaged_Step_or_Guard(ai, goal, distResponse, oddsResponse, oddsStep, bkStepPer, leftStepPer, rightStepPer, safetyDist, oddsLeaveAndSide, timeSide, distLeave) then + return true + end + local distGuardBreak_Act = 4 + local oddsGuardBreak_Act = 33 + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + return true + end + local distMissSwing_Int = 2 + local oddsMissSwing_Int = 50 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if 4 <= targetDist then + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + else + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + local distUseItem_Act = 4 + local oddsUseItem_Act = 30 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if 4 <= targetDist then + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + else + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + local distResNear = 5 + local distResFar = 10 + local oddsResNear = 0 + local oddsResFar = 50 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + elseif ResBehavID == 2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + end + local oddsResponse = 10 + local bkStepPer = 50 + local leftStepPer = 25 + local rightStepPer = 25 + local safetyDist = 3 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/415000_logic.lua b/scripts_decompiled/415000_logic.lua new file mode 100644 index 0000000..b5eaabe --- /dev/null +++ b/scripts_decompiled/415000_logic.lua @@ -0,0 +1,41 @@ +REGISTER_LOGIC_FUNC(LOGIC_ID_ShinenBito415000, "ShinenBito415000_Logic", "ShinenBito415000_Interupt") +function ShinenBito415000_Logic(ai) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if ai:GetNumber(1) == 0 then + ai:SetTimer(1, ai:GetRandam_Int(30, 60)) + ai:SetNumber(1, 1) + end + if ai:IsChangeState() then + if ai:IsBattleState() then + if ai:HasSpecialEffectId(TARGET_SELF, 5402) then + if ai:GetNpcThinkParamID() <= 415009 then + if fate <= 33 and 8 <= targetDist then + ai:AddTopGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, 2, 5) + else + ai:AddTopGoal(GOAL_COMMON_AttackTunableSpin, 10, 3014, TARGET_ENE_0, DIST_Middle, 2, 5) + end + elseif fate <= 5 and 8 <= targetDist then + ai:AddTopGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, 2, 5) + else + ai:AddTopGoal(GOAL_COMMON_AttackTunableSpin, 10, 3014, TARGET_ENE_0, DIST_Middle, 2, 5) + end + ai:SetNumber(0, 1) + end + elseif ai:IsFindState() and ai:IsCautionState() and ai:GetNumber(0) == 1 then + ai:AddTopGoal(GOAL_COMMON_NonspinningAttack, 10, 3001, TARGET_ENE_0, DIST_Middle) + ai:SetNumber(0, 0) + end + elseif ai:IsSearchTarget(TARGET_ENE_0) == false and ai:IsFinishTimer(1) == true then + ai:AddTopGoal(GOAL_COMMON_AttackTunableSpin, 10, 3011, TARGET_ENE_0, DIST_Middle, 2, 5) + ai:SetNumber(1, 0) + end + COMMON_EasySetup3(ai) + return +end + +function ShinenBito415000_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/416000_battle.lua b/scripts_decompiled/416000_battle.lua new file mode 100644 index 0000000..1c34575 --- /dev/null +++ b/scripts_decompiled/416000_battle.lua @@ -0,0 +1,430 @@ +REGISTER_GOAL(GOAL_ShinenBito_Sorcerer416000_Battle, "ShinenBito_Sorcerer416000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 1 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 2 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 30 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 10 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 10 +local Att3007_Dist_min = 0 +local Att3007_Dist_max = 1 +REGISTER_GOAL_NO_UPDATE(GOAL_ShinenBito_Sorcerer416000_Battle, 1) +function OnIf_416000(ai, goal, codeNo) + if codeNo == 0 then + ShinenBito_Sorcerer416000_ActAfter_RealTime(ai, goal) + end + return +end + +Att3000_Dist_min = Att3003_Dist_min +Att3000_Dist_min = Att3003_Dist_max +function ShinenBito_Sorcerer416000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = 1 + local fate3 = 1 + local fate4 = 1 + if ai:GetNpcThinkParamID() == 416022 then + local local0 = 0 + SETUPVAL 10 0 0 + local0 = 20 + SETUPVAL 10 1 0 + end + if ai:IsFinishTimer(0) == true then + fate2 = 1 + else + fate2 = 0.5 + end + if ai:IsFinishTimer(1) == true then + fate3 = 1 + else + fate3 = 0 + end + if ai:IsFinishTimer(2) == true then + fate4 = 1 + else + fate4 = 0.5 + end + if ai:GetNumber(0) == 1 then + fate2 = 4 + fate3 = 4 + fate4 = 4 + ai:SetNumber(0, 0) + end + if fate <= 50 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 90) then + actPerArr[20] = 100 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1212032) and ai:IsInsideTargetRegion(TARGET_SELF, 1212033) then + actPerArr[1] = 33 + actPerArr[2] = 33 + actPerArr[3] = 34 + elseif 10 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 0 + actPerArr[5] = 30 + actPerArr[10] = 70 + actPerArr[11] = 0 + actPerArr[12] = 0 + elseif 7 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 0 + actPerArr[5] = 20 + actPerArr[10] = 30 * fate2 + actPerArr[11] = 30 * fate3 + actPerArr[12] = 20 * fate4 + if ai:GetNpcThinkParamID() <= 416019 then + actPerArr[10] = 80 * fate2 + actPerArr[11] = 0 + actPerArr[12] = 0 + end + elseif 4 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 0 + actPerArr[5] = 10 + actPerArr[10] = 30 * fate2 + actPerArr[11] = 20 * fate3 + actPerArr[12] = 40 * fate4 + if ai:GetNpcThinkParamID() <= 416019 then + actPerArr[10] = 90 * fate2 + actPerArr[11] = 0 + actPerArr[12] = 0 + end + elseif 2 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 30 + actPerArr[3] = 30 + actPerArr[5] = 0 + actPerArr[10] = 20 * fate2 + actPerArr[11] = 0 * fate3 + actPerArr[12] = 0 * fate4 + else + actPerArr[1] = 30 + actPerArr[2] = 30 + actPerArr[3] = 30 + actPerArr[5] = 0 + actPerArr[10] = 0 * fate2 + actPerArr[11] = 0 * fate3 + actPerArr[12] = 10 * fate4 + if ai:GetNpcThinkParamID() <= 416019 then + actPerArr[12] = 0 + end + end + actFuncArr[1] = REGIST_FUNC(ai, goal, ShinenBito_Sorcerer416000_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, ShinenBito_Sorcerer416000_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, ShinenBito_Sorcerer416000_Act03) + actFuncArr[5] = REGIST_FUNC(ai, goal, ShinenBito_Sorcerer416000_Act05) + actFuncArr[10] = REGIST_FUNC(ai, goal, ShinenBito_Sorcerer416000_Act10) + actFuncArr[11] = REGIST_FUNC(ai, goal, ShinenBito_Sorcerer416000_Act11) + actFuncArr[12] = REGIST_FUNC(ai, goal, ShinenBito_Sorcerer416000_Act12) + actFuncArr[20] = REGIST_FUNC(ai, goal, ShinenBito_Sorcerer416000_Act20) + local atkAfterFunc = REGIST_FUNC(ai, goal, ShinenBito_Sorcerer416000_ActAfter_AdjustSpace) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function ShinenBito_Sorcerer416000_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max + 0 + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + local AttDist = Att3000_Dist_max + 1 + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1212032) and ai:IsInsideTargetRegion(TARGET_SELF, 1212033) then + DashDist = Att3000_Dist_max + 0 + end + if AppDist <= targetDist and (ai:GetNpcThinkParamID() ~= 416001 or ai:GetNpcThinkParamID() == 416001 and ai:IsInsideTargetRegion(TARGET_ENE_0, 1212030)) then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + if fate <= 33 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, AttDist, 0, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, AttDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, AttDist, 0) + end + GetWellSpace_Odds = 80 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3007_Dist_max +Att3000_Dist_min = Att3000_Dist_max +function ShinenBito_Sorcerer416000_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3007_Dist_max + 0 + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 0 + local AttDist = Att3007_Dist_max + 1 + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1212032) and ai:IsInsideTargetRegion(TARGET_SELF, 1212033) then + DashDist = Att3000_Dist_max + 0 + end + if AppDist <= targetDist and (ai:GetNpcThinkParamID() ~= 416001 or ai:GetNpcThinkParamID() == 416001 and ai:IsInsideTargetRegion(TARGET_ENE_0, 1212030)) then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3007, TARGET_ENE_0, AttDist, 0, 90) + GetWellSpace_Odds = 80 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3002_Dist_max +Att3000_Dist_min = Att3000_Dist_max +function ShinenBito_Sorcerer416000_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3002_Dist_max + 0 + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 0 + local AttDist = Att3002_Dist_max + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1212032) and ai:IsInsideTargetRegion(TARGET_SELF, 1212033) then + DashDist = Att3000_Dist_max + 0 + end + if AppDist <= targetDist and (ai:GetNpcThinkParamID() ~= 416001 or ai:GetNpcThinkParamID() == 416001 and ai:IsInsideTargetRegion(TARGET_ENE_0, 1212030)) then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, AttDist, 0, 90) + GetWellSpace_Odds = 80 + return GetWellSpace_Odds +end + +function ShinenBito_Sorcerer416000_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, ai:GetRandam_Float(1.8, 3), TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(120, 120), true, true, -1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3003_Dist_max +function ShinenBito_Sorcerer416000_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 5 + local Odds_Guard = 0 + local AttDist = Att3003_Dist_max + if ai:GetNpcThinkParamID() ~= 416001 or ai:GetNpcThinkParamID() == 416001 and ai:IsInsideTargetRegion(TARGET_ENE_0, 1212030) then + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + elseif targetDist < 6 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 140) and ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_B, 5) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 3, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) and ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_L, 5) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 3, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 180) and ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_R, 5) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 3, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + end + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3003, TARGET_ENE_0, DIST_None, 0, 180) + ai:SetTimer(0, 5) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3004_Dist_max +function ShinenBito_Sorcerer416000_Act11(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 4 + local Odds_Guard = 0 + local AttDist = Att3004_Dist_max + if ai:GetNpcThinkParamID() ~= 416001 or ai:GetNpcThinkParamID() == 416001 and ai:IsInsideTargetRegion(TARGET_ENE_0, 1212030) then + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + elseif targetDist < 6 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 140) and ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_B, 5) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 3, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) and ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_L, 5) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 3, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 180) and ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_R, 5) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 3, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + end + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3004, TARGET_ENE_0, DIST_None, 0, 70) + ai:SetTimer(1, 30) + GetWellSpace_Odds = 50 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3005_Dist_max +function ShinenBito_Sorcerer416000_Act12(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 0 + local AttDist = Att3005_Dist_max + if AppDist <= targetDist and (ai:GetNpcThinkParamID() ~= 416001 or ai:GetNpcThinkParamID() == 416001 and ai:IsInsideTargetRegion(TARGET_ENE_0, 1212030)) then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + if ai:GetNpcThinkParamID() == 416001 and not ai:IsInsideTargetRegion(TARGET_ENE_0, 1212031) then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2, TARGET_ENE_0, 2, TARGET_ENE_0, true, -1) + end + if ai:GetNpcThinkParamID() ~= 416001 or ai:GetNpcThinkParamID() == 416001 and ai:IsInsideTargetRegion(TARGET_ENE_0, 1212031) then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3005, TARGET_ENE_0, DIST_None, 0, 90, 10, 10) + end + ai:SetTimer(2, 5) + GetWellSpace_Odds = 50 + return GetWellSpace_Odds +end + +function ShinenBito_Sorcerer416000_Act20(ai, goal, paramTbl) + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3009, TARGET_ENE_0, DIST_None, 0, 90) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3008, TARGET_ENE_0, DIST_None, 0, 90) + end + return +end + +function ShinenBito_Sorcerer416000_ActAfter_RealTime(ai, goal) + local GW_fate = ai:GetRandam_Int(1, 100) + local fate = ai:GetRandam_Int(1, 100) + local bRight = ai:GetRandam_Int(0, 1) + local targetDist = ai:GetDist(TARGET_ENE_0) + if targetDist <= 3 then + if GW_fate <= 100 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 140) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 3, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + ai:SetNumber(0, 1) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 3, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 3, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + elseif fate <= 0 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 2, TARGET_ENE_0, bRight, ai:GetRandam_Int(120, 120), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2, TARGET_ENE_0, 4, TARGET_ENE_0, true, -1) + end + elseif targetDist <= 5 then + if GW_fate <= 80 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 140) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 3, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + ai:SetNumber(0, 1) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then + local local0 = oal + local0:AddSubGoal(GOAL_COMMON_SpinStep, 3, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 3, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + elseif fate <= 0 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 2, TARGET_ENE_0, bRight, ai:GetRandam_Int(120, 120), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2, TARGET_ENE_0, 7, TARGET_ENE_0, true, -1) + end + elseif targetDist <= 10 then + if GW_fate <= 40 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 140) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 3, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + ai:SetNumber(0, 1) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 3, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 3, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + elseif fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 2, TARGET_ENE_0, bRight, ai:GetRandam_Int(120, 120), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2, TARGET_ENE_0, 10, TARGET_ENE_0, true, -1) + end + elseif targetDist <= 15 then + if GW_fate <= 50 then + if fate <= 100 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 2, TARGET_ENE_0, bRight, ai:GetRandam_Int(120, 120), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2, TARGET_ENE_0, 12, TARGET_ENE_0, true, -1) + end + elseif ai:IsFinishTimer(3) == true then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, DIST_None, 0, 90) + ai:SetTimer(3, ai:GetRandam_Int(7, 11)) + end + elseif GW_fate <= 25 then + if fate <= 100 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 2, TARGET_ENE_0, bRight, ai:GetRandam_Int(120, 120), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2, TARGET_ENE_0, 12, TARGET_ENE_0, true, -1) + end + elseif ai:IsFinishTimer(3) == true then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, DIST_None, 0, 90) + ai:SetTimer(3, ai:GetRandam_Int(7, 11)) + end + return +end + +function ShinenBito_Sorcerer416000_ActAfter_AdjustSpace(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_If, 10, 0) + return +end + +function ShinenBito_Sorcerer416000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function ShinenBito_Sorcerer416000Battle_Terminate(ai, goal) + return +end + +function ShinenBito_Sorcerer416000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distNearRes = 5 + local oddsNearRes = 40 + if Damaged_Act(ai, goal, distNearRes, oddsNearRes) then + goal:ClearSubGoal() + if targetDist <= 3 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + ai:SetNumber(0, 1) + elseif targetDist <= 6 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + ai:SetNumber(0, 1) + elseif fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + end + return true + else + local distResNear = 10 + local distResFar = 20 + local oddsResNear = 30 + local oddsResFar = 50 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + return true + elseif ResBehavID == 2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + return true + else + return false + end + end +end + +return diff --git a/scripts_decompiled/417000_battle.lua b/scripts_decompiled/417000_battle.lua new file mode 100644 index 0000000..f130b2e --- /dev/null +++ b/scripts_decompiled/417000_battle.lua @@ -0,0 +1,663 @@ +REGISTER_GOAL(GOAL_HumanityS417000_Battle, "HumanityS417000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 5 +local Att3003_Dist_min = 7 +local Att3003_Dist_max = 9 +local Att3004_Dist_min = 4 +local Att3004_Dist_max = 6 +local Att3005_Dist_min = 10 +local Att3005_Dist_max = 14 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 20 +local Att3007_Dist_min = 4 +local Att3007_Dist_max = 5.5 +local Att3008_Dist_min = 0 +local Att3008_Dist_max = 2 +local Att3010_Dist_min = 0 +local Att3010_Dist_max = 2 +local Att3011_Dist_min = 0 +local Att3011_Dist_max = 2 +local Att3012_Dist_min = 0 +local Att3012_Dist_max = 2 +REGISTER_GOAL_NO_UPDATE(GOAL_HumanityS417000_Battle, 1) +function OnIf_417000(ai, goal, codeNo) + if codeNo == 0 then + ai:SetTimer(0, 25) + end + if codeNo == 1 then + ai:SetTimer(1, 10) + end + if codeNo == 2 then + HumanityS417000_ActAfter(ai, goal) + end + if codeNo == 3 then + ai:SetTimer(2, 7) + end + return +end + +function HumanityS417000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + ai:SetNumber(0, 0) + local hprate = ai:GetHpRate(TARGET_SELF) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = 1 + if ai:IsFinishTimer(1) == true then + fate3 = 1 + else + fate3 = 2 + end + if targetDist <= 3 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 120) and fate <= 70 then + actPerArr[10] = 100 + elseif targetDist <= 2.8 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 180) and fate <= 70 and ai:IsFinishTimer(2) == true then + actPerArr[11] = 100 + elseif hprate <= 0.25 and 0.1 <= hprate and fate2 <= 10 and ai:IsFinishTimer(0) == true and 1 <= ai:GetNumber(1) then + actPerArr[12] = 100 + elseif hprate <= 0.8 and 0.1 <= hprate and fate2 <= 10 and ai:IsFinishTimer(0) == true and 1 <= ai:GetNumber(1) then + actPerArr[12] = 100 + elseif hprate <= 1 and 0.1 <= hprate and fate2 <= 0 and ai:IsFinishTimer(0) == true and 1 <= ai:GetNumber(1) then + actPerArr[12] = 100 + elseif hprate <= 0.25 and fate2 <= 100 and ai:GetNumber(1) == 2 then + actPerArr[12] = 100 + elseif hprate <= 0.5 and fate2 <= 80 and ai:GetNumber(1) == 1 then + actPerArr[12] = 100 + elseif hprate <= 0.8 and fate2 <= 70 and ai:GetNumber(1) == 0 then + actPerArr[12] = 100 + elseif hprate == 1 and ai:GetNumber(2) == 0 then + actPerArr[7] = 100 + elseif hprate < 1 and fate2 <= 10 and 7 <= targetDist and ai:GetNumber(1) == 1 then + actPerArr[7] = 100 + elseif hprate < 1 and fate2 <= 20 and 15 <= targetDist and ai:GetNumber(1) == 1 then + actPerArr[7] = 100 + elseif 15 <= targetDist then + actPerArr[1] = 0 + actPerArr[3] = 20 + actPerArr[4] = 15 + actPerArr[5] = 40 + actPerArr[6] = 0 + actPerArr[8] = 5 + actPerArr[9] = 0 + elseif 10 <= targetDist then + actPerArr[1] = 5 + actPerArr[3] = 20 + actPerArr[4] = 20 + actPerArr[5] = 20 * fate3 + actPerArr[6] = 0 + actPerArr[8] = 35 + actPerArr[9] = 0 + elseif 7 <= targetDist then + actPerArr[1] = 5 + actPerArr[3] = 30 + actPerArr[4] = 30 + actPerArr[5] = 15 * fate3 + actPerArr[6] = 0 + actPerArr[8] = 20 * fate3 + actPerArr[9] = 0 + elseif 5 <= targetDist then + actPerArr[1] = 45 + actPerArr[3] = 20 * fate3 + actPerArr[4] = 20 * fate3 + actPerArr[5] = 0 + actPerArr[6] = 0 + actPerArr[8] = 15 * fate3 + actPerArr[9] = 0 + elseif 3 <= targetDist then + actPerArr[1] = 55 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 15 + actPerArr[8] = 15 * fate3 + actPerArr[9] = 15 + else + actPerArr[1] = 55 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 25 + actPerArr[8] = 0 + actPerArr[9] = 20 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, HumanityS417000_Act01) + actFuncArr[3] = REGIST_FUNC(ai, goal, HumanityS417000_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, HumanityS4170000_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, HumanityS417000_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, HumanityS417000_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, HumanityS417000_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, HumanityS417000_Act08) + actFuncArr[9] = REGIST_FUNC(ai, goal, HumanityS417000_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, HumanityS417000_Act10) + actFuncArr[11] = REGIST_FUNC(ai, goal, HumanityS417000_Act11) + actFuncArr[12] = REGIST_FUNC(ai, goal, HumanityS417000_Act12) + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanityS417000_ActAfter_AdjustSpace) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function HumanityS417000_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 1 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate2 <= 10 then + if fate <= 70 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 5) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, AppDist, -1, 50) + else + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 5) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, AppDist, -1, 50) + end + elseif fate2 <= 50 then + if fate <= 50 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 5) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, AppDist, -1, 50) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, AppDist, 0) + elseif fate <= 70 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 5) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3002, TARGET_ENE_0, AppDist, -1, 50) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, AppDist, 0) + elseif fate <= 90 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 5) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, AppDist, -1, 50) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, AppDist, 0) + else + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 5) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, AppDist, -1, 50) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3011, TARGET_ENE_0, AppDist, 0) + end + elseif fate <= 75 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 5) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, AppDist, -1, 50) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, AppDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3014, TARGET_ENE_0, AppDist, 0) + else + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 5) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, AppDist, -1, 50) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, AppDist, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3011, TARGET_ENE_0, AppDist, 0) + end + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 50 + else + GetWellSpace_Odds = 70 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3004_Dist_max +function HumanityS417000_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3004 + local AttDist = Att3004_Dist_max + ai:SetTimer(1, 0) + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 5) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, AttDist, 0) + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 30 + else + GetWellSpace_Odds = 70 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3007_Dist_max +function HumanityS417000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + ai:SetTimer(1, 0) + if fate <= 70 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 5) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DashDist, 0) + else + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 5) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3007, TARGET_ENE_0, AppDist, -1, 25) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3011, TARGET_ENE_0, AppDist, 0) + end + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 30 + else + GetWellSpace_Odds = 70 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3005_Dist_max +Att3000_Dist_min = Att3005_Dist_min +function HumanityS417000_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3005 + local AttDist = Att3005_Dist_max + 2 + local Distmin = Att3005_Dist_min - 2 + local Distmax = Att3005_Dist_max + ai:SetTimer(1, 0) + if Distmin <= targetDist and targetDist <= Distmax then + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3005, TARGET_ENE_0, AttDist, 0) + elseif targetDist <= Distmin then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 5, 3005, TARGET_ENE_0, AttDist, 0) + else + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 5) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 5, 3005, TARGET_ENE_0, AttDist, 0) + end + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 20 + else + GetWellSpace_Odds = 100 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3011_Dist_max +function HumanityS417000_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3011_Dist_max + local DashDist = Att3011_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3011 + local AttDist = DIST_Middle + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 5) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 6, 3011, TARGET_ENE_0, AppDist, 0, 50) + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 30 + else + GetWellSpace_Odds = 70 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_max +function HumanityS417000_Act07(ai, goal, paramTbl) + local AppDist = Att3006_Dist_max + ai:SetNumber(2, 1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3006, TARGET_ENE_0, AppDist, -1, 50) + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 30 + else + GetWellSpace_Odds = 50 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3003_Dist_max +function HumanityS417000_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3003 + local AttDist = Att3003_Dist_max + 2 + local fate = ai:GetRandam_Int(1, 100) + ai:SetTimer(1, 0) + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 5) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3003, TARGET_ENE_0, AppDist, -1, 50) + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 20 + else + GetWellSpace_Odds = 60 + end + elseif fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3003, TARGET_ENE_0, AppDist, -1, 50) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3009, TARGET_ENE_0, AppDist, 0) + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 10 + else + GetWellSpace_Odds = 80 + end + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3003, TARGET_ENE_0, AppDist, -1, 50) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3009, TARGET_ENE_0, AppDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3009, TARGET_ENE_0, AppDist, 0) + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 50 + else + GetWellSpace_Odds = 100 + end + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3010_Dist_max +function HumanityS417000_Act09(ai, goal, paramTbl) + local AppDist = Att3010_Dist_max + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3010, TARGET_ENE_0, AppDist, -1, 50) + goal:AddSubGoal(GOAL_COMMON_If, 10, 1) + elseif fate2 <= 35 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 5, 3010, TARGET_ENE_0, AppDist, -1, 50) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3006, TARGET_ENE_0, AppDist, 0) + elseif fate2 <= 65 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 5, 3010, TARGET_ENE_0, AppDist, -1, 50) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3007, TARGET_ENE_0, AppDist, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 5, 3010, TARGET_ENE_0, AppDist, -1, 50) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, AppDist, 0) + end + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 30 + else + GetWellSpace_Odds = 80 + end + return GetWellSpace_Odds +end + +function HumanityS417000_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AttDist = 3 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 3, 3008, TARGET_ENE_0, AttDist, 0, -1) + goal:AddSubGoal(GOAL_COMMON_If, 10, 1) + elseif fate2 <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 3, 3008, TARGET_ENE_0, AttDist, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3004, TARGET_ENE_0, AttDist, 0) + elseif fate2 <= 45 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 3, 3008, TARGET_ENE_0, AttDist, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3007, TARGET_ENE_0, AttDist, 0) + elseif fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 3, 3008, TARGET_ENE_0, AttDist, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, AttDist, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 3, 3008, TARGET_ENE_0, AttDist, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3005, TARGET_ENE_0, AttDist, 0) + end + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 30 + else + GetWellSpace_Odds = 80 + end + return GetWellSpace_Odds +end + +function HumanityS417000_Act11(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AttDist = 8 + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_If, 10, 3) + if fate <= 90 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 3, 3012, TARGET_ENE_0, AttDist, 0, -1) + ai:SetNumber(0, 1) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 2.5, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 3, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + goal:AddSubGoal(GOAL_COMMON_If, 10, 1) + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 10 + else + GetWellSpace_Odds = 70 + end + return GetWellSpace_Odds +end + +function HumanityS417000_Act12(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local hprate = ai:GetHpRate(TARGET_SELF) + local AttDist = 20 + local fate = ai:GetRandam_Int(1, 100) + if targetDist <= 4 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 700, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 60) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + end + if targetDist <= 8 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 240) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 700, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 5) + end + end + goal:AddSubGoal(GOAL_COMMON_If, 10, 0) + if hprate <= 0.25 then + ai:SetNumber(1, 3) + elseif hprate <= 0.5 then + ai:SetNumber(1, 2) + elseif hprate <= 0.8 then + ai:SetNumber(1, 1) + else + ai:SetNumber(1, 0) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3013, TARGET_ENE_0, AttDist, 0, -1) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 1.5, TARGET_ENE_0, 9, TARGET_ENE_0, true, -1) + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 0 + else + GetWellSpace_Odds = 0 + end + return GetWellSpace_Odds +end + +function HumanityS417000_ActAfter(ai, goal) + local GW_fate = ai:GetRandam_Int(1, 100) + local fate = ai:GetRandam_Int(1, 100) + local bRight = ai:GetRandam_Int(0, 1) + local targetDist = ai:GetDist(TARGET_ENE_0) + if targetDist <= 2 then + if GW_fate <= 80 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 700, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 60) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + goal:AddSubGoal(GOAL_COMMON_If, 10, 1) + elseif GW_fate <= 100 then + if fate <= 0 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 2.5, TARGET_ENE_0, bRight, ai:GetRandam_Int(30, 45), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 3, TARGET_ENE_0, true, -1) + end + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, AppDist, -1, 50) + end + elseif targetDist <= 5 then + if GW_fate <= 65 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 700, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 60) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + goal:AddSubGoal(GOAL_COMMON_If, 10, 1) + elseif GW_fate <= 90 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3.5, TARGET_ENE_0, bRight, ai:GetRandam_Int(30, 45), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3.5, TARGET_ENE_0, 3, TARGET_ENE_0, true, -1) + end + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, AppDist, -1, 50) + end + elseif targetDist <= 10 then + if GW_fate <= 25 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 700, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 60) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + goal:AddSubGoal(GOAL_COMMON_If, 10, 1) + elseif GW_fate <= 80 then + if fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3.5, TARGET_ENE_0, bRight, ai:GetRandam_Int(30, 45), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3.5, TARGET_ENE_0, 3, TARGET_ENE_0, true, -1) + end + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, AppDist, -1, 50) + end + elseif GW_fate <= 0 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 700, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 60) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + goal:AddSubGoal(GOAL_COMMON_If, 10, 1) + elseif GW_fate <= 75 then + if fate <= 100 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 5, TARGET_ENE_0, bRight, ai:GetRandam_Int(30, 45), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 3, TARGET_ENE_0, true, -1) + end + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, AppDist, -1, 50) + end + return +end + +function HumanityS417000_ActAfter_AdjustSpace(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_If, 10, 2) + return +end + +function HumanityS417000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function HumanityS417000Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3004_Dist_max +Att3000_Dist_min = Att3003_Dist_max +Att3000_Dist_min = Att3005_Dist_max +function HumanityS417000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if ai:IsInterupt(INTERUPT_TargetIsGuard) and ai:GetNumber(0) == 1 then + ai:SetNumber(0, 0) + goal:ClearSubGoal() + if fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 2, 3000, TARGET_ENE_0, DIST_Middle, -1) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + end + return true + else + local distDamagedStep = 3 + local oddsDamagedStep = 30 + local bkStepPer = 50 + local leftStepPer = 25 + local rightStepPer = 25 + local safetyDist = 5 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distMissSwing_Int = 3 + local oddsMissSwing_Int = 30 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + goal:AddSubGoal(GOAL_COMMON_Attack, 2, 3000, TARGET_ENE_0, DIST_Middle, 0) + return true + else + local distUseItem_Act = 20 + local oddsUseItem_Act = 30 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + local AtkDist1 = Att3000_Dist_max + local AtkDist2 = Att3004_Dist_max + local AtkDist3 = Att3003_Dist_max + local AtkDist4 = Att3005_Dist_max + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 0 + goal:ClearSubGoal() + if targetDist <= 5 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 2, 3000, TARGET_ENE_0, AtkDist1, -1, 50) + elseif targetDist <= 7 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 2, 3004, TARGET_ENE_0, AtkDist2, -1, 50) + elseif targetDist <= 10 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 2, 3003, TARGET_ENE_0, AtkDist3, -1, 50) + else + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 2) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 3, 3005, TARGET_ENE_0, AtkDist4, -1, 50) + end + return true + else + local distResNear = 6 + local distResFar = 20 + local oddsResNear = 60 + local oddsResFar = 80 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 0 + if ResBehavID == 1 then + if fate <= 80 then + if targetDist <= 5 then + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3000, TARGET_ENE_0, DIST_Middle, 0) + elseif targetDist <= 7 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 2, 3004, TARGET_ENE_0, AtkDist2, -1, 50) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 2, 3003, TARGET_ENE_0, AtkDist3, -1, 50) + end + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + return true + elseif ResBehavID == 2 then + if fate <= 60 then + if targetDist <= 11 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 2, 3003, TARGET_ENE_0, AtkDist3, -1, 50) + else + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 2) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 3, 3005, TARGET_ENE_0, AtkDist4, -1, 50) + end + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + return true + else + return false + end + end + end + end + end +end + +return diff --git a/scripts_decompiled/417100_battle.lua b/scripts_decompiled/417100_battle.lua new file mode 100644 index 0000000..953c049 --- /dev/null +++ b/scripts_decompiled/417100_battle.lua @@ -0,0 +1,173 @@ +REGISTER_GOAL(GOAL_HumanityM417100_Battle, "HumanityM417100Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 0.5 +REGISTER_GOAL_NO_UPDATE(GOAL_HumanityM417100_Battle, 1) +function OnIf_417100(ai, goal, codeNo) + if codeNo == 0 then + HumanityM417100_ActAfter(ai, goal) + end + return +end + +function HumanityM417100Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local hprate = ai:GetHpRate(TARGET_SELF) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = 1 + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 120) then + actPerArr[10] = 100 + elseif 2 <= targetDist then + actPerArr[2] = 100 + else + actPerArr[1] = 100 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, HumanityM417100_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, HumanityM417100_Act02) + actFuncArr[10] = REGIST_FUNC(ai, goal, HumanityM417100_Act10) + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanityM417100_ActAfter_AdjustSpace) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function HumanityM417100_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3000_Dist_max + 0 + local DashDist = Att3000_Dist_max + 0 + local Odds_Guard = 0 + local AttDist = Att3000_Dist_max + 0 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate <= 80 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, AttDist, 0, 90) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3001, TARGET_ENE_0, DIST_None, 0, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3000_Dist_max +function HumanityM417100_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3000_Dist_max + 0 + local DashDist = Att3000_Dist_max + 0 + local Odds_Guard = 0 + local AttDist = Att3000_Dist_max + 0 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate <= 60 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, AttDist, 0, 90) + elseif fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_KeepDist, 3, TARGET_ENE_0, 1, 4, TARGET_ENE_0, true, -1) + elseif fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, bRight, ai:GetRandam_Int(120, 120), true, true, -1) + elseif fate <= 90 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, 6, TARGET_SELF, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3001, TARGET_ENE_0, DIST_None, 0, 90) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function HumanityM417100_Act10(ai, goal, paramTbl) + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3021, TARGET_ENE_0, DIST_None, 0, 90) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 180) then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3020, TARGET_ENE_0, DIST_None, 0, 90) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3021, TARGET_ENE_0, DIST_None, 0, 90) + end + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function HumanityM417100_ActAfter(ai, goal) + local GW_fate = ai:GetRandam_Int(1, 100) + local fate = ai:GetRandam_Int(1, 100) + local bRight = ai:GetRandam_Int(0, 1) + local targetDist = ai:GetDist(TARGET_ENE_0) + if targetDist <= 2 then + if fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, bRight, ai:GetRandam_Int(120, 120), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, 4, TARGET_SELF, true, -1) + end + elseif targetDist <= 5 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, bRight, ai:GetRandam_Int(120, 120), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, 7, TARGET_SELF, true, -1) + end + elseif fate <= 100 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 4, TARGET_ENE_0, bRight, ai:GetRandam_Int(120, 120), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 4, TARGET_ENE_0, 10, TARGET_SELF, true, -1) + end + return +end + +function HumanityM417100_ActAfter_AdjustSpace(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_If, 10, 0) + return +end + +function HumanityM417100Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function HumanityM417100Battle_Terminate(ai, goal) + return +end + +function HumanityM417100Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distUseItem_Act = 20 + local oddsUseItem_Act = 100 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, TARGET_ENE_0, 0, TARGET_SELF, true, -1) + return true + else + local distResNear = 10 + local distResFar = 30 + local oddsResNear = 100 + local oddsResFar = 100 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + local bRight = ai:GetRandam_Int(0, 1) + if ResBehavID == 1 then + if fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, TARGET_ENE_0, 0, TARGET_SELF, true, -1) + elseif fate <= 85 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, bRight, ai:GetRandam_Int(60, 90), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 3, 3001, TARGET_ENE_0, DIST_None, 0, 90) + end + return true + elseif ResBehavID == 2 then + if fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, 0, TARGET_SELF, true, -1) + elseif fate <= 100 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 2, TARGET_ENE_0, bRight, ai:GetRandam_Int(60, 90), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 3, 3001, TARGET_ENE_0, DIST_None, 0, 90) + end + return true + else + return false + end + end +end + +return diff --git a/scripts_decompiled/417200_battle.lua b/scripts_decompiled/417200_battle.lua new file mode 100644 index 0000000..0ce31db --- /dev/null +++ b/scripts_decompiled/417200_battle.lua @@ -0,0 +1,663 @@ +REGISTER_GOAL(GOAL_HumanityL417200_Battle, "HumanityL417200Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 5 +local Att3003_Dist_min = 7 +local Att3003_Dist_max = 9 +local Att3004_Dist_min = 4 +local Att3004_Dist_max = 6 +local Att3005_Dist_min = 10 +local Att3005_Dist_max = 14 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 20 +local Att3007_Dist_min = 4 +local Att3007_Dist_max = 5.5 +local Att3008_Dist_min = 0 +local Att3008_Dist_max = 2 +local Att3010_Dist_min = 0 +local Att3010_Dist_max = 2 +local Att3011_Dist_min = 0 +local Att3011_Dist_max = 2 +local Att3012_Dist_min = 0 +local Att3012_Dist_max = 2 +REGISTER_GOAL_NO_UPDATE(GOAL_HumanityL417200_Battle, 1) +function OnIf_417200(ai, goal, codeNo) + if codeNo == 0 then + ai:SetTimer(0, 25) + end + if codeNo == 1 then + ai:SetTimer(1, 10) + end + if codeNo == 2 then + HumanityL417200_ActAfter(ai, goal) + end + if codeNo == 3 then + ai:SetTimer(2, 7) + end + return +end + +function HumanityL417200Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + ai:SetNumber(0, 0) + local hprate = ai:GetHpRate(TARGET_SELF) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = 1 + if ai:IsFinishTimer(1) == true then + fate3 = 1 + else + fate3 = 2 + end + if targetDist <= 3 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 120) and fate <= 70 then + actPerArr[10] = 100 + elseif targetDist <= 2.8 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 180) and fate <= 70 and ai:IsFinishTimer(2) == true then + actPerArr[11] = 100 + elseif hprate <= 0.25 and 0.1 <= hprate and fate2 <= 10 and ai:IsFinishTimer(0) == true and 1 <= ai:GetNumber(1) then + actPerArr[12] = 100 + elseif hprate <= 0.8 and 0.1 <= hprate and fate2 <= 10 and ai:IsFinishTimer(0) == true and 1 <= ai:GetNumber(1) then + actPerArr[12] = 100 + elseif hprate <= 1 and 0.1 <= hprate and fate2 <= 0 and ai:IsFinishTimer(0) == true and 1 <= ai:GetNumber(1) then + actPerArr[12] = 100 + elseif hprate <= 0.25 and fate2 <= 100 and ai:GetNumber(1) == 2 then + actPerArr[12] = 100 + elseif hprate <= 0.5 and fate2 <= 80 and ai:GetNumber(1) == 1 then + actPerArr[12] = 100 + elseif hprate <= 0.8 and fate2 <= 70 and ai:GetNumber(1) == 0 then + actPerArr[12] = 100 + elseif hprate == 1 and ai:GetNumber(2) == 0 then + actPerArr[7] = 100 + elseif hprate < 1 and fate2 <= 10 and 7 <= targetDist and ai:GetNumber(1) == 1 then + actPerArr[7] = 100 + elseif hprate < 1 and fate2 <= 20 and 15 <= targetDist and ai:GetNumber(1) == 1 then + actPerArr[7] = 100 + elseif 15 <= targetDist then + actPerArr[1] = 0 + actPerArr[3] = 20 + actPerArr[4] = 15 + actPerArr[5] = 40 + actPerArr[6] = 0 + actPerArr[8] = 5 + actPerArr[9] = 0 + elseif 10 <= targetDist then + actPerArr[1] = 5 + actPerArr[3] = 20 + actPerArr[4] = 20 + actPerArr[5] = 20 * fate3 + actPerArr[6] = 0 + actPerArr[8] = 35 + actPerArr[9] = 0 + elseif 7 <= targetDist then + actPerArr[1] = 5 + actPerArr[3] = 30 + actPerArr[4] = 30 + actPerArr[5] = 15 * fate3 + actPerArr[6] = 0 + actPerArr[8] = 20 * fate3 + actPerArr[9] = 0 + elseif 5 <= targetDist then + actPerArr[1] = 45 + actPerArr[3] = 20 * fate3 + actPerArr[4] = 20 * fate3 + actPerArr[5] = 0 + actPerArr[6] = 0 + actPerArr[8] = 15 * fate3 + actPerArr[9] = 0 + elseif 3 <= targetDist then + actPerArr[1] = 55 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 15 + actPerArr[8] = 15 * fate3 + actPerArr[9] = 15 + else + actPerArr[1] = 55 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 25 + actPerArr[8] = 0 + actPerArr[9] = 20 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, HumanityL417200_Act01) + actFuncArr[3] = REGIST_FUNC(ai, goal, HumanityL417200_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, HumanityL4172000_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, HumanityL417200_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, HumanityL417200_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, HumanityL417200_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, HumanityL417200_Act08) + actFuncArr[9] = REGIST_FUNC(ai, goal, HumanityL417200_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, HumanityL417200_Act10) + actFuncArr[11] = REGIST_FUNC(ai, goal, HumanityL417200_Act11) + actFuncArr[12] = REGIST_FUNC(ai, goal, HumanityL417200_Act12) + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanityL417200_ActAfter_AdjustSpace) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function HumanityL417200_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 1 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate2 <= 10 then + if fate <= 70 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 5) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, AppDist, -1, 50) + else + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 5) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, AppDist, -1, 50) + end + elseif fate2 <= 50 then + if fate <= 50 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 5) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, AppDist, -1, 50) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, AppDist, 0) + elseif fate <= 70 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 5) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3002, TARGET_ENE_0, AppDist, -1, 50) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, AppDist, 0) + elseif fate <= 90 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 5) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, AppDist, -1, 50) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, AppDist, 0) + else + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 5) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, AppDist, -1, 50) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3011, TARGET_ENE_0, AppDist, 0) + end + elseif fate <= 75 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 5) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, AppDist, -1, 50) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, AppDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3014, TARGET_ENE_0, AppDist, 0) + else + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 5) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, AppDist, -1, 50) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, AppDist, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3011, TARGET_ENE_0, AppDist, 0) + end + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 50 + else + GetWellSpace_Odds = 70 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3004_Dist_max +function HumanityL417200_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3004 + local AttDist = Att3004_Dist_max + ai:SetTimer(1, 0) + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 5) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, AttDist, 0) + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 30 + else + GetWellSpace_Odds = 70 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3007_Dist_max +function HumanityL417200_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + ai:SetTimer(1, 0) + if fate <= 70 then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 5) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DashDist, 0) + else + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 5) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3007, TARGET_ENE_0, AppDist, -1, 25) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3011, TARGET_ENE_0, AppDist, 0) + end + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 30 + else + GetWellSpace_Odds = 70 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3005_Dist_max +Att3000_Dist_min = Att3005_Dist_min +function HumanityL417200_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3005 + local AttDist = Att3005_Dist_max + 2 + local Distmin = Att3005_Dist_min - 2 + local Distmax = Att3005_Dist_max + ai:SetTimer(1, 0) + if Distmin <= targetDist and targetDist <= Distmax then + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3005, TARGET_ENE_0, AttDist, 0) + elseif targetDist <= Distmin then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 5, 3005, TARGET_ENE_0, AttDist, 0) + else + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 5) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 5, 3005, TARGET_ENE_0, AttDist, 0) + end + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 20 + else + GetWellSpace_Odds = 100 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3011_Dist_max +function HumanityL417200_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3011_Dist_max + local DashDist = Att3011_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3011 + local AttDist = DIST_Middle + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 5) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 6, 3011, TARGET_ENE_0, AppDist, 0, 50) + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 30 + else + GetWellSpace_Odds = 70 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_max +function HumanityL417200_Act07(ai, goal, paramTbl) + local AppDist = Att3006_Dist_max + ai:SetNumber(2, 1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3006, TARGET_ENE_0, AppDist, -1, 50) + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 30 + else + GetWellSpace_Odds = 50 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3003_Dist_max +function HumanityL417200_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + local AttID = 3003 + local AttDist = Att3003_Dist_max + 2 + local fate = ai:GetRandam_Int(1, 100) + ai:SetTimer(1, 0) + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 5) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3003, TARGET_ENE_0, AppDist, -1, 50) + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 20 + else + GetWellSpace_Odds = 60 + end + elseif fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3003, TARGET_ENE_0, AppDist, -1, 50) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3009, TARGET_ENE_0, AppDist, 0) + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 10 + else + GetWellSpace_Odds = 80 + end + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3003, TARGET_ENE_0, AppDist, -1, 50) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3009, TARGET_ENE_0, AppDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3009, TARGET_ENE_0, AppDist, 0) + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 50 + else + GetWellSpace_Odds = 100 + end + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3010_Dist_max +function HumanityL417200_Act09(ai, goal, paramTbl) + local AppDist = Att3010_Dist_max + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3010, TARGET_ENE_0, AppDist, -1, 50) + goal:AddSubGoal(GOAL_COMMON_If, 10, 1) + elseif fate2 <= 35 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 5, 3010, TARGET_ENE_0, AppDist, -1, 50) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3006, TARGET_ENE_0, AppDist, 0) + elseif fate2 <= 65 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 5, 3010, TARGET_ENE_0, AppDist, -1, 50) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3007, TARGET_ENE_0, AppDist, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 5, 3010, TARGET_ENE_0, AppDist, -1, 50) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, AppDist, 0) + end + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 30 + else + GetWellSpace_Odds = 80 + end + return GetWellSpace_Odds +end + +function HumanityL417200_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AttDist = 3 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 3, 3008, TARGET_ENE_0, AttDist, 0, -1) + goal:AddSubGoal(GOAL_COMMON_If, 10, 1) + elseif fate2 <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 3, 3008, TARGET_ENE_0, AttDist, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3004, TARGET_ENE_0, AttDist, 0) + elseif fate2 <= 45 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 3, 3008, TARGET_ENE_0, AttDist, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3007, TARGET_ENE_0, AttDist, 0) + elseif fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 3, 3008, TARGET_ENE_0, AttDist, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, AttDist, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 3, 3008, TARGET_ENE_0, AttDist, 0, -1) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3005, TARGET_ENE_0, AttDist, 0) + end + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 30 + else + GetWellSpace_Odds = 80 + end + return GetWellSpace_Odds +end + +function HumanityL417200_Act11(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AttDist = 8 + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_If, 10, 3) + if fate <= 90 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 3, 3012, TARGET_ENE_0, AttDist, 0, -1) + ai:SetNumber(0, 1) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 2.5, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 3, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + goal:AddSubGoal(GOAL_COMMON_If, 10, 1) + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 10 + else + GetWellSpace_Odds = 70 + end + return GetWellSpace_Odds +end + +function HumanityL417200_Act12(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local hprate = ai:GetHpRate(TARGET_SELF) + local AttDist = 20 + local fate = ai:GetRandam_Int(1, 100) + if targetDist <= 4 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 700, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 60) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + end + if targetDist <= 8 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 240) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 700, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 5) + end + end + goal:AddSubGoal(GOAL_COMMON_If, 10, 0) + if hprate <= 0.25 then + ai:SetNumber(1, 3) + elseif hprate <= 0.5 then + ai:SetNumber(1, 2) + elseif hprate <= 0.8 then + ai:SetNumber(1, 1) + else + ai:SetNumber(1, 0) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3013, TARGET_ENE_0, AttDist, 0, -1) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 1.5, TARGET_ENE_0, 9, TARGET_ENE_0, true, -1) + if ai:HasSpecialEffectId(TARGET_SELF, 5510) then + GetWellSpace_Odds = 0 + else + GetWellSpace_Odds = 0 + end + return GetWellSpace_Odds +end + +function HumanityL417200_ActAfter(ai, goal) + local GW_fate = ai:GetRandam_Int(1, 100) + local fate = ai:GetRandam_Int(1, 100) + local bRight = ai:GetRandam_Int(0, 1) + local targetDist = ai:GetDist(TARGET_ENE_0) + if targetDist <= 2 then + if GW_fate <= 80 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 700, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 60) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + goal:AddSubGoal(GOAL_COMMON_If, 10, 1) + elseif GW_fate <= 100 then + if fate <= 0 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 2.5, TARGET_ENE_0, bRight, ai:GetRandam_Int(30, 45), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 3, TARGET_ENE_0, true, -1) + end + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, AppDist, -1, 50) + end + elseif targetDist <= 5 then + if GW_fate <= 65 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 700, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 60) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + goal:AddSubGoal(GOAL_COMMON_If, 10, 1) + elseif GW_fate <= 90 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3.5, TARGET_ENE_0, bRight, ai:GetRandam_Int(30, 45), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3.5, TARGET_ENE_0, 3, TARGET_ENE_0, true, -1) + end + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, AppDist, -1, 50) + end + elseif targetDist <= 10 then + if GW_fate <= 25 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 700, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 60) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + goal:AddSubGoal(GOAL_COMMON_If, 10, 1) + elseif GW_fate <= 80 then + if fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3.5, TARGET_ENE_0, bRight, ai:GetRandam_Int(30, 45), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3.5, TARGET_ENE_0, 3, TARGET_ENE_0, true, -1) + end + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, AppDist, -1, 50) + end + elseif GW_fate <= 0 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 700, TARGET_ENE_0, 0, AI_DIR_TYPE_F, 5) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 60) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + goal:AddSubGoal(GOAL_COMMON_If, 10, 1) + elseif GW_fate <= 75 then + if fate <= 100 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 5, TARGET_ENE_0, bRight, ai:GetRandam_Int(30, 45), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 3, TARGET_ENE_0, true, -1) + end + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, AppDist, -1, 50) + end + return +end + +function HumanityL417200_ActAfter_AdjustSpace(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_If, 10, 2) + return +end + +function HumanityL417200Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function HumanityL417200Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3004_Dist_max +Att3000_Dist_min = Att3003_Dist_max +Att3000_Dist_min = Att3005_Dist_max +function HumanityL417200Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if ai:IsInterupt(INTERUPT_TargetIsGuard) and ai:GetNumber(0) == 1 then + ai:SetNumber(0, 0) + goal:ClearSubGoal() + if fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 2, 3000, TARGET_ENE_0, DIST_Middle, -1) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + end + return true + else + local distDamagedStep = 3 + local oddsDamagedStep = 30 + local bkStepPer = 50 + local leftStepPer = 25 + local rightStepPer = 25 + local safetyDist = 5 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distMissSwing_Int = 3 + local oddsMissSwing_Int = 30 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + goal:AddSubGoal(GOAL_COMMON_Attack, 2, 3000, TARGET_ENE_0, DIST_Middle, 0) + return true + else + local distUseItem_Act = 20 + local oddsUseItem_Act = 30 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + local AtkDist1 = Att3000_Dist_max + local AtkDist2 = Att3004_Dist_max + local AtkDist3 = Att3003_Dist_max + local AtkDist4 = Att3005_Dist_max + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 0 + goal:ClearSubGoal() + if targetDist <= 5 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 2, 3000, TARGET_ENE_0, AtkDist1, -1, 50) + elseif targetDist <= 7 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 2, 3004, TARGET_ENE_0, AtkDist2, -1, 50) + elseif targetDist <= 10 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 2, 3003, TARGET_ENE_0, AtkDist3, -1, 50) + else + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 2) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 3, 3005, TARGET_ENE_0, AtkDist4, -1, 50) + end + return true + else + local distResNear = 6 + local distResFar = 20 + local oddsResNear = 60 + local oddsResFar = 80 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 0 + if ResBehavID == 1 then + if fate <= 80 then + if targetDist <= 5 then + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3000, TARGET_ENE_0, DIST_Middle, 0) + elseif targetDist <= 7 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 2, 3004, TARGET_ENE_0, AtkDist2, -1, 50) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 2, 3003, TARGET_ENE_0, AtkDist3, -1, 50) + end + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + return true + elseif ResBehavID == 2 then + if fate <= 60 then + if targetDist <= 11 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 2, 3003, TARGET_ENE_0, AtkDist3, -1, 50) + else + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 2) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 3, 3005, TARGET_ENE_0, AtkDist4, -1, 50) + end + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + return true + else + return false + end + end + end + end + end +end + +return diff --git a/scripts_decompiled/418000_battle.lua b/scripts_decompiled/418000_battle.lua new file mode 100644 index 0000000..e05024f --- /dev/null +++ b/scripts_decompiled/418000_battle.lua @@ -0,0 +1,471 @@ +REGISTER_GOAL(GOAL_Chainman418000_Battle, "Chainman418000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 3.5 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 3 +local Att3004_Dist_min = 3 +local Att3004_Dist_max = 5 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 2.5 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 3 +local Att3007_Dist_min = 0 +local Att3007_Dist_max = 1.5 +local Att3008_Dist_min = 0 +local Att3008_Dist_max = 2.5 +REGISTER_GOAL_NO_UPDATE(GOAL_Chainman418000_Battle, 1) +function OnIf_418000(ai, goal, codeNo) + if codeNo == 0 then + Chainman418000_ActAfter(ai, goal) + end + return +end + +function Chainman418000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local hprate = ai:GetHpRate(TARGET_SELF) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = 1 + ai:SetNumber(0, 0) + if targetDist <= 3 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 120) and fate <= 70 then + actPerArr[4] = 100 + elseif 7 <= targetDist then + actPerArr[1] = 15 + actPerArr[2] = 15 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 70 + actPerArr[6] = 0 + actPerArr[7] = 0 + elseif 4 <= targetDist then + actPerArr[1] = 25 + actPerArr[2] = 30 + actPerArr[3] = 15 + actPerArr[4] = 10 + actPerArr[5] = 20 + actPerArr[6] = 0 + actPerArr[7] = 0 + elseif 2 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 20 + actPerArr[3] = 20 + actPerArr[4] = 15 + actPerArr[5] = 0 + actPerArr[6] = 10 + actPerArr[7] = 15 + else + actPerArr[1] = 15 + actPerArr[2] = 10 + actPerArr[3] = 15 + actPerArr[4] = 15 + actPerArr[5] = 0 + actPerArr[6] = 30 + actPerArr[7] = 15 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, Chainman418000_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, Chainman418000_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, Chainman418000_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, Chainman418000_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, Chainman418000_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, Chainman418000_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, Chainman418000_Act07) + actFuncArr[10] = REGIST_FUNC(ai, goal, Chainman418000_Act10) + local atkAfterFunc = REGIST_FUNC(ai, goal, Chainman418000_ActAfter_AdjustSpace) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function Chainman418000_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3000_Dist_max + 0 + local DashDist = Att3000_Dist_max + 0 + local Odds_Guard = 0 + local AttDist = Att3000_Dist_max + 10 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local hprate = ai:GetHpRate(TARGET_ENE_0) + local targetDist_F = ai:GetDist(TARGET_FRI_0) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, AttDist, 0, 70) + elseif fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3010, TARGET_ENE_0, AttDist, 0, 70) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, AttDist, 0, 70) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, AttDist, 0) + end + if targetDist_F <= 15 and 0 <= targetDist_F then + GetWellSpace_Odds = 100 + else + GetWellSpace_Odds = 0 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3005_Dist_max +function Chainman418000_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3005_Dist_max + 0 + local DashDist = Att3005_Dist_max + 0 + local Odds_Guard = 0 + local AttDist = Att3005_Dist_max + 10 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local hprate = ai:GetHpRate(TARGET_ENE_0) + local targetDist_F = ai:GetDist(TARGET_FRI_0) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3005, TARGET_ENE_0, AttDist, 0, 70) + elseif fate <= 45 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3005, TARGET_ENE_0, AttDist, 0, 70) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3005, TARGET_ENE_0, AttDist, 0) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3005, TARGET_ENE_0, AttDist, 0, 70) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3000, TARGET_ENE_0, AttDist, 0) + elseif fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3005, TARGET_ENE_0, AttDist, 0, 70) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, AttDist, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3005, TARGET_ENE_0, AttDist, 0, 70) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, AttDist, 0) + end + if targetDist_F <= 15 and 0 <= targetDist_F then + GetWellSpace_Odds = 100 + else + GetWellSpace_Odds = 0 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3002_Dist_max +function Chainman418000_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3002_Dist_max + 0 + local DashDist = Att3002_Dist_max + 0 + local Odds_Guard = 0 + local AttDist = Att3002_Dist_max + 10 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist_F = ai:GetDist(TARGET_FRI_0) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + if fate2 <= 20 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, AttDist, 0, 70) + elseif fate2 <= 60 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3002, TARGET_ENE_0, AttDist, 0, 70) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3000, TARGET_ENE_0, AttDist, 0) + elseif fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, AttDist, 0, 70) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3000, TARGET_ENE_0, AttDist, 0) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, AttDist, 0, 70) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3005, TARGET_ENE_0, AttDist, 0) + end + elseif fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3002, TARGET_ENE_0, AttDist, 0, 70) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3003, TARGET_ENE_0, AttDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3000, TARGET_ENE_0, AttDist, 0) + elseif fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3002, TARGET_ENE_0, AttDist, 0, 70) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3003, TARGET_ENE_0, AttDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3005, TARGET_ENE_0, AttDist, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3002, TARGET_ENE_0, AttDist, 0, 70) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3003, TARGET_ENE_0, AttDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, AttDist, 0) + end + if targetDist_F <= 15 and 0 <= targetDist_F then + GetWellSpace_Odds = 100 + else + GetWellSpace_Odds = 50 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_max +function Chainman418000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3006_Dist_max + 0 + local DashDist = Att3006_Dist_max + 0 + local Odds_Guard = 0 + local AttDist = Att3006_Dist_max + 10 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist_F = ai:GetDist(TARGET_FRI_0) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, AttDist, 0, 70) + elseif fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3006, TARGET_ENE_0, AttDist, 0, 70) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, AttDist, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3006, TARGET_ENE_0, AttDist, 0, 70) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3005, TARGET_ENE_0, AttDist, 0) + end + if targetDist_F <= 15 and 0 <= targetDist_F then + GetWellSpace_Odds = 100 + else + GetWellSpace_Odds = 100 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3004_Dist_max +function Chainman418000_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3004_Dist_max + 0 + local DashDist = Att3004_Dist_max + 0 + local Odds_Guard = 0 + local AttDist = Att3004_Dist_max + 10 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local hprate = ai:GetHpRate(TARGET_ENE_0) + local targetDist_F = ai:GetDist(TARGET_FRI_0) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + if fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3004, TARGET_ENE_0, AttDist, 2, 20) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3004, TARGET_ENE_0, AttDist, 2, 20) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, AttDist, 0) + end + if targetDist_F <= 15 and 0 <= targetDist_F then + GetWellSpace_Odds = 100 + else + GetWellSpace_Odds = 0 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3007_Dist_max +function Chainman418000_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3007_Dist_max + 0 + local DashDist = Att3007_Dist_max + 0 + local Odds_Guard = 0 + local AttDist = Att3007_Dist_max + 10 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist_F = ai:GetDist(TARGET_FRI_0) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + if fate <= 0 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 3, 3007, TARGET_ENE_0, AttDist, 0, 20) + elseif fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 3, 3007, TARGET_ENE_0, AttDist, 0, 20) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, AttDist, 0) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 3, 3007, TARGET_ENE_0, AttDist, 0, 20) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3006, TARGET_ENE_0, AttDist, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 3, 3007, TARGET_ENE_0, AttDist, 0, 20) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3008, TARGET_ENE_0, AttDist, 0) + end + if targetDist_F <= 15 and 0 <= targetDist_F then + GetWellSpace_Odds = 100 + else + GetWellSpace_Odds = 50 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3008_Dist_max +function Chainman418000_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3008_Dist_max + 0 + local DashDist = Att3008_Dist_max + 0 + local Odds_Guard = 0 + local AttDist = Att3008_Dist_max + 10 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist_F = ai:GetDist(TARGET_FRI_0) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + if fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3008, TARGET_ENE_0, AttDist, 0, 70) + elseif fate <= 35 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3008, TARGET_ENE_0, AttDist, 0, 70) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3000, TARGET_ENE_0, AttDist, 0) + elseif fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3008, TARGET_ENE_0, AttDist, 0, 70) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3005, TARGET_ENE_0, AttDist, 0) + elseif fate <= 65 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3008, TARGET_ENE_0, AttDist, 0, 70) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, AttDist, 0) + elseif fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3008, TARGET_ENE_0, AttDist, 0, 70) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3006, TARGET_ENE_0, AttDist, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3008, TARGET_ENE_0, AttDist, 0, 70) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3008, TARGET_ENE_0, AttDist, 0) + end + if targetDist_F <= 15 and 0 <= targetDist_F then + GetWellSpace_Odds = 100 + else + GetWellSpace_Odds = 100 + end + return GetWellSpace_Odds +end + +function Chainman418000_Act10(ai, goal, paramTbl) + ai:SetEventMoveTarget(1212651) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 20, POINT_EVENT, 1, TARGET_SELF, true, -1) + return +end + +function Chainman418000_ActAfter(ai, goal) + local GW_fate = ai:GetRandam_Int(1, 100) + local fate = ai:GetRandam_Int(1, 100) + local bRight = ai:GetRandam_Int(0, 1) + local targetDist = ai:GetDist(TARGET_ENE_0) + local targetDist_F = ai:GetDist(TARGET_FRI_0) + local GW_time = ai:GetRandam_Int(4, 10) + local GW_angle = ai:GetRandam_Int(60, 90) + if targetDist_F <= 3 and 0 <= targetDist_F then + if ai:IsInsideTarget(TARGET_FRI_0, AI_DIR_TYPE_F, 100) then + if fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, GW_time, TARGET_ENE_0, 20, TARGET_ENE_0, true, -1) + elseif fate <= 90 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, GW_time, TARGET_ENE_0, 1, GW_angle, true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, GW_time, TARGET_ENE_0, 0, GW_angle, true, true, -1) + end + elseif ai:IsInsideTarget(TARGET_FRI_0, AI_DIR_TYPE_B, 100) then + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, GW_time, TARGET_ENE_0, 4, TARGET_SELF, true, -1) + elseif fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, GW_time, TARGET_ENE_0, 1, GW_angle, true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, GW_time, TARGET_ENE_0, 0, GW_angle, true, true, -1) + end + elseif ai:IsInsideTarget(TARGET_FRI_0, AI_DIR_TYPE_L, 180) then + if fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, GW_time, TARGET_ENE_0, 20, TARGET_ENE_0, true, -1) + elseif fate <= 90 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, GW_time, TARGET_ENE_0, 1, GW_angle, true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, GW_time, TARGET_ENE_0, 0, GW_angle, true, true, -1) + end + elseif ai:IsInsideTarget(TARGET_FRI_0, AI_DIR_TYPE_R, 180) then + if fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, GW_time, TARGET_ENE_0, 20, TARGET_ENE_0, true, -1) + elseif fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, GW_time, TARGET_ENE_0, 1, GW_angle, true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, GW_time, TARGET_ENE_0, 0, GW_angle, true, true, -1) + end + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, GW_time, TARGET_ENE_0, 20, TARGET_ENE_0, true, -1) + end + elseif targetDist <= 2 then + if fate <= 0 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, bRight, GW_angle, true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, 4, TARGET_ENE_0, true, -1) + end + elseif targetDist <= 5 then + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, bRight, GW_angle, true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, 6, TARGET_ENE_0, true, -1) + end + elseif targetDist <= 10 then + if fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, bRight, GW_angle, true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, 10, TARGET_ENE_0, true, -1) + end + elseif fate <= 100 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, bRight, GW_angle, true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, 10, TARGET_ENE_0, true, -1) + end + return +end + +function Chainman418000_ActAfter_AdjustSpace(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_If, 10, 0) + return +end + +function Chainman418000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Chainman418000Battle_Terminate(ai, goal) + return +end + +function Chainman418000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if ai:IsInsideTargetRegion(TARGET_SELF, 1212650) and ai:IsInterupt(INTERUPT_HitEnemyWall) then + goal:ClearSubGoal() + ai:SetEventMoveTarget(1212651) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 20, POINT_EVENT, 1, TARGET_ENE_0, true, -1) + ai:SetNumber(0, 1) + return true + elseif ai:IsInterupt(INTERUPT_Damaged) and ai:GetNumber(0) == 1 then + goal:ClearSubGoal() + ai:Replaning() + return false + elseif ai:IsInterupt(INTERUPT_Damaged) and fate <= 40 then + goal:ClearSubGoal() + ai:Replaning() + return false + else + local distUseItem_Act = 10 + local oddsUseItem_Act = 10 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + goal:ClearSubGoal() + if targetDist <= 3 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 2, 3005, TARGET_ENE_0, DIST_None, 0, 70) + elseif targetDist <= 5 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 2, 3004, TARGET_ENE_0, DIST_None, 0, 70) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, TARGET_ENE_0, 4, TARGET_SELF, false, -1) + end + return true + else + local distResNear = 4 + local distResFar = 20 + local oddsResNear = 40 + local oddsResFar = 70 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 2, 3000, TARGET_ENE_0, DIST_None, 0, 70) + return true + elseif ResBehavID == 2 then + if targetDist <= 5 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 2, 3004, TARGET_ENE_0, DIST_None, 2, 20) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, TARGET_ENE_0, 4, TARGET_SELF, false, -1) + end + return true + else + return false + end + end + end +end + +return diff --git a/scripts_decompiled/419000_battle.lua b/scripts_decompiled/419000_battle.lua new file mode 100644 index 0000000..08a80d1 --- /dev/null +++ b/scripts_decompiled/419000_battle.lua @@ -0,0 +1,235 @@ +REGISTER_GOAL(GOAL_BlackDragonsDog419000_Battle, "BlackDragonsDog419000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 1.1 +local Att3001_Dist_min = 1 +local Att3001_Dist_max = 3.5 +local Att3002_Dist_min = 1.5 +local Att3002_Dist_max = 3.6 +local Att3006_Dist_min = 1 +local Att3006_Dist_max = 2.3 +REGISTER_GOAL_NO_UPDATE(GOAL_BlackDragonsDog419000_Battle, 1) +function BlackDragonsDog419000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + if 6 <= targetDist then + actPerArr[1] = 40 + actPerArr[2] = 60 + actPerArr[3] = 0 + actPerArr[4] = 0 + elseif 1.5 <= targetDist then + actPerArr[1] = 25 + actPerArr[2] = 35 + actPerArr[3] = 40 + actPerArr[4] = 0 + else + actPerArr[1] = 20 + actPerArr[2] = 30 + actPerArr[3] = 40 + actPerArr[4] = 10 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, BlackDragonsDog419000_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, BlackDragonsDog419000_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, BlackDragonsDog419000_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, BlackDragonsDog419000_Act04) + local atkAfterFunc = REGIST_FUNC(ai, goal, BlackDragonsDog419000_ActAfter_AdjustSpace) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3006_Dist_max +Att3000_Dist_min = Att3000_Dist_max +function BlackDragonsDog419000_Act01(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local bRight = ai:GetRandam_Int(0, 1) + local RTime = ai:GetRandam_Int(0.7, 1.7) + local targetDist = ai:GetDist(TARGET_ENE_0) + if Att3006_Dist_max + 0.5 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3006_Dist_max, TARGET_SELF, false, -1) + if fate <= 25 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3006, TARGET_ENE_0, DIST_Middle, -1, 30) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 5, 3006, TARGET_ENE_0, DIST_Middle, -1, 30) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 5, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 1.5, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, true, -1) + if fate <= 25 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3000, TARGET_ENE_0, DIST_Middle, -1, 30) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 5, 3000, TARGET_ENE_0, DIST_Middle, -1, 30) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 5, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3002_Dist_max +Att3000_Dist_min = Att3001_Dist_max +function BlackDragonsDog419000_Act02(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local bRight = ai:GetRandam_Int(0, 1) + local RTime = ai:GetRandam_Int(0.7, 1.7) + local targetDist = ai:GetDist(TARGET_ENE_0) + if Att3002_Dist_max + 0.5 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3002_Dist_max, TARGET_SELF, false, -1) + if fate <= 25 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3002, TARGET_ENE_0, DIST_Middle, -1, 30) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 5, 3002, TARGET_ENE_0, DIST_Middle, -1, 30) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 5, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 1.5, TARGET_ENE_0, Att3001_Dist_max, TARGET_SELF, true, -1) + if fate <= 25 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3001, TARGET_ENE_0, DIST_Middle, -1, 30) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 5, 3001, TARGET_ENE_0, DIST_Middle, -1, 30) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 5, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3002_Dist_max +function BlackDragonsDog419000_Act03(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local bRight = ai:GetRandam_Int(0, 1) + local targetDist = ai:GetDist(TARGET_ENE_0) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 2) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 2) + end + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3002_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3002, TARGET_ENE_0, DIST_Middle, -1, 30) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function BlackDragonsDog419000_Act04(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 3) + elseif fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 3) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 3) + end + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function BlackDragonsDog419000_ActAfter_AdjustSpace(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, 10, TARGET_ENE_0, true, -1) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(1.8, 3), TARGET_ENE_0, 0, 0, 0) + elseif fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(2.4, 3.4), TARGET_ENE_0, 0, 0, 0) + elseif fate <= 85 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 3) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(1.8, 3), TARGET_ENE_0, 0, 0, 0) + else + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 3) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 3) + end + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(1.8, 3), TARGET_ENE_0, 0, 0, 0) + end + return +end + +function BlackDragonsDog419000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function BlackDragonsDog419000Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3006_Dist_max +Att3000_Dist_min = Att3002_Dist_max +function BlackDragonsDog419000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local superStepDist = 4 + local superStepPer = 35 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + local safetyDist = 3.5 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distDamagedStep = 4 + local oddsDamagedStep = 35 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + local safetyDist = 3.5 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distMissSwing_Int = 8 + local oddsMissSwing_Int = 50 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if targetDist <= 3 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3006_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3002_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distResNear = 4 + local distResFar = 15 + local oddsResNear = 20 + local oddsResFar = 30 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + return true + elseif ResBehavID == 2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + else + local oddsResponse = 20 + local bkStepPer = 30 + local leftStepPer = 35 + local rightStepPer = 35 + local safetyDist = 3.5 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end + end + end + end + end +end + +return diff --git a/scripts_decompiled/450000_battle.lua b/scripts_decompiled/450000_battle.lua new file mode 100644 index 0000000..81a8b00 --- /dev/null +++ b/scripts_decompiled/450000_battle.lua @@ -0,0 +1,790 @@ +REGISTER_GOAL(GOAL_TheAbyss450000_Battle, "TheAbyss450000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 5 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 4 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 7 +local Att3006_Dist_min = 6 +local Att3006_Dist_max = 12 +local Att3020_Dist_min = 8 +local Att3020_Dist_max = 10 +local Att3009_Dist_min = 0 +local Att3009_Dist_max = 3 +local Att3010_Dist_min = 0 +local Att3010_Dist_max = 100 +local Att3012_Dist_min = 0 +local Att3012_Dist_max = 15 +local Att3013_Dist_min = 7 +local Att3013_Dist_max = 13 +local Att3014_Dist_min = 10 +local Att3014_Dist_max = 20 +local Att3015_Dist_min = 0 +local Att3015_Dist_max = 5 +local Att3018_Dist_min = 0 +local Att3018_Dist_max = 5 +local Att3019_Dist_min = 0 +local Att3019_Dist_max = 6.5 +local Att3022_Dist_min = 0 +local Att3022_Dist_max = 2.5 +local Att3023_Dist_min = 8 +local Att3023_Dist_max = 12 +REGISTER_GOAL_NO_UPDATE(GOAL_TheAbyss450000_Battle, 1) +function OnIf_450000(ai, goal, codeNo) + if codeNo == 2 then + TheAbyss450000_ActAfter(ai, goal) + end + return +end + +function TheAbyss450000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + ai:SetNumber(0, 0) + ai:SetNumber(4, 0) + local hprate = ai:GetHpRate(TARGET_SELF) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = 1 + local fate4 = 1 + local fate5 = 1 + local fate6 = 1 + if ai:GetNumber(1) <= 10 then + fate3 = 1 + elseif ai:GetNumber(1) <= 20 then + fate3 = 2 + elseif ai:GetNumber(1) <= 40 then + fate3 = 4 + elseif ai:GetNumber(1) <= 50 then + fate3 = 6 + else + fate3 = 10 + end + if ai:GetNumber(2) <= 10 then + fate4 = 1 + elseif ai:GetNumber(2) <= 20 then + fate4 = 1.5 + elseif ai:GetNumber(2) <= 40 then + fate4 = 2 + elseif ai:GetNumber(2) <= 50 then + fate4 = 2.5 + else + fate4 = 3 + end + if ai:IsFinishTimer(0) == true then + fate5 = 1 + else + fate5 = 0 + end + if hprate <= 0.6 then + fate6 = 1 + else + fate6 = 0 + end + if hprate == 1 and ai:GetNumber(3) == 0 then + actPerArr[14] = 100 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 120) and fate <= 70 then + if targetDist <= 3 then + actPerArr[6] = 80 + actPerArr[20] = 20 + else + actPerArr[6] = 0 + actPerArr[20] = 100 + end + elseif hprate <= 0.6 and ai:GetNumber(5) == 0 then + if targetDist <= 5 then + actPerArr[15] = 100 + elseif targetDist <= 9 then + actPerArr[16] = 100 + else + actPerArr[17] = 100 + end + elseif 16 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 0 * fate5 + actPerArr[3] = 0 + actPerArr[4] = 15 + actPerArr[5] = 15 + actPerArr[7] = 0 + actPerArr[8] = 0 + actPerArr[9] = 20 + actPerArr[10] = 0 + actPerArr[11] = 15 + actPerArr[14] = 0 + actPerArr[15] = 15 * fate6 + actPerArr[16] = 0 * fate6 + actPerArr[17] = 20 * fate6 + elseif 12 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 0 * fate5 + actPerArr[3] = 0 + actPerArr[4] = 15 + actPerArr[5] = 15 + actPerArr[7] = 0 + actPerArr[8] = 0 + actPerArr[9] = 20 + actPerArr[10] = 0 + actPerArr[11] = 15 + actPerArr[14] = 0 + actPerArr[15] = 10 * fate6 + actPerArr[16] = 10 * fate6 + actPerArr[17] = 15 * fate6 + elseif 8 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 0 * fate5 + actPerArr[3] = 10 + actPerArr[4] = 15 + actPerArr[5] = 15 + actPerArr[7] = 0 + actPerArr[8] = 10 + actPerArr[9] = 10 + actPerArr[10] = 0 + actPerArr[11] = 10 + actPerArr[14] = 0 + actPerArr[15] = 5 * fate6 + actPerArr[16] = 15 * fate6 + actPerArr[17] = 10 * fate6 + elseif 5 <= targetDist then + actPerArr[1] = 10 + actPerArr[2] = 0 * fate5 + actPerArr[3] = 15 + actPerArr[4] = 10 + actPerArr[5] = 10 + actPerArr[7] = 5 + actPerArr[8] = 10 + actPerArr[9] = 10 + actPerArr[10] = 5 * fate3 + actPerArr[11] = 0 + actPerArr[14] = 0 + actPerArr[15] = 10 * fate6 + actPerArr[16] = 15 * fate6 + actPerArr[17] = 0 * fate6 + elseif 3 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 10 * fate5 + actPerArr[3] = 10 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[7] = 15 + actPerArr[8] = 15 + actPerArr[9] = 10 + actPerArr[10] = 10 * fate3 + actPerArr[11] = 0 + actPerArr[14] = 0 + actPerArr[15] = 10 * fate4 * fate6 + actPerArr[16] = 0 * fate6 + actPerArr[17] = 0 * fate6 + else + actPerArr[1] = 20 + actPerArr[2] = 10 * fate5 + actPerArr[3] = 10 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[7] = 25 + actPerArr[8] = 15 + actPerArr[9] = 0 + actPerArr[10] = 10 * fate3 + actPerArr[11] = 0 + actPerArr[14] = 0 + actPerArr[15] = 10 * fate4 * fate6 + actPerArr[16] = 0 * fate6 + actPerArr[17] = 0 * fate6 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, TheAbyss450000_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, TheAbyss450000_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, TheAbyss450000_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, TheAbyss450000_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, TheAbyss450000_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, TheAbyss450000_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, TheAbyss450000_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, TheAbyss450000_Act08) + actFuncArr[9] = REGIST_FUNC(ai, goal, TheAbyss450000_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, TheAbyss450000_Act10) + actFuncArr[11] = REGIST_FUNC(ai, goal, TheAbyss450000_Act11) + actFuncArr[14] = REGIST_FUNC(ai, goal, TheAbyss450000_Act14) + actFuncArr[15] = REGIST_FUNC(ai, goal, TheAbyss450000_Act15) + actFuncArr[16] = REGIST_FUNC(ai, goal, TheAbyss450000_Act16) + actFuncArr[17] = REGIST_FUNC(ai, goal, TheAbyss450000_Act17) + actFuncArr[20] = REGIST_FUNC(ai, goal, TheAbyss450000_Act20) + local atkAfterFunc = REGIST_FUNC(ai, goal, TheAbyss450000_ActAfter_AdjustSpace) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function TheAbyss450000_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3000_Dist_max - 1 + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + local AttDist = Att3000_Dist_max + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + if fate <= 20 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, AttDist, 0, 90) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3001, TARGET_ENE_0, AttDist, 0, 90) + end + elseif fate <= 60 then + if fate2 <= 50 then + if fate3 <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, AttDist, 0) + elseif fate3 <= 55 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3016, TARGET_ENE_0, AttDist, 0) + elseif fate3 <= 80 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3017, TARGET_ENE_0, AttDist, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3019, TARGET_ENE_0, AttDist, 0) + end + elseif fate3 <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3001, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3000, TARGET_ENE_0, AttDist, 0) + elseif fate3 <= 55 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3001, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3015, TARGET_ENE_0, AttDist, 0) + elseif fate3 <= 80 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3001, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3017, TARGET_ENE_0, AttDist, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3001, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3018, TARGET_ENE_0, AttDist, 0) + end + elseif fate2 <= 50 then + if fate3 <= 25 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, AttDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3000, TARGET_ENE_0, AttDist, 0) + elseif fate3 <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, AttDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3015, TARGET_ENE_0, AttDist, 0) + elseif fate3 <= 55 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3016, TARGET_ENE_0, AttDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3017, TARGET_ENE_0, AttDist, 0) + elseif fate3 <= 70 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3017, TARGET_ENE_0, AttDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3017, TARGET_ENE_0, AttDist, 0) + elseif fate3 <= 85 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, AttDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3019, TARGET_ENE_0, AttDist, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3017, TARGET_ENE_0, AttDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3019, TARGET_ENE_0, AttDist, 0) + end + elseif fate3 <= 25 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3001, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3000, TARGET_ENE_0, AttDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, AttDist, 0) + elseif fate3 <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3001, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3000, TARGET_ENE_0, AttDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3016, TARGET_ENE_0, AttDist, 0) + elseif fate3 <= 55 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3001, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3000, TARGET_ENE_0, AttDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3017, TARGET_ENE_0, AttDist, 0) + elseif fate3 <= 70 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3001, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3017, TARGET_ENE_0, AttDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3017, TARGET_ENE_0, AttDist, 0) + elseif fate3 <= 85 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3001, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3000, TARGET_ENE_0, AttDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3018, TARGET_ENE_0, AttDist, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3001, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3017, TARGET_ENE_0, AttDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3018, TARGET_ENE_0, AttDist, 0) + end + ai:SetNumber(1, ai:GetNumber(1) + 10) + ai:SetNumber(2, ai:GetNumber(2) + 10) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3002_Dist_max +function TheAbyss450000_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AttDist = Att3002_Dist_max + ai:SetTimer(0, 10) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3002, TARGET_ENE_0, AttDist, 0, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3003_Dist_max +function TheAbyss450000_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3003_Dist_max - 2 + local DashDist = Att3003_Dist_max - 2 + local Odds_Guard = 0 + local AttDist = Att3003_Dist_max + local fate = ai:GetRandam_Int(1, 100) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3003, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3004, TARGET_ENE_0, AttDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3005, TARGET_ENE_0, AttDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3023, TARGET_ENE_0, AttDist, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3004, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3005, TARGET_ENE_0, AttDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3004, TARGET_ENE_0, AttDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3005, TARGET_ENE_0, AttDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3019, TARGET_ENE_0, AttDist, 0) + end + ai:SetNumber(1, ai:GetNumber(1) + 10) + ai:SetNumber(2, ai:GetNumber(2) + 10) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_max +function TheAbyss450000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + local Odds_Guard = 0 + local AttDist = Att3006_Dist_max + local fate = ai:GetRandam_Int(1, 100) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, AttDist, 1.3, 20) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3020_Dist_max +function TheAbyss450000_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3020_Dist_max + local DashDist = Att3020_Dist_max + local Odds_Guard = 0 + local AttDist = Att3020_Dist_max + local fate = ai:GetRandam_Int(1, 100) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + ai:SetNumber(4, 1) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3020, TARGET_ENE_0, DIST_None, 1.3, 20) + if targetDist <= 10 then + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3021, TARGET_ENE_0, DIST_None, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3007, TARGET_ENE_0, DIST_None, 0) + end + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3009_Dist_max +function TheAbyss450000_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AttDist = Att3009_Dist_max + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 3, 3009, TARGET_ENE_0, AttDist, 0, 0) + ai:SetNumber(0, 1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3015_Dist_max +function TheAbyss450000_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3015_Dist_max - 1.5 + local DashDist = Att3015_Dist_max + 2 + local Odds_Guard = 0 + local AttDist = Att3015_Dist_max + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + if fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3015, TARGET_ENE_0, AttDist, 0, 90) + elseif fate <= 60 then + if fate2 <= 35 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3015, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3016, TARGET_ENE_0, AttDist, 0) + elseif fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3015, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3000, TARGET_ENE_0, AttDist, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3015, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, AttDist, 0) + end + elseif fate2 <= 15 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3015, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3016, TARGET_ENE_0, AttDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3015, TARGET_ENE_0, AttDist, 0) + elseif fate2 <= 25 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3015, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, AttDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3015, TARGET_ENE_0, AttDist, 0) + elseif fate2 <= 35 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3015, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3016, TARGET_ENE_0, AttDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3000, TARGET_ENE_0, AttDist, 0) + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3015, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3016, TARGET_ENE_0, AttDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3017, TARGET_ENE_0, AttDist, 0) + elseif fate2 <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3015, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3000, TARGET_ENE_0, AttDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3017, TARGET_ENE_0, AttDist, 0) + elseif fate2 <= 70 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3015, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, AttDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3017, TARGET_ENE_0, AttDist, 0) + elseif fate2 <= 85 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3015, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3016, TARGET_ENE_0, AttDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3018, TARGET_ENE_0, AttDist, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3015, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3016, TARGET_ENE_0, AttDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3019, TARGET_ENE_0, AttDist, 0) + end + ai:SetNumber(1, ai:GetNumber(1) + 10) + ai:SetNumber(2, ai:GetNumber(2) + 10) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3018_Dist_max +function TheAbyss450000_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3018_Dist_max - 2 + local DashDist = Att3018_Dist_max + 1 + local Odds_Guard = 0 + local AttDist = Att3018_Dist_max + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3018, TARGET_ENE_0, AttDist, 0, 90) + ai:SetNumber(1, ai:GetNumber(1) + 10) + ai:SetNumber(2, ai:GetNumber(2) + 10) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3019_Dist_max +function TheAbyss450000_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3019_Dist_max + local DashDist = Att3019_Dist_max + 1 + local Odds_Guard = 0 + local AttDist = Att3019_Dist_max + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3019, TARGET_ENE_0, AttDist, 0, 90) + ai:SetNumber(1, ai:GetNumber(1) + 10) + ai:SetNumber(2, ai:GetNumber(2) + 10) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3022_Dist_max +function TheAbyss450000_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3022_Dist_max + local DashDist = Att3022_Dist_max + 0 + local Odds_Guard = 0 + local AttDist = Att3022_Dist_max + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + ai:SetNumber(1, 0) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3022, TARGET_ENE_0, AttDist, 0, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3010, TARGET_ENE_0, AttDist, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3023_Dist_max +function TheAbyss450000_Act11(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3023_Dist_max + 0 + local DashDist = Att3023_Dist_max + 0 + local Odds_Guard = 0 + local AttDist = Att3023_Dist_max + local fate = ai:GetRandam_Int(1, 100) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3023, TARGET_ENE_0, AttDist, 1.3, 20) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3010_Dist_max +function TheAbyss450000_Act14(ai, goal, paramTbl) + local AppDist = Att3010_Dist_max + ai:SetNumber(3, 1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3010, TARGET_ENE_0, AppDist, 0, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3012_Dist_max +function TheAbyss450000_Act15(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3012_Dist_max + 0 + local DashDist = Att3012_Dist_max + 0 + local Odds_Guard = 0 + local AttDist = Att3012_Dist_max + 5 + local fate = ai:GetRandam_Int(1, 100) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + ai:SetNumber(2, 0) + ai:SetNumber(5, 1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3012, TARGET_ENE_0, AttDist, 0, 90) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3013_Dist_max +function TheAbyss450000_Act16(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3013_Dist_max + 0 + local DashDist = Att3013_Dist_max + 0 + local Odds_Guard = 0 + local AttDist = Att3013_Dist_max + 5 + local fate = ai:GetRandam_Int(1, 100) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + ai:SetNumber(5, 1) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3013, TARGET_ENE_0, AttDist, 1.3, 20) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3010, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3014_Dist_max +function TheAbyss450000_Act17(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3014_Dist_max + 0 + local DashDist = Att3014_Dist_max + 0 + local Odds_Guard = 0 + local AttDist = Att3014_Dist_max + 5 + local fate = ai:GetRandam_Int(1, 100) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + ai:SetNumber(5, 1) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3014, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3010, TARGET_ENE_0, DIST_None, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function TheAbyss450000_Act20(ai, goal, paramTbl) + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3026, TARGET_ENE_0, DIST_None, 0, 90) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 180) then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3025, TARGET_ENE_0, DIST_None, 0, 90) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3026, TARGET_ENE_0, DIST_None, 0, 90) + end + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function TheAbyss450000_ActAfter(ai, goal) + local GW_fate = ai:GetRandam_Int(1, 100) + local fate = ai:GetRandam_Int(1, 100) + local bRight = ai:GetRandam_Int(0, 1) + local targetDist = ai:GetDist(TARGET_ENE_0) + if targetDist <= 3 then + if GW_fate <= 60 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 7) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + elseif GW_fate <= 90 then + if fate <= 0 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 2, TARGET_ENE_0, bRight, ai:GetRandam_Int(30, 45), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2, TARGET_ENE_0, 3, TARGET_ENE_0, true, -1) + end + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3002, TARGET_ENE_0, DIST_None, 0, 0) + end + elseif targetDist <= 5 then + if GW_fate <= 50 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 7) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + elseif GW_fate <= 90 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 2.5, TARGET_ENE_0, bRight, ai:GetRandam_Int(30, 45), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 3, TARGET_ENE_0, true, -1) + end + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3002, TARGET_ENE_0, DIST_None, 0, 0) + end + elseif targetDist <= 12 then + if GW_fate <= 20 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 7) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + elseif GW_fate <= 80 then + if fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, bRight, ai:GetRandam_Int(30, 45), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, 3, TARGET_ENE_0, true, -1) + end + end + elseif GW_fate <= 0 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 7) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + elseif GW_fate <= 75 then + if fate <= 100 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 4, TARGET_ENE_0, bRight, ai:GetRandam_Int(30, 45), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 4, TARGET_ENE_0, 3, TARGET_ENE_0, true, -1) + end + end + return +end + +function TheAbyss450000_ActAfter_AdjustSpace(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_If, 10, 2) + return +end + +function TheAbyss450000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function TheAbyss450000Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3023_Dist_max +function TheAbyss450000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if ai:IsInterupt(INTERUPT_TargetIsGuard) and ai:GetNumber(0) == 1 then + ai:SetNumber(0, 0) + if fate <= 60 then + local AttDist = Att3023_Dist_max + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 3, 3023, TARGET_ENE_0, AttDist, 0) + end + return true + elseif ai:GetNumber(4) == 0 then + local distUseItem_Act = 20 + local oddsUseItem_Act = 30 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + local AppDist = 20 + local DashDist = 20 + local Odds_Guard = 0 + goal:ClearSubGoal() + if targetDist <= 5 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 2, 3002, TARGET_ENE_0, DIST_None, 0, 90) + elseif targetDist <= 8 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 2, 3019, TARGET_ENE_0, DIST_None, 0, 90) + elseif targetDist <= 12 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 2, 3006, TARGET_ENE_0, DIST_None, 1.3, 0) + elseif targetDist <= 15 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 2, 3023, TARGET_ENE_0, DIST_None, 0, 90) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 2, 3010, TARGET_ENE_0, DIST_None, 0, 0) + end + return true + end + end + if ai:GetNumber(4) == 0 then + local distResNear = 8 + local distResFar = 30 + local oddsResNear = 40 + local oddsResFar = 70 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + if targetDist <= 6 then + if fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 2, 3018, TARGET_ENE_0, DIST_None, 0, 90) + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + elseif fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 2, 3019, TARGET_ENE_0, DIST_None, 0, 90) + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + return true + elseif ResBehavID == 2 then + if targetDist <= 12 then + if fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 2, 3006, TARGET_ENE_0, DIST_None, 1.3, 20) + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + elseif targetDist <= 15 then + if fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 2, 3023, TARGET_ENE_0, DIST_None, 0, 90) + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/451000_battle.lua b/scripts_decompiled/451000_battle.lua new file mode 100644 index 0000000..941f0d0 --- /dev/null +++ b/scripts_decompiled/451000_battle.lua @@ -0,0 +1,841 @@ +REGISTER_GOAL(GOAL_BlackDragon451000_Battle, "BlackDragon451000Battle") +local Att3000_Dist_min = 6 +local Att3000_Dist_max = 32 +local Att3001_Dist_min = 6 +local Att3001_Dist_max = 16 +local Att3002_Dist_min = -2 +local Att3002_Dist_max = 0 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 4 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 5 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 4 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 4 +local Att3007_Dist_min = -4 +local Att3007_Dist_max = 0 +local Att3008_Dist_min = -4 +local Att3008_Dist_max = 0 +local Att3009_Dist_min = 0 +local Att3009_Dist_max = 5 +local Att3010_Dist_min = 0 +local Att3010_Dist_max = 4 +local Att3011_Dist_min = 0 +local Att3011_Dist_max = 4 +local Att3012_Dist_min = 0 +local Att3012_Dist_max = 16 +local Att3013_Dist_min = 0 +local Att3013_Dist_max = 0 +local Att3017_Dist_min = 0 +local Att3017_Dist_max = 0 +local Att3018_Dist_min = 0 +local Att3018_Dist_max = 0 +local Att3020_Dist_min = 0 +local Att3020_Dist_max = 20 +local Att3022_Dist_min = 0 +local Att3022_Dist_max = 0 +REGISTER_GOAL_NO_UPDATE(GOAL_BlackDragon451000_Battle, 1) +function OnIf_451000(ai, goal, codeNo) + if codeNo == 0 then + BlackDragon451000_ActAfter(ai, goal) + end + if codeNo == 1 then + BlackDragon451000_Turn(ai, goal) + end + return +end + +function BlackDragon451000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local hprate = ai:GetHpRate(TARGET_SELF) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local eventNo = ai:GetEventRequest(1) + local PARTS_IDX_TAIL = 0 + local tailDmgLv = ai:GetPartsDmg(PARTS_IDX_TAIL) + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1212057) then + actPerArr[18] = 100 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1212059) then + actPerArr[19] = 100 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1212058) then + actPerArr[18] = 100 + elseif not ai:IsRideLargeSpaceFlag(TARGET_ENE_0) then + if 4 <= targetDist then + actPerArr[1] = 50 + actPerArr[2] = 50 + else + actPerArr[4] = 33 + actPerArr[5] = 33 + actPerArr[10] = 34 + end + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 270) then + actPerArr[17] = 100 + elseif 12 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 10 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 30 + actPerArr[6] = 0 + actPerArr[7] = 0 + actPerArr[8] = 0 + actPerArr[9] = 0 + actPerArr[10] = 0 + actPerArr[11] = 0 + actPerArr[12] = 0 + actPerArr[13] = 20 + actPerArr[14] = 0 + actPerArr[15] = 0 + actPerArr[16] = 0 + actPerArr[20] = 20 + if 1 <= ai:GetNumber(0) then + actPerArr[1] = 0 + actPerArr[20] = 40 + end + elseif 6 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 30 + actPerArr[3] = 0 + actPerArr[4] = 20 + actPerArr[5] = 20 + actPerArr[6] = 0 + actPerArr[7] = 0 + actPerArr[8] = 0 + actPerArr[9] = 0 + actPerArr[10] = 0 + actPerArr[11] = 0 + actPerArr[12] = 0 + actPerArr[13] = 10 + actPerArr[14] = 0 + actPerArr[15] = 0 + actPerArr[16] = 0 + if 1 <= ai:GetNumber(0) then + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[4] = 0 + end + elseif 4 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 100 + actPerArr[4] = 30 + actPerArr[5] = 50 + actPerArr[6] = 0 + actPerArr[7] = 0 + actPerArr[8] = 0 + actPerArr[9] = 0 + actPerArr[10] = 0 + actPerArr[11] = 0 + actPerArr[12] = 0 + actPerArr[13] = 20 + actPerArr[14] = 0 + actPerArr[15] = 0 + actPerArr[16] = 0 + elseif 2 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 100 + actPerArr[4] = 20 + actPerArr[5] = 40 + actPerArr[6] = 0 + actPerArr[7] = 0 + actPerArr[8] = 0 + actPerArr[9] = 0 + actPerArr[10] = 25 + actPerArr[11] = 15 + actPerArr[12] = 0 + actPerArr[13] = 0 + actPerArr[14] = 0 + actPerArr[15] = 0 + actPerArr[16] = 100 + elseif 0 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 100 + actPerArr[4] = 0 + actPerArr[5] = 50 + actPerArr[6] = 0 + actPerArr[7] = 0 + actPerArr[8] = 0 + actPerArr[9] = 0 + actPerArr[10] = 25 + actPerArr[11] = 35 + actPerArr[12] = 0 + actPerArr[13] = 0 + actPerArr[14] = 0 + actPerArr[15] = 0 + actPerArr[16] = 100 + elseif -4 <= targetDist then + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 0 + actPerArr[7] = 0 + actPerArr[8] = 30 + actPerArr[9] = 30 + actPerArr[10] = 0 + actPerArr[11] = 40 + actPerArr[12] = 0 + actPerArr[13] = 0 + actPerArr[14] = 0 + actPerArr[15] = 0 + actPerArr[16] = 100 + if 2 <= ai:GetNumber(1) then + actPerArr[8] = 0 + actPerArr[9] = 0 + end + else + actPerArr[1] = 0 + actPerArr[2] = 0 + actPerArr[3] = 0 + actPerArr[4] = 0 + actPerArr[5] = 0 + actPerArr[6] = 0 + actPerArr[7] = 0 + actPerArr[8] = 0 + actPerArr[9] = 0 + actPerArr[10] = 0 + actPerArr[11] = 60 + actPerArr[12] = 0 + actPerArr[13] = 0 + actPerArr[14] = 20 + actPerArr[15] = 20 + actPerArr[16] = 100 + end + if ai:IsFinishTimer(0) == false then + actPerArr[3] = 0 + end + if ai:IsFinishTimer(1) == false then + actPerArr[14] = 0 + end + if ai:IsFinishTimer(2) == false then + actPerArr[16] = 0 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, BlackDragon451000_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, BlackDragon451000_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, BlackDragon451000_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, BlackDragon451000_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, BlackDragon451000_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, BlackDragon451000_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, BlackDragon451000_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, BlackDragon451000_Act08) + actFuncArr[9] = REGIST_FUNC(ai, goal, BlackDragon451000_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, BlackDragon451000_Act10) + actFuncArr[11] = REGIST_FUNC(ai, goal, BlackDragon451000_Act11) + actFuncArr[12] = REGIST_FUNC(ai, goal, BlackDragon451000_Act12) + actFuncArr[13] = REGIST_FUNC(ai, goal, BlackDragon451000_Act13) + actFuncArr[14] = REGIST_FUNC(ai, goal, BlackDragon451000_Act14) + actFuncArr[15] = REGIST_FUNC(ai, goal, BlackDragon451000_Act15) + actFuncArr[16] = REGIST_FUNC(ai, goal, BlackDragon451000_Act16) + actFuncArr[17] = REGIST_FUNC(ai, goal, BlackDragon451000_Act17) + actFuncArr[18] = REGIST_FUNC(ai, goal, BlackDragon451000_Act18) + actFuncArr[19] = REGIST_FUNC(ai, goal, BlackDragon451000_Act19) + actFuncArr[20] = REGIST_FUNC(ai, goal, BlackDragon451000_Act20) + local atkAfterFunc = REGIST_FUNC(ai, goal, BlackDragon451000_ActAfter_AdjustSpace) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function BlackDragon451000_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3000_Dist_max - 1 + local DashDist = Att3000_Dist_max + 2 + local AttDist = Att3000_Dist_max + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, AttDist, 0, 45) + ai:SetNumber(0, ai:GetNumber(0) + 1) + ai:SetNumber(1, 0) + ai:SetNumber(2, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3001_Dist_max +function BlackDragon451000_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3001_Dist_max - 1 + local DashDist = Att3001_Dist_max + 2 + local AttDist = Att3001_Dist_max + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3001, TARGET_ENE_0, AttDist, 0, 45) + ai:SetNumber(0, ai:GetNumber(0) + 1) + ai:SetNumber(1, 0) + ai:SetNumber(2, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3002_Dist_max +function BlackDragon451000_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3002_Dist_max - 1 + local DashDist = Att3002_Dist_max + 2 + local AttDist = Att3002_Dist_max + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + ai:SetTimer(0, 60) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, AttDist, 0, 45) + ai:SetNumber(0, 0) + ai:SetNumber(1, 0) + ai:SetNumber(2, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3003_Dist_max +function BlackDragon451000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3003_Dist_max - 0 + local DashDist = Att3003_Dist_max + 2 + local AttDist = Att3003_Dist_max + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3003, TARGET_ENE_0, AttDist, 0, 45) + ai:SetNumber(0, ai:GetNumber(0) + 1) + ai:SetNumber(1, 0) + ai:SetNumber(2, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3004_Dist_max +function BlackDragon451000_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3004_Dist_max - 0 + local DashDist = Att3004_Dist_max + 2 + local AttDist = Att3004_Dist_max + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + if fate <= 25 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3004, TARGET_ENE_0, AttDist, 0, 90) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3004, TARGET_ENE_0, AttDist, 0, 90) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3014, TARGET_ENE_0, AttDist, 0) + end + ai:SetNumber(0, 0) + ai:SetNumber(1, 0) + ai:SetNumber(2, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3005_Dist_max +function BlackDragon451000_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3005_Dist_max - 1 + local DashDist = Att3005_Dist_max + 2 + local AttDist = Att3005_Dist_max + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + local PARTS_IDX_TAIL = 0 + local tailDmgLv = ai:GetPartsDmg(PARTS_IDX_TAIL) + if tailDmgLv ~= PARTS_DMG_FINAL then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3005, TARGET_ENE_0, AttDist, 0, 180) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3015, TARGET_ENE_0, AttDist, 0, 180) + end + ai:SetNumber(0, 0) + ai:SetNumber(1, 0) + ai:SetNumber(2, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_max +function BlackDragon451000_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3006_Dist_max - 1 + local DashDist = Att3006_Dist_max + 2 + local AttDist = Att3006_Dist_max + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + local PARTS_IDX_TAIL = 0 + local tailDmgLv = ai:GetPartsDmg(PARTS_IDX_TAIL) + if tailDmgLv ~= PARTS_DMG_FINAL then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, AttDist, 0, 180) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3016, TARGET_ENE_0, AttDist, 0, 180) + end + ai:SetNumber(0, 0) + ai:SetNumber(1, 0) + ai:SetNumber(2, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3007_Dist_max +function BlackDragon451000_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3007_Dist_max - 1 + local DashDist = Att3007_Dist_max + 2 + local AttDist = Att3007_Dist_max + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3007, TARGET_ENE_0, AttDist, 0, 90) + ai:SetNumber(0, 0) + ai:SetNumber(1, ai:GetNumber(0) + 1) + ai:SetNumber(2, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3008_Dist_max +function BlackDragon451000_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3008_Dist_max - 1 + local DashDist = Att3008_Dist_max + 2 + local AttDist = Att3008_Dist_max + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3008, TARGET_ENE_0, AttDist, 0, 90) + ai:SetNumber(0, 0) + ai:SetNumber(1, ai:GetNumber(0) + 1) + ai:SetNumber(2, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3009_Dist_max +function BlackDragon451000_Act10(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3009_Dist_max - 0 + local DashDist = Att3009_Dist_max + 2 + local AttDist = Att3009_Dist_max + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + local PARTS_IDX_TAIL = 0 + local tailDmgLv = ai:GetPartsDmg(PARTS_IDX_TAIL) + if tailDmgLv ~= PARTS_DMG_FINAL then + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3009, TARGET_ENE_0, AttDist, 0, 180) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 7) + end + ai:SetNumber(0, 0) + ai:SetNumber(1, 0) + ai:SetNumber(2, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3010_Dist_max +function BlackDragon451000_Act11(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3010_Dist_max - 1 + local DashDist = Att3010_Dist_max + 2 + local AttDist = Att3010_Dist_max + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3010, TARGET_ENE_0, AttDist, 0, 90) + ai:SetNumber(0, ai:GetNumber(0) + 1) + ai:SetNumber(1, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3011_Dist_max +function BlackDragon451000_Act12(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3011_Dist_max - 1 + local DashDist = Att3011_Dist_max + 2 + local AttDist = Att3011_Dist_max + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + local PARTS_IDX_TAIL = 0 + local tailDmgLv = ai:GetPartsDmg(PARTS_IDX_TAIL) + if tailDmgLv ~= PARTS_DMG_FINAL then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3011, TARGET_ENE_0, AttDist, 0, 360) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3021, TARGET_ENE_0, AttDist, 0, 360) + end + ai:SetNumber(0, 0) + ai:SetNumber(1, 0) + ai:SetNumber(2, ai:GetNumber(2) + 1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3012_Dist_max +function BlackDragon451000_Act13(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3012_Dist_max - 1 + local DashDist = Att3012_Dist_max + 2 + local AttDist = 9999 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3012, TARGET_ENE_0, AttDist, 0, 90) + ai:SetNumber(0, 0) + ai:SetNumber(1, 0) + ai:SetNumber(2, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3013_Dist_max +function BlackDragon451000_Act14(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3013_Dist_max - 0 + local DashDist = Att3013_Dist_max + 2 + local AttDist = 9999 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + ai:SetTimer(1, 60) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3013, TARGET_ENE_0, AttDist, 0, 360) + ai:SetNumber(0, 0) + ai:SetNumber(1, 0) + ai:SetNumber(2, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function BlackDragon451000_Act15(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 3, TARGET_ENE_0, 3, TARGET_ENE_0, true, -1) + ai:SetNumber(0, 0) + ai:SetNumber(1, 0) + ai:SetNumber(2, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3022_Dist_max +function BlackDragon451000_Act16(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3022_Dist_max - 0 + local DashDist = Att3022_Dist_max + 2 + local AttDist = 9999 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + ai:SetTimer(2, 60) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3022, TARGET_ENE_0, AttDist, 0, 360) + ai:SetNumber(0, ai:GetNumber(0) + 1) + ai:SetNumber(1, 0) + ai:SetNumber(2, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function BlackDragon451000_Act17(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_If, 10, 1) + return +end + +function BlackDragon451000_Turn(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local PARTS_IDX_TAIL = 0 + local tailDmgLv = ai:GetPartsDmg(PARTS_IDX_TAIL) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local eventNo = ai:GetEventRequest() + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 30) then + if -2 <= targetDist and targetDist <= 6 and tailDmgLv ~= PARTS_DMG_FINAL and ai:GetNumber(2) <= 0 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 15) then + BlackDragon451000_Act12(ai, goal) + elseif 2 <= targetDist and targetDist <= 6 and fate <= 50 then + BlackDragon451000_Act06(ai, goal) + elseif 2 <= targetDist and targetDist <= 6 and fate <= 100 then + BlackDragon451000_Act07(ai, goal) + elseif fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 3, 3029, TARGET_ENE_0, DIST_None, 0, 90) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 3, 3028, TARGET_ENE_0, DIST_None, 0, 90) + end + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 90) then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then + if 0 <= targetDist and targetDist <= 4 and fate <= 75 then + BlackDragon451000_Act06(ai, goal) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 3, 3027, TARGET_ENE_0, DIST_None, 0, 90) + end + elseif 0 <= targetDist and targetDist <= 4 and fate <= 75 then + BlackDragon451000_Act07(ai, goal) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 3, 3026, TARGET_ENE_0, DIST_None, 0, 90) + end + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 150) then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then + if 0 <= targetDist and targetDist <= 4 and fate <= 75 then + BlackDragon451000_Act07(ai, goal) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 3, 3027, TARGET_ENE_0, DIST_None, 0, 90) + end + elseif 0 <= targetDist and targetDist <= 4 and fate <= 75 then + BlackDragon451000_Act06(ai, goal) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 3, 3026, TARGET_ENE_0, DIST_None, 0, 90) + end + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 210) then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then + if 0 <= targetDist and targetDist <= 4 and fate <= 75 then + BlackDragon451000_Act07(ai, goal) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 3, 3027, TARGET_ENE_0, DIST_None, 0, 90) + end + elseif 0 <= targetDist and targetDist <= 4 and fate <= 75 then + BlackDragon451000_Act06(ai, goal) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 3, 3026, TARGET_ENE_0, DIST_None, 0, 90) + end + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 3, 3025, TARGET_ENE_0, DIST_None, 0, 90) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 3, 3024, TARGET_ENE_0, DIST_None, 0, 90) + end + return +end + +function BlackDragon451000_Act18(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = 9999 + local DashDist = 9999 + local AttDist = 9999 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, POINT_EVENT, 3, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3017, TARGET_ENE_0, AttDist, 0, 360) + ai:SetNumber(0, ai:GetNumber(0) + 1) + ai:SetNumber(1, 0) + ai:SetNumber(2, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function BlackDragon451000_Act19(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = 9999 + local DashDist = 9999 + local AttDist = 9999 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, POINT_EVENT, 3, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3018, TARGET_ENE_0, AttDist, 0, 360) + ai:SetNumber(0, ai:GetNumber(0) + 1) + ai:SetNumber(1, 0) + ai:SetNumber(2, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3020_Dist_max +function BlackDragon451000_Act20(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3020_Dist_max - 1 + local DashDist = Att3020_Dist_max + 2 + local AttDist = 9999 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3020, TARGET_ENE_0, AttDist, 0, 90) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3023, TARGET_ENE_0, AttDist, 0, 90) + end + ai:SetNumber(0, 0) + ai:SetNumber(1, 0) + ai:SetNumber(2, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function BlackDragon451000_ActAfter(ai, goal) + local GW_fate = ai:GetRandam_Int(1, 100) + local fate = ai:GetRandam_Int(1, 100) + local bRight = ai:GetRandam_Int(0, 1) + local targetDist = ai:GetDist(TARGET_ENE_0) + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 330) then + BlackDragon451000_Turn(ai, goal) + elseif targetDist <= 2 then + if GW_fate <= 50 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 7) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + elseif GW_fate <= 100 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, bRight, ai:GetRandam_Int(30, 45), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 3, TARGET_ENE_0, true, -1) + end + end + elseif targetDist <= 4 then + if GW_fate <= 25 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 7) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + elseif GW_fate <= 100 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, bRight, ai:GetRandam_Int(45, 60), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 3, TARGET_ENE_0, true, -1) + end + end + elseif targetDist <= 8 then + if GW_fate <= 13 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 7) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + elseif GW_fate <= 100 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, bRight, ai:GetRandam_Int(60, 75), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 3, TARGET_ENE_0, true, -1) + end + end + elseif GW_fate <= 0 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 7) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + elseif GW_fate <= 100 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, bRight, ai:GetRandam_Int(75, 90), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 3, TARGET_ENE_0, true, -1) + end + end + return +end + +function BlackDragon451000_ActAfter_AdjustSpace(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_If, 20, 0) + return +end + +function BlackDragon451000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function BlackDragon451000Battle_Terminate(ai, goal) + return +end + +function BlackDragon451000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if ai:IsInterupt(INTERUPT_FindAttack) then + if fate <= 80 then + if 0 <= targetDist and targetDist <= 6 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 90) then + goal:ClearSubGoal() + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 1, 3003, TARGET_ENE_0, DIST_None, 0, 45) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 1, 3004, TARGET_ENE_0, DIST_None, 0, 45) + end + return true + else + return false + end + else + return false + end + elseif ai:IsInterupt(INTERUPT_Shoot) then + if fate <= 80 then + if targetDist <= 4 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 90) then + goal:ClearSubGoal() + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 1, 3003, TARGET_ENE_0, DIST_None, 0, 45) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 1, 3004, TARGET_ENE_0, DIST_None, 0, 45) + end + return true + elseif targetDist <= 12 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 120) then + goal:ClearSubGoal() + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 1, 3001, TARGET_ENE_0, DIST_None, 0, 45) + else + goal:ClearSubGoal() + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 1, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 10) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 1, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 10) + end + end + return true + elseif targetDist <= 20 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 150) then + goal:ClearSubGoal() + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 1, 3000, TARGET_ENE_0, DIST_None, 0, 45) + else + goal:ClearSubGoal() + if fate3 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 1, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 10) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 1, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 10) + end + end + return true + else + return false + end + else + return false + end + else + return false + end +end + +return diff --git a/scripts_decompiled/452000_battle.lua b/scripts_decompiled/452000_battle.lua new file mode 100644 index 0000000..6a6e698 --- /dev/null +++ b/scripts_decompiled/452000_battle.lua @@ -0,0 +1,582 @@ +REGISTER_GOAL(GOAL_HolySwordWolf452000_Battle, "HolySwordWolf452000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 2.2 +local Att3003_Dist_min = 2 +local Att3003_Dist_max = 4 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 2 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 1.5 +local Att3007_Dist_min = 0 +local Att3007_Dist_max = 2 +local Att3008_Dist_min = 0 +local Att3008_Dist_max = 1.2 +local Att3010_Dist_min = 0 +local Att3010_Dist_max = 2 +local Att3011_Dist_min = 2 +local Att3011_Dist_max = 4.5 +local Att13000_Dist_min = 0 +local Att13000_Dist_max = 2 +local Att13002_Dist_min = 0 +local Att13002_Dist_max = 2 +local Att13003_Dist_min = 0 +local Att13003_Dist_max = 2 +local Att13004_Dist_min = 0 +local Att13004_Dist_max = 1.2 +REGISTER_GOAL_NO_UPDATE(GOAL_HolySwordWolf452000_Battle, 1) +function OnIf_452000(ai, goal, codeNo) + if codeNo == 0 then + HolySwordWolf452000_ActAfter(ai, goal) + end + return +end + +function HolySwordWolf452000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local hprate = ai:GetHpRate(TARGET_SELF) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + local fate5 = 1 + local hpratePC = ai:GetHpRate(TARGET_LOCALPLAYER) + if ai:GetNumber(0) < 10 then + if hpratePC <= 0.3 then + fate5 = 1 + else + fate5 = 1 + end + elseif ai:GetNumber(0) < 20 then + if hpratePC <= 0.3 then + fate5 = 1 + else + fate5 = 3 + end + elseif ai:GetNumber(0) < 30 then + if hpratePC <= 0.3 then + fate5 = 1 + else + fate5 = 4 + end + elseif hpratePC <= 0.3 then + fate5 = 1 + else + fate5 = 5 + end + if ai:HasSpecialEffectId(TARGET_SELF, 5401) then + if targetDist <= 1.5 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 240) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) and fate <= 60 then + actPerArr[10] = 100 + elseif targetDist <= 1.5 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 240) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 180) and fate <= 60 then + actPerArr[11] = 100 + elseif 2 <= targetDist then + actPerArr[8] = 20 + actPerArr[9] = 20 + actPerArr[14] = 20 * fate5 + actPerArr[15] = 40 * fate5 + else + actPerArr[8] = 20 + actPerArr[9] = 20 + actPerArr[14] = 20 * fate5 + actPerArr[15] = 40 * fate5 + end + elseif targetDist <= 1.5 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 240) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) and fate <= 60 then + actPerArr[5] = 100 + elseif targetDist <= 1.5 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 240) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 180) and fate <= 60 then + actPerArr[6] = 100 + elseif 10 <= targetDist then + actPerArr[1] = 15 + actPerArr[2] = 15 + actPerArr[3] = 0 + actPerArr[12] = 10 + actPerArr[13] = 20 + actPerArr[4] = 0 * fate5 + actPerArr[7] = 0 * fate5 + actPerArr[14] = 30 * fate5 + actPerArr[15] = 10 * fate5 + elseif 5 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 10 + actPerArr[3] = 0 + actPerArr[12] = 15 + actPerArr[13] = 15 + actPerArr[4] = 0 * fate5 + actPerArr[7] = 15 * fate5 + actPerArr[14] = 10 * fate5 + actPerArr[15] = 15 * fate5 + elseif 2 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 10 + actPerArr[3] = 10 + actPerArr[12] = 10 + actPerArr[13] = 10 + actPerArr[4] = 20 * fate5 + actPerArr[7] = 20 * fate5 + actPerArr[14] = 0 * fate5 + actPerArr[15] = 0 * fate5 + else + actPerArr[1] = 30 + actPerArr[2] = 0 + actPerArr[3] = 20 + actPerArr[12] = 20 + actPerArr[13] = 0 + actPerArr[4] = 20 * fate5 + actPerArr[7] = 10 * fate5 + actPerArr[14] = 0 * fate5 + actPerArr[15] = 0 * fate5 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, HolySwordWolf452000_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, HolySwordWolf452000_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, HolySwordWolf452000_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, HolySwordWolf452000_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, HolySwordWolf452000_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, HolySwordWolf452000_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, HolySwordWolf452000_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, HolySwordWolf452000_Act08) + actFuncArr[9] = REGIST_FUNC(ai, goal, HolySwordWolf452000_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, HolySwordWolf452000_Act10) + actFuncArr[11] = REGIST_FUNC(ai, goal, HolySwordWolf452000_Act11) + actFuncArr[12] = REGIST_FUNC(ai, goal, HolySwordWolf452000_Act12) + actFuncArr[13] = REGIST_FUNC(ai, goal, HolySwordWolf452000_Act13) + actFuncArr[14] = REGIST_FUNC(ai, goal, HolySwordWolf452000_Act14) + actFuncArr[15] = REGIST_FUNC(ai, goal, HolySwordWolf452000_Act15) + local atkAfterFunc = REGIST_FUNC(ai, goal, HolySwordWolf452000_ActAfter_AdjustSpace) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function HolySwordWolf452000_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 0 + local Odds_Guard = 0 + local AttDist = Att3000_Dist_max + 0 + local fate = ai:GetRandam_Int(1, 100) + local hpratePC = ai:GetHpRate(TARGET_LOCALPLAYER) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + if fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, AttDist, -1, 20) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, AttDist, -1, 20) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, AttDist, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, AttDist, -1, 20) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, AttDist, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, AttDist, 0) + end + ai:SetNumber(0, ai:GetNumber(0) + 10) + if hpratePC <= 0.3 then + GetWellSpace_Odds = 50 + else + GetWellSpace_Odds = 100 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3003_Dist_max +function HolySwordWolf452000_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 0 + local Odds_Guard = 0 + local AttDist = Att3003_Dist_max + 0 + local fate = ai:GetRandam_Int(1, 100) + local hpratePC = ai:GetHpRate(TARGET_LOCALPLAYER) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3003, TARGET_ENE_0, AttDist, -1, 20) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3003, TARGET_ENE_0, AttDist, -1, 20) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3004, TARGET_ENE_0, AttDist, 0) + end + ai:SetNumber(0, ai:GetNumber(0) + 10) + if hpratePC <= 0.3 then + GetWellSpace_Odds = 50 + else + GetWellSpace_Odds = 100 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3005_Dist_max +function HolySwordWolf452000_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 0 + local Odds_Guard = 0 + local AttDist = Att3005_Dist_max + 0 + local hpratePC = ai:GetHpRate(TARGET_LOCALPLAYER) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3005, TARGET_ENE_0, AttDist, 0, 90) + ai:SetNumber(0, ai:GetNumber(0) + 10) + if hpratePC <= 0.3 then + GetWellSpace_Odds = 50 + else + GetWellSpace_Odds = 100 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_max +function HolySwordWolf452000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 0 + local Odds_Guard = 0 + local AttDist = Att3006_Dist_max + 0 + local hpratePC = ai:GetHpRate(TARGET_LOCALPLAYER) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, AttDist, 0, 90) + if ai:GetNumber(0) < 20 then + ai:SetNumber(0, ai:GetNumber(0) - 3) + elseif ai:GetNumber(0) < 30 then + ai:SetNumber(0, ai:GetNumber(0) - 5) + else + ai:SetNumber(0, ai:GetNumber(0) - 8) + end + if hpratePC <= 0.3 then + GetWellSpace_Odds = 50 + else + GetWellSpace_Odds = 100 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3007_Dist_max +function HolySwordWolf452000_Act05(ai, goal, paramTbl) + local AttDist = Att3007_Dist_max + 0 + local hpratePC = ai:GetHpRate(TARGET_LOCALPLAYER) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3007, TARGET_ENE_0, AttDist, 0) + ai:SetNumber(0, ai:GetNumber(0) + 10) + if hpratePC <= 0.3 then + GetWellSpace_Odds = 50 + else + GetWellSpace_Odds = 100 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3008_Dist_max +function HolySwordWolf452000_Act06(ai, goal, paramTbl) + local AttDist = Att3008_Dist_max + 0 + local hpratePC = ai:GetHpRate(TARGET_LOCALPLAYER) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3008, TARGET_ENE_0, AttDist, 0) + ai:SetNumber(0, ai:GetNumber(0) + 10) + if hpratePC <= 0.3 then + GetWellSpace_Odds = 50 + else + GetWellSpace_Odds = 100 + end + return GetWellSpace_Odds +end + +function HolySwordWolf452000_Act07(ai, goal, paramTbl) + local hpratePC = ai:GetHpRate(TARGET_LOCALPLAYER) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + if ai:GetNumber(0) < 20 then + ai:SetNumber(0, ai:GetNumber(0) - 3) + elseif ai:GetNumber(0) < 30 then + ai:SetNumber(0, ai:GetNumber(0) - 5) + else + ai:SetNumber(0, ai:GetNumber(0) - 8) + end + if hpratePC <= 0.3 then + GetWellSpace_Odds = 50 + else + GetWellSpace_Odds = 100 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att13000_Dist_max +function HolySwordWolf452000_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att13000_Dist_max + local DashDist = Att13000_Dist_max + 200 + local Odds_Guard = 0 + local AttDist = Att13000_Dist_max + 0 + local fate = ai:GetRandam_Int(1, 100) + local hpratePC = ai:GetHpRate(TARGET_LOCALPLAYER) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 10) + end + if fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, AttDist, -1, 20) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, AttDist, -1, 20) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, AttDist, 0) + end + ai:SetNumber(0, ai:GetNumber(0) + 20) + if hpratePC <= 0.3 then + GetWellSpace_Odds = 50 + else + GetWellSpace_Odds = 100 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att13002_Dist_max +function HolySwordWolf452000_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att13002_Dist_max + local DashDist = Att13002_Dist_max + 200 + local Odds_Guard = 0 + local AttDist = Att13002_Dist_max + 0 + local hpratePC = ai:GetHpRate(TARGET_LOCALPLAYER) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 10) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, AttDist, 0, 90) + ai:SetNumber(0, ai:GetNumber(0) + 20) + if hpratePC <= 0.3 then + GetWellSpace_Odds = 50 + else + GetWellSpace_Odds = 100 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att13003_Dist_max +function HolySwordWolf452000_Act10(ai, goal, paramTbl) + local AttDist = Att13003_Dist_max + 0 + local hpratePC = ai:GetHpRate(TARGET_LOCALPLAYER) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3003, TARGET_ENE_0, AttDist, 0) + ai:SetNumber(0, ai:GetNumber(0) + 20) + if hpratePC <= 0.3 then + GetWellSpace_Odds = 50 + else + GetWellSpace_Odds = 100 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att13004_Dist_max +function HolySwordWolf452000_Act11(ai, goal, paramTbl) + local AttDist = Att13004_Dist_max + 0 + local hpratePC = ai:GetHpRate(TARGET_LOCALPLAYER) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3004, TARGET_ENE_0, AttDist, 0) + ai:SetNumber(0, ai:GetNumber(0) + 20) + if hpratePC <= 0.3 then + GetWellSpace_Odds = 50 + else + GetWellSpace_Odds = 100 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3010_Dist_max +function HolySwordWolf452000_Act12(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3010_Dist_max + local DashDist = Att3010_Dist_max + 0 + local Odds_Guard = 0 + local AttDist = Att3010_Dist_max + 0 + local hpratePC = ai:GetHpRate(TARGET_LOCALPLAYER) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3010, TARGET_ENE_0, AttDist, 0, 90) + ai:SetNumber(0, ai:GetNumber(0) + 10) + if hpratePC <= 0.3 then + GetWellSpace_Odds = 50 + else + GetWellSpace_Odds = 100 + end + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3011_Dist_max +function HolySwordWolf452000_Act13(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3011_Dist_max + local DashDist = Att3011_Dist_max + 0 + local Odds_Guard = 0 + local AttDist = Att3011_Dist_max + 0 + local hpratePC = ai:GetHpRate(TARGET_LOCALPLAYER) + if AppDist <= targetDist then + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard, 3) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3011, TARGET_ENE_0, AttDist, -1, 20) + ai:SetNumber(0, ai:GetNumber(0) + 10) + if hpratePC <= 0.3 then + GetWellSpace_Odds = 50 + else + GetWellSpace_Odds = 100 + end + return GetWellSpace_Odds +end + +function HolySwordWolf452000_Act14(ai, goal, paramTbl) + local bRight = ai:GetRandam_Int(0, 1) + local hpratePC = ai:GetHpRate(TARGET_LOCALPLAYER) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 4, TARGET_ENE_0, bRight, ai:GetRandam_Int(120, 120), true, true, -1) + if ai:GetNumber(0) < 20 then + ai:SetNumber(0, ai:GetNumber(0) - 3) + elseif ai:GetNumber(0) < 30 then + ai:SetNumber(0, ai:GetNumber(0) - 5) + else + ai:SetNumber(0, ai:GetNumber(0) - 8) + end + if hpratePC <= 0.3 then + GetWellSpace_Odds = 50 + else + GetWellSpace_Odds = 100 + end + return GetWellSpace_Odds +end + +function HolySwordWolf452000_Act15(ai, goal, paramTbl) + local hpratePC = ai:GetHpRate(TARGET_LOCALPLAYER) + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 4, TARGET_ENE_0, 15, TARGET_ENE_0, true, -1) + if ai:GetNumber(0) < 20 then + ai:SetNumber(0, ai:GetNumber(0) - 3) + elseif ai:GetNumber(0) < 30 then + ai:SetNumber(0, ai:GetNumber(0) - 5) + else + ai:SetNumber(0, ai:GetNumber(0) - 8) + end + if hpratePC <= 0.3 then + GetWellSpace_Odds = 50 + else + GetWellSpace_Odds = 100 + end + return GetWellSpace_Odds +end + +function HolySwordWolf452000_ActAfter(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local KN_fate = ai:GetRandam_Int(1, 100) + local KN_fate2 = ai:GetRandam_Int(1, 100) + local bRight = ai:GetRandam_Int(0, 1) + local hpratePC = ai:GetHpRate(TARGET_LOCALPLAYER) + if ai:GetNumber(0) < 20 then + ai:SetNumber(0, ai:GetNumber(0) - 3) + elseif ai:GetNumber(0) < 30 then + ai:SetNumber(0, ai:GetNumber(0) - 5) + else + ai:SetNumber(0, ai:GetNumber(0) - 8) + end + if ai:HasSpecialEffectId(TARGET_SELF, 5401) then + if targetDist <= 5 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 4, TARGET_ENE_0, 6, TARGET_ENE_0, true, -1) + elseif targetDist <= 8 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 4, TARGET_ENE_0, 15, TARGET_ENE_0, true, -1) + elseif KN_fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 4, TARGET_ENE_0, bRight, ai:GetRandam_Int(120, 120), true, true, -1) + elseif KN_fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 4, TARGET_ENE_0, 20, TARGET_ENE_0, true, -1) + end + elseif targetDist <= 5 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + elseif targetDist <= 8 then + if KN_fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 4, TARGET_ENE_0, bRight, ai:GetRandam_Int(120, 120), true, true, -1) + elseif KN_fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 4, TARGET_ENE_0, 10, TARGET_ENE_0, true, -1) + elseif KN_fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + elseif KN_fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + elseif KN_fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 4, TARGET_ENE_0, bRight, ai:GetRandam_Int(120, 120), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 4, TARGET_ENE_0, 15, TARGET_ENE_0, true, -1) + end + return +end + +function HolySwordWolf452000_ActAfter_AdjustSpace(ai, goal) + goal:AddSubGoal(GOAL_COMMON_If, 10, 0) + return +end + +function HolySwordWolf452000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function HolySwordWolf452000Battle_Terminate(ai, goal) + return +end + +function HolySwordWolf452000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if not ai:HasSpecialEffectId(TARGET_SELF, 5401) then + local superStepDist = 6 + local superStepPer = 100 + if FindAttack_Act(ai, goal, superStepDist, superStepPer) then + if targetDist <= 2 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + elseif targetDist <= 6 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + elseif fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + end + end + local distNearRes = 8 + local oddsNearRes = 100 + if Damaged_Act(ai, goal, distNearRes, oddsNearRes) then + goal:ClearSubGoal() + if targetDist <= 2 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + elseif targetDist <= 6 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + elseif fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + end + return true + end + local distResNear = 6 + local distResFar = 25 + local oddsResNear = 100 + local oddsResFar = 100 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + return true + elseif ResBehavID == 2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 2, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + end + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/520000_battle.lua b/scripts_decompiled/520000_battle.lua new file mode 100644 index 0000000..eb37513 --- /dev/null +++ b/scripts_decompiled/520000_battle.lua @@ -0,0 +1,430 @@ +REGISTER_GOAL(GOAL_Mukade520000_Battle, "mukade520000Battle") +REGISTER_GOAL_NO_UPDATE(GOAL_Mukade520000_Battle, 1) +local A = false +local B = false +function OnIf_520000(ai, goal, codeNo) + if codeNo == 0 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 90) then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3001, TARGET_ENE_0, DIST_None, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3001, TARGET_ENE_0, DIST_None, -1, -1) + end + elseif codeNo == 1 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 90) then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3011, TARGET_ENE_0, DIST_None, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3011, TARGET_ENE_0, DIST_None, -1, -1) + end + end + return +end + +A = B +function mukade520000Battle_Activate(ai, goal) + local hprate = ai:GetHpRate(TARGET_SELF) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + local fate5 = ai:GetRandam_Int(1, 100) + local fate6 = ai:GetRandam_Int(1, 100) + local fate7 = ai:GetRandam_Int(1, 100) + local fate8 = ai:GetRandam_Int(1, 100) + local fate9 = ai:GetRandam_Int(1, 100) + local fate10 = ai:GetRandam_Int(1, 100) + local fate11 = ai:GetRandam_Int(1, 100) + local PARTS_IDX_ARM1 = 0 + local PARTS_IDX_TAIL = 1 + local arm1DmgLv = ai:GetPartsDmg(PARTS_IDX_ARM1) + local tailDmgLv = ai:GetPartsDmg(PARTS_IDX_TAIL) + local Att3000_Dist_min = 3 + local Att3000_Dist_max = 9 + local Att3001_Dist_min = 0 + local Att3001_Dist_max = 8 + local Att3002_Dist_min = 3 + local Att3002_Dist_max = 17.5 + local Att3003_Dist_min = 6 + local Att3003_Dist_max = 13 + local Att3004_Dist_min = -4 + local Att3004_Dist_max = 7.5 + local Att3005_Dist_min = 16 + local Att3005_Dist_max = 25 + local Att3006_Dist_min = 4 + local Att3006_Dist_max = 10 + local Att3007_Dist_min = 2.4 + local Att3007_Dist_max = 7 + local Att3008_Dist_min = -4 + local Att3008_Dist_max = 0 + local Att3009_Dist_min = -4 + local Att3009_Dist_max = 0 + local Att3010_Dist_min = 3 + local Att3010_Dist_max = 9 + local Att3011_Dist_min = 0 + local Att3011_Dist_max = 8 + local Att3012_Dist_min = 6 + local Att3012_Dist_max = 13 + local Att3017_Dist_min = 16 + local Att3017_Dist_max = 25 + local RegenerateArm1Per = 0 + local RegenerateTailPer = 0 + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act08Per = 0 + local Act09Per = 0 + local Act10Per = 0 + local Act11Per = 0 + local Act12Per = 0 + local Act13Per = 0 + local Act14Per = 0 + local Act15Per = 0 + if arm1DmgLv == PARTS_DMG_LV1 then + if A == false then + local local0 = true + SETUPVAL 64 0 0 + ai:SetTimer(0, 40) + elseif ai:GetTimer(0) <= 0 then + RegenerateArm1Per = 100 + local local0 = false + SETUPVAL 64 0 0 + end + elseif tailDmgLv == PARTS_DMG_LV1 then + if B == false then + local local0 = true + SETUPVAL 64 1 0 + ai:SetTimer(1, 40) + elseif ai:GetTimer(1) <= 0 then + RegenerateTailPer = 100 + local local0 = false + SETUPVAL 64 1 0 + end + end + if arm1DmgLv == PARTS_DMG_NONE then + if hprate <= 0.5 and -5 <= targetDist and targetDist <= 2 and fate2 <= 60 then + Act05Per = 100 + elseif hprate <= 0.5 and 16 <= targetDist and targetDist <= 25 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 240) and fate3 <= 60 then + Act07Per = 100 + elseif 2.4 <= targetDist and targetDist <= 7 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 30) and fate4 <= 60 then + Act10Per = 100 + elseif -2 <= targetDist and targetDist <= 7 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 20) and fate5 <= 80 then + Act04Per = 100 + elseif -2 <= targetDist and targetDist <= 7 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 120) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 90) and fate5 <= 80 then + Act04Per = 100 + elseif targetDist <= 0 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 60) and fate6 <= 80 then + Act08Per = 100 + elseif targetDist <= 0 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 60) and fate6 <= 80 then + Act08Per = 100 + elseif targetDist <= 1 and fate7 <= 50 then + Act11Per = 100 + elseif 4.5 <= targetDist and targetDist <= 8 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 40) and fate8 <= 50 then + Act01Per = 100 + elseif 10 <= targetDist and targetDist <= 16 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 40) and fate9 <= 50 then + Act02Per = 100 + elseif 7 <= targetDist and targetDist <= 13 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 120) and fate10 <= 50 then + Act03Per = 100 + elseif 4 <= targetDist and targetDist <= 6.5 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 40) and fate11 <= 35 then + Act06Per = 100 + elseif 20 <= targetDist then + if 0.5 <= hprate then + Act02Per = 100 + else + Act02Per = 25 + Act07Per = 75 + end + elseif 12 <= targetDist then + if 0.5 <= hprate then + Act02Per = 75 + Act03Per = 25 + else + Act02Per = 20 + Act03Per = 5 + Act07Per = 75 + end + elseif 8 <= targetDist then + if 0.5 <= hprate then + Act01Per = 25 + Act02Per = 5 + Act03Per = 60 + Act06Per = 10 + else + Act01Per = 5 + Act02Per = 5 + Act03Per = 15 + Act05Per = 75 + end + elseif 4 <= targetDist then + if 0.5 <= hprate then + Act01Per = 50 + Act03Per = 5 + Act06Per = 30 + Act11Per = 15 + else + Act01Per = 15 + Act05Per = 75 + Act11Per = 10 + end + elseif 0 <= targetDist then + if 0.5 <= hprate then + Act01Per = 15 + Act06Per = 45 + Act09Per = 25 + Act11Per = 15 + else + Act01Per = 15 + Act06Per = 45 + Act09Per = 25 + Act11Per = 15 + end + elseif 0.5 <= hprate then + Act01Per = 15 + Act09Per = 35 + Act11Per = 50 + else + Act01Per = 15 + Act09Per = 35 + Act11Per = 50 + end + elseif hprate <= 0.5 and 12 <= targetDist and targetDist <= 20 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 240) and fate2 <= 35 then + Act15Per = 100 + elseif 2.4 <= targetDist and targetDist <= 7 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 30) and fate3 <= 35 then + Act10Per = 100 + elseif -2 <= targetDist and targetDist <= 7 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 20) and fate4 <= 45 then + Act04Per = 100 + elseif -2 <= targetDist and targetDist <= 7 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 120) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 90) and fate4 <= 45 then + Act04Per = 100 + elseif targetDist <= 0 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 60) and fate5 <= 45 then + Act08Per = 100 + elseif targetDist <= 0 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 60) and fate5 <= 45 then + Act08Per = 100 + elseif targetDist <= 1 and fate6 <= 25 then + Act11Per = 100 + elseif 20 <= targetDist then + if 0.5 <= hprate then + Act09Per = 0 + Act10Per = 0 + Act11Per = 0 + Act12Per = 25 + Act13Per = 25 + Act14Per = 50 + Act15Per = 0 + else + Act09Per = 0 + Act10Per = 0 + Act11Per = 0 + Act12Per = 5 + Act13Per = 5 + Act14Per = 10 + Act15Per = 80 + end + elseif 12 <= targetDist then + if 0.5 <= hprate then + Act09Per = 0 + Act10Per = 0 + Act11Per = 0 + Act12Per = 25 + Act13Per = 25 + Act14Per = 50 + Act15Per = 0 + else + Act09Per = 0 + Act10Per = 0 + Act11Per = 0 + Act12Per = 5 + Act13Per = 5 + Act14Per = 10 + Act15Per = 80 + end + elseif 8 <= targetDist then + if 0.5 <= hprate then + Act09Per = 15 + Act10Per = 0 + Act11Per = 0 + Act12Per = 25 + Act13Per = 15 + Act14Per = 45 + Act15Per = 0 + else + Act09Per = 15 + Act10Per = 0 + Act11Per = 0 + Act12Per = 25 + Act13Per = 15 + Act14Per = 45 + Act15Per = 0 + end + elseif 4 <= targetDist then + if 0.5 <= hprate then + Act09Per = 15 + Act10Per = 0 + Act11Per = 10 + Act12Per = 30 + Act13Per = 25 + Act14Per = 20 + Act15Per = 0 + else + Act09Per = 15 + Act10Per = 0 + Act11Per = 10 + Act12Per = 30 + Act13Per = 25 + Act14Per = 20 + Act15Per = 0 + end + elseif 0 <= targetDist then + if 0.5 <= hprate then + Act09Per = 25 + Act10Per = 0 + Act11Per = 20 + Act12Per = 20 + Act13Per = 35 + Act14Per = 0 + Act15Per = 0 + else + Act09Per = 25 + Act10Per = 0 + Act11Per = 20 + Act12Per = 20 + Act13Per = 35 + Act14Per = 0 + Act15Per = 0 + end + elseif 0.5 <= hprate then + Act09Per = 30 + Act10Per = 0 + Act11Per = 40 + Act12Per = 15 + Act13Per = 15 + Act14Per = 0 + Act15Per = 0 + else + Act09Per = 30 + Act10Per = 0 + Act11Per = 40 + Act12Per = 15 + Act13Per = 15 + Act14Per = 0 + Act15Per = 0 + end + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per) + if RegenerateArm1Per == 100 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 8200, TARGET_NONE, DIST_None, 0, -1) + elseif RegenerateTailPer == 100 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 8210, TARGET_NONE, DIST_None, 0, -1) + elseif fateAct <= Act01Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_None, 1, -1) + elseif fateAct <= Act01Per + Act02Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, Att3002_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, DIST_None, -1, -1) + elseif fateAct <= Act01Per + Act02Per + Act03Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3003_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3003, TARGET_ENE_0, DIST_None, 1, -1) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + if tailDmgLv == PARTS_DMG_LV1 and arm1DmgLv == PARTS_DMG_LV1 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3015, TARGET_ENE_0, DIST_None, 0, -1) + elseif tailDmgLv == PARTS_DMG_LV1 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3014, TARGET_ENE_0, DIST_None, 0, -1) + elseif arm1DmgLv == PARTS_DMG_LV1 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3016, TARGET_ENE_0, DIST_None, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3004, TARGET_ENE_0, DIST_None, 0, -1) + end + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3006_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, DIST_None, 0, -1) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3001_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_If, 10, 0) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3005_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3005, TARGET_ENE_0, DIST_None, -1, -1) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3008, TARGET_ENE_0, DIST_None, 0, -1) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_NONE, 0, AI_DIR_TYPE_B, 7) + elseif fate <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 3, TARGET_ENE_0, Att3007_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3007, TARGET_ENE_0, DIST_None, -1, -1) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3009, TARGET_ENE_0, DIST_None, 0, -1) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3010_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3010, TARGET_ENE_0, DIST_None, 1, -1) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3011_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_If, 10, 1) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per + Act14Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3012_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3012, TARGET_ENE_0, DIST_None, -1, -1) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3017_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3017, TARGET_ENE_0, DIST_None, -1, -1) + end + return +end + +function mukade520000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function mukade520000Battle_Terminate(ai, goal) + return +end + +function mukade520000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distGuardBreak_Act = 13 + local oddsGuardBreak_Act = 80 + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if arm1DmgLv == PARTS_DMG_NONE then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3012, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distUseItem_Act = 13 + local oddsUseItem_Act = 10 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if arm1DmgLv == PARTS_DMG_NONE then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3012, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distResNear = 6 + local distResFar = 13 + local oddsResNear = 0 + local oddsResFar = 15 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 3) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 3) + end + return true + elseif ResBehavID == 2 then + if arm1DmgLv == PARTS_DMG_NONE then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3012, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + return false + end + end + end +end + +return diff --git a/scripts_decompiled/520100_battle.lua b/scripts_decompiled/520100_battle.lua new file mode 100644 index 0000000..51c3241 --- /dev/null +++ b/scripts_decompiled/520100_battle.lua @@ -0,0 +1,88 @@ +REGISTER_GOAL(GOAL_MukadeUde520100_Battle, "mukadeude520100Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 1.8 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 1.9 +local Att3002_Dist_min = 4 +local Att3002_Dist_max = 6.8 +REGISTER_GOAL_NO_UPDATE(GOAL_MukadeUde520100_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3001_Dist_max +function mukadeude520100Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if 5 <= targetDist then + actPerArr[1] = 0 + actPerArr[3] = 0 + actPerArr[4] = 100 + else + actPerArr[1] = 50 + actPerArr[3] = 50 + actPerArr[4] = 0 + end + local local0 = {Att3000_Dist_max, 0, 3000, DIST_Middle} + defFuncParamTbl[1] = local0 + local0 = {Att3001_Dist_max, 0, 3001, DIST_Middle} + defFuncParamTbl[3] = local0 + actFuncArr[4] = REGIST_FUNC(ai, goal, MukadeUde520100_Act04) + local atkAfterFunc = REGIST_FUNC(ai, goal, mukadeude520100_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3002_Dist_max +function MukadeUde520100_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function mukadeude520100_ActAfter_AdjustSpace(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if fate > 60 then + if fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + else + goal:AddSubGoal(GOAL_COMMON_Wait, 2, TARGET_NONE, 0, 0, 0) + return true + end + end + return false +end + +function mukadeude520100Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function mukadeude520100Battle_Terminate(ai, goal) + return +end + +function mukadeude520100Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local oddsResponse = 25 + local bkStepPer = 100 + local leftStepPer = 0 + local rightStepPer = 0 + local safetyDist = 4 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/520200_battle.lua b/scripts_decompiled/520200_battle.lua new file mode 100644 index 0000000..7053cd1 --- /dev/null +++ b/scripts_decompiled/520200_battle.lua @@ -0,0 +1,88 @@ +REGISTER_GOAL(GOAL_MukadeSippo520200_Battle, "mukadesippo520200Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 0.6 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 0.6 +local Att3002_Dist_min = 4 +local Att3002_Dist_max = 5 +REGISTER_GOAL_NO_UPDATE(GOAL_MukadeSippo520200_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3001_Dist_max +function mukadesippo520200Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + if 4 <= targetDist then + actPerArr[1] = 0 + actPerArr[3] = 0 + actPerArr[4] = 100 + else + actPerArr[1] = 50 + actPerArr[3] = 50 + actPerArr[4] = 0 + end + local local0 = {Att3000_Dist_max, 0, 3000, DIST_Middle} + defFuncParamTbl[1] = local0 + local0 = {Att3001_Dist_max, 0, 3001, DIST_Middle} + defFuncParamTbl[3] = local0 + actFuncArr[4] = REGIST_FUNC(ai, goal, MukadeSippo520200_Act04) + local atkAfterFunc = REGIST_FUNC(ai, goal, MukadeSippo520200_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3002_Dist_max +function MukadeSippo520200_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function MukadeSippo520200_ActAfter_AdjustSpace(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if fate > 60 then + if fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, -1, AI_DIR_TYPE_B, 4) + else + goal:AddSubGoal(GOAL_COMMON_Wait, 2, TARGET_NONE, 0, 0, 0) + return true + end + end + return false +end + +function mukadesippo520200Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function mukadesippo520200Battle_Terminate(ai, goal) + return +end + +function mukadesippo520200Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local oddsResponse = 25 + local bkStepPer = 100 + local leftStepPer = 0 + local rightStepPer = 0 + local safetyDist = 4 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/521000_battle.lua b/scripts_decompiled/521000_battle.lua new file mode 100644 index 0000000..7964d89 --- /dev/null +++ b/scripts_decompiled/521000_battle.lua @@ -0,0 +1,283 @@ +REGISTER_GOAL(GOAL_HolySwordWolf521000_Battle, "HolySwordWolf521000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 5.2 +local Att3003_Dist_min = 8 +local Att3003_Dist_max = 13.5 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 4.1 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 1.5 +local Att3007_Dist_min = 3.1 +local Att3007_Dist_max = 4.6 +local Att3008_Dist_min = 3.2 +local Att3008_Dist_max = 6.2 +local Att3009_Dist_min = 0 +local Att3009_Dist_max = 2 +local Att3011_Dist_min = 8 +local Att3011_Dist_max = 12 +local Att13000_Dist_min = 0 +local Att13000_Dist_max = 4.2 +local Att13002_Dist_min = 0 +local Att13002_Dist_max = 3.5 +local Att13003_Dist_min = 0 +local Att13003_Dist_max = 2.6 +local Att13004_Dist_min = 0 +local Att13004_Dist_max = 3.8 +REGISTER_GOAL_NO_UPDATE(GOAL_HolySwordWolf521000_Battle, 1) +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Att3003_Dist_max +Att3000_Dist_min = Att3005_Dist_max +Att3000_Dist_min = Att3006_Dist_max +Att3000_Dist_min = Att13000_Dist_max +Att3000_Dist_min = Att13002_Dist_max +Att3000_Dist_min = Att3009_Dist_max +Att3000_Dist_min = Att3011_Dist_max +function HolySwordWolf521000Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act08Per = 0 + local Act09Per = 0 + local Act10Per = 0 + local Act11Per = 0 + local Act12Per = 0 + local Act13Per = 0 + if ai:HasSpecialEffectId(TARGET_SELF, 5401) then + if 2.6 <= targetDist then + Act08Per = 65 + Act09Per = 35 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 176) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 160) then + Act10Per = 100 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 176) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 160) then + Act11Per = 100 + else + Act08Per = 35 + Act09Per = 65 + end + elseif 13.5 <= targetDist then + Act01Per = 10 + Act02Per = 60 + Act03Per = 10 + Act04Per = 0 + Act07Per = 0 + Act12Per = 0 + Act13Per = 20 + elseif 10 <= targetDist then + Act01Per = 20 + Act02Per = 0 + Act03Per = 25 + Act04Per = 5 + Act07Per = 0 + Act12Per = 0 + Act13Per = 50 + elseif 5.2 <= targetDist then + Act01Per = 40 + Act02Per = 0 + Act03Per = 35 + Act04Per = 20 + Act07Per = 5 + Act12Per = 0 + Act13Per = 0 + elseif 1.5 <= targetDist then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 176) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 160) and fate <= 80 then + Act05Per = 100 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 176) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 160) and fate <= 80 then + Act06Per = 100 + else + Act01Per = 35 + Act02Per = 0 + Act03Per = 35 + Act04Per = 5 + Act07Per = 25 + Act12Per = 0 + end + else + Act01Per = 15 + Act02Per = 0 + Act03Per = 15 + Act04Per = 30 + Act07Per = 10 + Act12Per = 30 + end + if fate2 <= Act01Per then + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 4 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate3 <= 10 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 39) + elseif fate3 <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 39) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 39) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + end + elseif fate2 <= Act01Per + Act02Per then + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 4 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate3 <= 30 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3003, TARGET_ENE_0, DIST_Middle, -1, 60) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3003, TARGET_ENE_0, DIST_Middle, -1, 60) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + elseif fate2 <= Act01Per + Act02Per + Act03Per then + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 4 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3005, TARGET_ENE_0, DIST_Middle, -1, 50) + elseif fate2 <= Act01Per + Act02Per + Act03Per + Act04Per then + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 4 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, DIST_Middle, -1, 49) + elseif fate2 <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + elseif fate2 <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3008, TARGET_ENE_0, DIST_Middle, 0) + elseif fate2 <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 6) + elseif fate2 <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per then + local AppDist = Att13000_Dist_max + local DashDist = Att13000_Dist_max + 200 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate3 <= 45 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 39) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 39) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + end + elseif fate2 <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per then + local AppDist = Att13002_Dist_max + local DashDist = Att13002_Dist_max + 200 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, DIST_Middle, -1, 45) + elseif fate2 <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + elseif fate2 <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + elseif fate2 <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per then + local AppDist = Att3009_Dist_max + local DashDist = Att3009_Dist_max + 4 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate3 <= 30 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3009, TARGET_ENE_0, DIST_Middle, -1, 35) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3009, TARGET_ENE_0, DIST_Middle, -1, 35) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3010, TARGET_ENE_0, DIST_Middle, 0) + end + else + local AppDist = Att3011_Dist_max + local DashDist = Att3011_Dist_max + 4 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3009, TARGET_ENE_0, DIST_Middle, -1, 45) + end + HolySwordWolf521000_ActAfter_AdjustSpace(ai, goal) + return +end + +function HolySwordWolf521000_ActAfter_AdjustSpace(ai, goal) + local hprate = ai:GetHpRate(TARGET_SELF) + local KN_fate = ai:GetRandam_Int(1, 100) + local KN_fate2 = ai:GetRandam_Int(1, 100) + if hprate <= 0.1 then + if KN_fate > 60 then + if KN_fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 10, TARGET_ENE_0, 3.6, TARGET_ENE_0, true, -1) + return true + else + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 2.5, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(15, 30), true, true, -1) + return true + end + else + return true + end + elseif KN_fate > 30 then + if KN_fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 10, TARGET_ENE_0, 5, TARGET_ENE_0, true, -1) + return true + elseif KN_fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 6) + return true + elseif KN_fate <= 100 then + if KN_fate2 <= 60 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + end + end + return +end + +function HolySwordWolf521000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function HolySwordWolf521000Battle_Terminate(ai, goal) + return +end + +function HolySwordWolf521000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if not ai:HasSpecialEffectId(TARGET_SELF, 5401) then + local distGuardBreak_Act = 5.8 + local oddsGuardBreak_Act = 80 + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + return true + end + local distUseItem_Act = 5.8 + local oddsUseItem_Act = 15 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + return true + end + local distResNear = 8 + local distResFar = 25 + local oddsResNear = 0 + local oddsResFar = 30 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + elseif ResBehavID == 2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/522000_battle.lua b/scripts_decompiled/522000_battle.lua new file mode 100644 index 0000000..ed77795 --- /dev/null +++ b/scripts_decompiled/522000_battle.lua @@ -0,0 +1,137 @@ +REGISTER_GOAL(GOAL_Hakaoh522000_Battle, "Hakaoh522000Battle") +REGISTER_GOAL_NO_UPDATE(GOAL_Hakaoh522000_Battle, 1) +function Hakaoh522000Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + local Att3000_Dist_min = 4 + local Att3000_Dist_max = 6 + local Att3001_Dist_min = 2 + local Att3001_Dist_max = 5 + local Att3002_Dist_min = 2 + local Att3002_Dist_max = 7 + local Att3003_Dist_min = 4 + local Att3003_Dist_max = 7 + local Att3004_Dist_min = 3 + local Att3004_Dist_max = 9.3 + local Att3005_Dist_min = 4 + local Att3005_Dist_max = 5 + local Att3006_Dist_min = -4 + local Att3006_Dist_max = 20 + local Att3007_Dist_min = -4 + local Att3007_Dist_max = 3 + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act08Per = 0 + if 10 <= targetDist then + Act01Per = 10 + Act02Per = 5 + Act03Per = 20 + Act04Per = 20 + Act05Per = 5 + Act06Per = 5 + Act07Per = 35 + Act08Per = 0 + elseif 6 <= targetDist then + Act01Per = 10 + Act02Per = 5 + Act03Per = 5 + Act04Per = 20 + Act05Per = 20 + Act06Per = 20 + Act07Per = 20 + Act08Per = 0 + elseif 3.5 <= targetDist then + Act01Per = 10 + Act02Per = 25 + Act03Per = 25 + Act04Per = 10 + Act05Per = 10 + Act06Per = 10 + Act07Per = 10 + Act08Per = 0 + else + Act01Per = 0 + Act02Per = 20 + Act03Per = 20 + Act04Per = 10 + Act05Per = 0 + Act06Per = 0 + Act07Per = 0 + Act08Per = 50 + end + if fate2 <= Act01Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3000_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + elseif fate2 <= Act01Per + Act02Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3001_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + elseif fate2 <= Act01Per + Act02Per + Act03Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3002_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + elseif fate2 <= Act01Per + Act02Per + Act03Per + Act04Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3003_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + elseif fate2 <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3004_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + elseif fate2 <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3005_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + elseif fate2 <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 0 + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + else + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 0 + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + end + Hakaoh522000Battle_Kougeki_Noato(ai, goal) + return +end + +function Hakaoh522000Battle_Kougeki_Noato(ai, goal) + local KN_fate = ai:GetRandam_Int(1, 100) + local KN_fate2 = ai:GetRandam_Int(1, 100) + if KN_fate > 70 then + if KN_fate <= 100 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 2.5, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(15, 30), true, true, -1) + return true + elseif KN_fate <= 100 then + if KN_fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + end + end + return +end + +function Hakaoh522000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Hakaoh522000Battle_Terminate(ai, goal) + return +end + +function Hakaoh522000Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + return false +end + +return diff --git a/scripts_decompiled/523000_battle.lua b/scripts_decompiled/523000_battle.lua new file mode 100644 index 0000000..2e77872 --- /dev/null +++ b/scripts_decompiled/523000_battle.lua @@ -0,0 +1,142 @@ +REGISTER_GOAL(GOAL_KingIzalis523000_Battle, "KingIzalis523000Battle") +REGISTER_GOAL_NO_UPDATE(GOAL_KingIzalis523000_Battle, 1) +function KingIzalis523000Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act40Per = 0 + local Att3000flag = 0 + local Att3001flag = 0 + local Att3002flag = 0 + local Att3003flag = 0 + local Att3004flag = 0 + local Att3005flag = 0 + local Att3006flag = 0 + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1412550) then + Att3000flag = 1 + end + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1412552) then + Att3001flag = 1 + end + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1412554) then + Att3002flag = 1 + end + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1412555) then + Att3003flag = 1 + end + if not not ai:IsInsideTargetRegion(TARGET_ENE_0, 1412556) or ai:IsInsideTargetRegion(TARGET_ENE_0, 1412557) then + Att3004flag = 1 + end + if not not ai:IsInsideTargetRegion(TARGET_ENE_0, 1412560) or ai:IsInsideTargetRegion(TARGET_ENE_0, 1412561) then + Att3005flag = 1 + end + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1412564) then + Att3006flag = 1 + end + if Att3000flag == 1 then + Act01Per = 100 + end + if Att3001flag == 1 then + Act02Per = 100 + end + if Att3002flag == 1 then + Act03Per = 100 + end + if Att3003flag == 1 then + Act04Per = 100 + end + if Att3004flag == 1 then + Act05Per = 100 + end + if Att3005flag == 1 then + Act06Per = 100 + end + if Att3006flag == 1 then + Act07Per = 100 + end + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act40Per) + if fateAct <= Act01Per then + KingIzalis523000_Act01(ai, goal) + elseif fateAct <= Act01Per + Act02Per then + KingIzalis523000_Act02(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per then + KingIzalis523000_Act03(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + KingIzalis523000_Act04(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + KingIzalis523000_Act05(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + KingIzalis523000_Act06(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + KingIzalis523000_Act07(ai, goal) + else + KingIzalis523000_Act40(ai, goal) + end + return +end + +function KingIzalis523000_Act01(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3000, TARGET_ENE_0, DIST_None, 0) + return +end + +function KingIzalis523000_Act02(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3001, TARGET_ENE_0, DIST_None, 0) + return +end + +function KingIzalis523000_Act03(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3002, TARGET_ENE_0, DIST_None, 0) + return +end + +function KingIzalis523000_Act04(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3003, TARGET_ENE_0, DIST_None, 0) + return +end + +function KingIzalis523000_Act05(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3004, TARGET_ENE_0, DIST_None, 0) + return +end + +function KingIzalis523000_Act06(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3005, TARGET_ENE_0, DIST_None, 0) + return +end + +function KingIzalis523000_Act07(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3006, TARGET_ENE_0, DIST_None, 0) + return +end + +function KingIzalis523000_Act40(ai, goal) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(1, 3), TARGET_NONE, 0, 0, 0) + return +end + +function KingIzalis523000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function KingIzalis523000Battle_Terminate(ai, goal) + return +end + +function KingIzalis523000Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/523100_battle.lua b/scripts_decompiled/523100_battle.lua new file mode 100644 index 0000000..3be7944 --- /dev/null +++ b/scripts_decompiled/523100_battle.lua @@ -0,0 +1,87 @@ +REGISTER_GOAL(GOAL_KingIzalis_Second523100_Battle, "KingIzalis_Second523100Battle") +local Att3000_Dist_min = 4.6 +local Att3000_Dist_max = 19 +local Att3001_Dist_min = -4.7 +local Att3001_Dist_max = 3.5 +local Att3002_Dist_min = 4.4 +local Att3002_Dist_max = 27 +local Att3003_Dist_min = 3.2 +local Att3003_Dist_max = 19.5 +local Att3004_Dist_min = 6.4 +local Att3004_Dist_max = 26.1 +REGISTER_GOAL_NO_UPDATE(GOAL_KingIzalis_Second523100_Battle, 1) +Att3000_Dist_min = Att3003_Dist_max +function OnIf_523100(ai, goal, codeNo) + if codeNo == 0 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 140) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 180) then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 140) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + return +end + +Att3000_Dist_min = Att3004_Dist_max +function KingIzalis_Second523100Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if 26.1 <= targetDist then + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 0 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + elseif 19.5 <= targetDist then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 140) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 180) then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 140) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + elseif 10 <= targetDist then + if fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 40 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 140) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 180) then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 140) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + elseif fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + end + elseif fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + end + return +end + +function KingIzalis_Second523100Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function KingIzalis_Second523100Battle_Terminate(ai, goal) + return +end + +function KingIzalis_Second523100Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/524000_battle.lua b/scripts_decompiled/524000_battle.lua new file mode 100644 index 0000000..77afe3d --- /dev/null +++ b/scripts_decompiled/524000_battle.lua @@ -0,0 +1,41 @@ +REGISTER_GOAL(GOAL_PrinceIzalis524000_Battle, "PrinceIzalis524000Battle") +REGISTER_GOAL_NO_UPDATE(GOAL_PrinceIzalis524000_Battle, 1) +function PrinceIzalis524000Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local targetDistY = ai:GetDistYSigned(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1402100) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 150) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 90) then + if fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3003, TARGET_ENE_0, DIST_None, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3005, TARGET_ENE_0, DIST_None, 0, -1) + end + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1402100) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 55) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 170) then + if fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3003, TARGET_ENE_0, DIST_None, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3006, TARGET_ENE_0, DIST_None, 0, -1) + end + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1402100) then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3003, TARGET_ENE_0, DIST_None, 0, -1) + else + goal:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_SELF, 0, 0, 0) + end + return +end + +function PrinceIzalis524000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function PrinceIzalis524000Battle_Terminate(ai, goal) + return +end + +function PrinceIzalis524000Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/525000_battle.lua b/scripts_decompiled/525000_battle.lua new file mode 100644 index 0000000..872a001 --- /dev/null +++ b/scripts_decompiled/525000_battle.lua @@ -0,0 +1,665 @@ +REGISTER_GOAL(GOAL_Tadare525000_Battle, "Tadare525000Battle") +REGISTER_GOAL_NO_UPDATE(GOAL_Tadare525000_Battle, 1) +function Tadare525000Battle_Activate(ai, goal) + local hprate = ai:GetHpRate(TARGET_SELF) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest(1) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + local Act001Per = 0 + local Act002Per = 0 + local Act003Per = 0 + local Act004Per = 0 + local Act005Per = 0 + local Act006Per = 0 + local Act021Per = 0 + local Act022Per = 0 + local Act023Per = 0 + local Act024Per = 0 + local Act025Per = 0 + local Act026Per = 0 + local Act027Per = 0 + local Act041Per = 0 + local Act042Per = 0 + local Act043Per = 0 + local Act044Per = 0 + local Act045Per = 0 + local Act046Per = 0 + local Act047Per = 0 + local Act048Per = 0 + local Act049Per = 0 + local Act061Per = 0 + local Act062Per = 0 + local Act063Per = 0 + local Act064Per = 0 + local Act065Per = 0 + local Act066Per = 0 + local Act067Per = 0 + local Act068Per = 0 + local Act069Per = 0 + local Act070Per = 0 + local Act101Per = 0 + local Act102Per = 0 + local Act103Per = 0 + local Act104Per = 0 + local Act111Per = 0 + local Act112Per = 0 + local WalkArea = ai:GetNumber(0) + 1 + ai:KickLuaCall(10000, WalkArea, 0) + if ai:HasSpecialEffectId(TARGET_SELF, 5131) then + Act101Per = 100 + elseif ai:GetNumber(0) == 0 then + if eventNo == 1 then + Act102Per = 100 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1412795) then + Act112Per = 100 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1412794) then + Act111Per = 100 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1412780) then + Act026Per = 100 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1412790) and targetDist <= 27 then + Act001Per = 50 + Act002Per = 50 + Act003Per = 30 + Act004Per = 10 + Act005Per = 0 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1412790) and targetDist <= 29 then + Act001Per = 10 + Act002Per = 10 + Act003Per = 50 + Act004Per = 30 + Act005Per = 30 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1412790) and targetDist <= 33 then + Act001Per = 0 + Act002Per = 0 + Act003Per = 10 + Act004Per = 50 + Act005Per = 30 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1412790) and targetDist <= 37 then + Act001Per = 0 + Act002Per = 0 + Act003Per = 0 + Act004Per = 30 + Act005Per = 50 + Act104Per = 20 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1412790) and targetDist <= 38.5 then + Act001Per = 0 + Act002Per = 0 + Act003Per = 0 + Act004Per = 0 + Act005Per = 30 + Act104Per = 50 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1412790) and targetDist <= 69.5 then + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1412796) then + if targetDist <= 45 then + Act005Per = 30 + else + Act104Per = 100 + end + else + Act104Per = 25 + Act006Per = 75 + end + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1412790) then + Act104Per = 100 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1412791) and targetDist <= 26 then + Act021Per = 50 + Act022Per = 50 + Act023Per = 30 + Act024Per = 10 + Act025Per = 0 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1412791) and targetDist <= 30 then + Act021Per = 10 + Act022Per = 10 + Act023Per = 50 + Act024Per = 30 + Act025Per = 30 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1412791) and targetDist <= 33 then + Act021Per = 0 + Act022Per = 0 + Act023Per = 10 + Act024Per = 50 + Act025Per = 30 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1412791) and targetDist <= 35 then + Act021Per = 0 + Act022Per = 0 + Act023Per = 0 + Act024Per = 30 + Act025Per = 50 + Act104Per = 20 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1412791) and targetDist <= 38 then + Act021Per = 0 + Act022Per = 0 + Act023Per = 0 + Act024Per = 0 + Act025Per = 30 + Act104Per = 50 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1412791) and targetDist <= 69.5 then + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1412780) then + Act104Per = 35 + else + Act104Per = 25 + Act027Per = 75 + end + else + Act104Per = 100 + end + elseif ai:GetNumber(0) == 1 then + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1412795) then + Act112Per = 100 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1412794) then + Act111Per = 100 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1412790) and targetDist <= 22 then + Act041Per = 50 + Act042Per = 60 + Act043Per = 5 + Act044Per = 0 + Act045Per = 0 + Act046Per = 5 + Act047Per = 0 + Act048Per = 30 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1412790) and targetDist <= 25 then + Act041Per = 5 + Act042Per = 60 + Act043Per = 30 + Act044Per = 10 + Act045Per = 0 + Act046Per = 20 + Act047Per = 5 + Act048Per = 20 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1412790) and targetDist <= 27 then + Act041Per = 5 + Act042Per = 60 + Act043Per = 50 + Act044Per = 10 + Act045Per = 20 + Act046Per = 50 + Act047Per = 20 + Act048Per = 0 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1412790) and targetDist <= 32 then + Act041Per = 0 + Act042Per = 5 + Act043Per = 30 + Act044Per = 30 + Act045Per = 20 + Act046Per = 50 + Act047Per = 20 + Act048Per = 0 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1412790) and targetDist <= 36 then + Act041Per = 0 + Act042Per = 0 + Act043Per = 0 + Act044Per = 50 + Act045Per = 20 + Act046Per = 0 + Act047Per = 20 + Act048Per = 0 + Act104Per = 80 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1412790) and targetDist <= 38.5 then + Act041Per = 0 + Act042Per = 0 + Act043Per = 0 + Act044Per = 50 + Act045Per = 0 + Act046Per = 0 + Act047Per = 0 + Act048Per = 0 + Act104Per = 80 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1412790) and targetDist <= 69.5 then + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1412796) then + if targetDist <= 45 then + Act044Per = 50 + else + Act104Per = 100 + end + else + Act104Per = 25 + Act049Per = 75 + end + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1412790) then + Act104Per = 100 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1412791) and targetDist <= 27 then + Act061Per = 50 + Act062Per = 0 + Act063Per = 5 + Act064Per = 0 + Act065Per = 0 + Act066Per = 10 + Act067Per = 0 + Act068Per = 100 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1412791) and targetDist <= 29 then + Act061Per = 10 + Act062Per = 30 + Act063Per = 50 + Act064Per = 5 + Act065Per = 100 + Act066Per = 0 + Act067Per = 30 + Act068Per = 0 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1412791) and targetDist <= 33 then + Act061Per = 0 + Act062Per = 50 + Act063Per = 50 + Act064Per = 30 + Act065Per = 100 + Act066Per = 30 + Act067Per = 100 + Act068Per = 0 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1412791) and targetDist <= 37 then + Act061Per = 0 + Act062Per = 5 + Act063Per = 5 + Act064Per = 50 + Act065Per = 100 + Act066Per = 50 + Act067Per = 100 + Act068Per = 0 + Act104Per = 50 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1412791) and targetDist <= 40 then + Act061Per = 0 + Act062Per = 0 + Act063Per = 0 + Act064Per = 30 + Act065Per = 50 + Act066Per = 30 + Act067Per = 30 + Act068Per = 0 + Act104Per = 100 + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1412791) and targetDist <= 69.5 then + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1412780) then + Act104Per = 100 + else + Act104Per = 25 + Act070Per = 75 + end + else + Act104Per = 100 + end + end + local fateAct = ai:GetRandam_Int(1, Act001Per + Act002Per + Act003Per + Act004Per + Act005Per + Act006Per + Act021Per + Act022Per + Act023Per + Act024Per + Act025Per + Act026Per + Act027Per + Act041Per + Act042Per + Act043Per + Act044Per + Act045Per + Act046Per + Act047Per + Act048Per + Act049Per + Act061Per + Act062Per + Act063Per + Act064Per + Act065Per + Act066Per + Act067Per + Act068Per + Act069Per + Act070Per + Act101Per + Act102Per + Act103Per + Act104Per + Act111Per + Act112Per) + if fateAct <= Act001Per then + Tadare525000_Act001(ai, goal) + elseif fateAct <= Act001Per + Act002Per then + Tadare525000_Act002(ai, goal) + elseif fateAct <= Act001Per + Act002Per + Act003Per then + Tadare525000_Act003(ai, goal) + elseif fateAct <= Act001Per + Act002Per + Act003Per + Act004Per then + Tadare525000_Act004(ai, goal) + elseif fateAct <= Act001Per + Act002Per + Act003Per + Act004Per + Act005Per then + Tadare525000_Act005(ai, goal) + elseif fateAct <= Act001Per + Act002Per + Act003Per + Act004Per + Act005Per + Act006Per then + Tadare525000_Act006(ai, goal) + elseif fateAct <= Act001Per + Act002Per + Act003Per + Act004Per + Act005Per + Act006Per + Act021Per then + Tadare525000_Act021(ai, goal) + elseif fateAct <= Act001Per + Act002Per + Act003Per + Act004Per + Act005Per + Act006Per + Act021Per + Act022Per then + Tadare525000_Act022(ai, goal) + elseif fateAct <= Act001Per + Act002Per + Act003Per + Act004Per + Act005Per + Act006Per + Act021Per + Act022Per + Act023Per then + Tadare525000_Act023(ai, goal) + elseif fateAct <= Act001Per + Act002Per + Act003Per + Act004Per + Act005Per + Act006Per + Act021Per + Act022Per + Act023Per + Act024Per then + Tadare525000_Act024(ai, goal) + elseif fateAct <= Act001Per + Act002Per + Act003Per + Act004Per + Act005Per + Act006Per + Act021Per + Act022Per + Act023Per + Act024Per + Act025Per then + Tadare525000_Act025(ai, goal) + elseif fateAct <= Act001Per + Act002Per + Act003Per + Act004Per + Act005Per + Act006Per + Act021Per + Act022Per + Act023Per + Act024Per + Act025Per + Act026Per then + Tadare525000_Act026(ai, goal) + elseif fateAct <= Act001Per + Act002Per + Act003Per + Act004Per + Act005Per + Act006Per + Act021Per + Act022Per + Act023Per + Act024Per + Act025Per + Act026Per + Act027Per then + Tadare525000_Act027(ai, goal) + elseif fateAct <= Act001Per + Act002Per + Act003Per + Act004Per + Act005Per + Act006Per + Act021Per + Act022Per + Act023Per + Act024Per + Act025Per + Act026Per + Act027Per + Act041Per then + Tadare525000_Act041(ai, goal) + elseif fateAct <= Act001Per + Act002Per + Act003Per + Act004Per + Act005Per + Act006Per + Act021Per + Act022Per + Act023Per + Act024Per + Act025Per + Act026Per + Act027Per + Act041Per + Act042Per then + Tadare525000_Act042(ai, goal) + elseif fateAct <= Act001Per + Act002Per + Act003Per + Act004Per + Act005Per + Act006Per + Act021Per + Act022Per + Act023Per + Act024Per + Act025Per + Act026Per + Act027Per + Act041Per + Act042Per + Act043Per then + Tadare525000_Act043(ai, goal) + elseif fateAct <= Act001Per + Act002Per + Act003Per + Act004Per + Act005Per + Act006Per + Act021Per + Act022Per + Act023Per + Act024Per + Act025Per + Act026Per + Act027Per + Act041Per + Act042Per + Act043Per + Act044Per then + Tadare525000_Act044(ai, goal) + elseif fateAct <= Act001Per + Act002Per + Act003Per + Act004Per + Act005Per + Act006Per + Act021Per + Act022Per + Act023Per + Act024Per + Act025Per + Act026Per + Act027Per + Act041Per + Act042Per + Act043Per + Act044Per + Act045Per then + Tadare525000_Act045(ai, goal) + elseif fateAct <= Act001Per + Act002Per + Act003Per + Act004Per + Act005Per + Act006Per + Act021Per + Act022Per + Act023Per + Act024Per + Act025Per + Act026Per + Act027Per + Act041Per + Act042Per + Act043Per + Act044Per + Act045Per + Act046Per then + Tadare525000_Act046(ai, goal) + elseif fateAct <= Act001Per + Act002Per + Act003Per + Act004Per + Act005Per + Act006Per + Act021Per + Act022Per + Act023Per + Act024Per + Act025Per + Act026Per + Act027Per + Act041Per + Act042Per + Act043Per + Act044Per + Act045Per + Act046Per + Act047Per then + Tadare525000_Act047(ai, goal) + elseif fateAct <= Act001Per + Act002Per + Act003Per + Act004Per + Act005Per + Act006Per + Act021Per + Act022Per + Act023Per + Act024Per + Act025Per + Act026Per + Act027Per + Act041Per + Act042Per + Act043Per + Act044Per + Act045Per + Act046Per + Act047Per + Act048Per then + Tadare525000_Act048(ai, goal) + elseif fateAct <= Act001Per + Act002Per + Act003Per + Act004Per + Act005Per + Act006Per + Act021Per + Act022Per + Act023Per + Act024Per + Act025Per + Act026Per + Act027Per + Act041Per + Act042Per + Act043Per + Act044Per + Act045Per + Act046Per + Act047Per + Act048Per + Act049Per then + Tadare525000_Act049(ai, goal) + elseif fateAct <= Act001Per + Act002Per + Act003Per + Act004Per + Act005Per + Act006Per + Act021Per + Act022Per + Act023Per + Act024Per + Act025Per + Act026Per + Act027Per + Act041Per + Act042Per + Act043Per + Act044Per + Act045Per + Act046Per + Act047Per + Act048Per + Act049Per + Act061Per then + Tadare525000_Act061(ai, goal) + elseif fateAct <= Act001Per + Act002Per + Act003Per + Act004Per + Act005Per + Act006Per + Act021Per + Act022Per + Act023Per + Act024Per + Act025Per + Act026Per + Act027Per + Act041Per + Act042Per + Act043Per + Act044Per + Act045Per + Act046Per + Act047Per + Act048Per + Act049Per + Act061Per + Act062Per then + Tadare525000_Act062(ai, goal) + elseif fateAct <= Act001Per + Act002Per + Act003Per + Act004Per + Act005Per + Act006Per + Act021Per + Act022Per + Act023Per + Act024Per + Act025Per + Act026Per + Act027Per + Act041Per + Act042Per + Act043Per + Act044Per + Act045Per + Act046Per + Act047Per + Act048Per + Act049Per + Act061Per + Act062Per + Act063Per then + Tadare525000_Act063(ai, goal) + elseif fateAct <= Act001Per + Act002Per + Act003Per + Act004Per + Act005Per + Act006Per + Act021Per + Act022Per + Act023Per + Act024Per + Act025Per + Act026Per + Act027Per + Act041Per + Act042Per + Act043Per + Act044Per + Act045Per + Act046Per + Act047Per + Act048Per + Act049Per + Act061Per + Act062Per + Act063Per + Act064Per then + Tadare525000_Act064(ai, goal) + elseif fateAct <= Act001Per + Act002Per + Act003Per + Act004Per + Act005Per + Act006Per + Act021Per + Act022Per + Act023Per + Act024Per + Act025Per + Act026Per + Act027Per + Act041Per + Act042Per + Act043Per + Act044Per + Act045Per + Act046Per + Act047Per + Act048Per + Act049Per + Act061Per + Act062Per + Act063Per + Act064Per + Act065Per then + Tadare525000_Act065(ai, goal) + elseif fateAct <= Act001Per + Act002Per + Act003Per + Act004Per + Act005Per + Act006Per + Act021Per + Act022Per + Act023Per + Act024Per + Act025Per + Act026Per + Act027Per + Act041Per + Act042Per + Act043Per + Act044Per + Act045Per + Act046Per + Act047Per + Act048Per + Act049Per + Act061Per + Act062Per + Act063Per + Act064Per + Act065Per + Act066Per then + Tadare525000_Act066(ai, goal) + elseif fateAct <= Act001Per + Act002Per + Act003Per + Act004Per + Act005Per + Act006Per + Act021Per + Act022Per + Act023Per + Act024Per + Act025Per + Act026Per + Act027Per + Act041Per + Act042Per + Act043Per + Act044Per + Act045Per + Act046Per + Act047Per + Act048Per + Act049Per + Act061Per + Act062Per + Act063Per + Act064Per + Act065Per + Act066Per + Act067Per then + Tadare525000_Act067(ai, goal) + elseif fateAct <= Act001Per + Act002Per + Act003Per + Act004Per + Act005Per + Act006Per + Act021Per + Act022Per + Act023Per + Act024Per + Act025Per + Act026Per + Act041Per + Act042Per + Act043Per + Act044Per + Act045Per + Act046Per + Act047Per + Act048Per + Act049Per + Act061Per + Act062Per + Act063Per + Act064Per + Act065Per + Act066Per + Act067Per + Act068Per then + Tadare525000_Act068(ai, goal) + elseif fateAct <= Act001Per + Act002Per + Act003Per + Act004Per + Act005Per + Act006Per + Act021Per + Act022Per + Act023Per + Act024Per + Act025Per + Act026Per + Act027Per + Act041Per + Act042Per + Act043Per + Act044Per + Act045Per + Act046Per + Act047Per + Act048Per + Act049Per + Act061Per + Act062Per + Act063Per + Act064Per + Act065Per + Act066Per + Act067Per + Act068Per + Act069Per then + Tadare525000_Act069(ai, goal) + elseif fateAct <= Act001Per + Act002Per + Act003Per + Act004Per + Act005Per + Act006Per + Act021Per + Act022Per + Act023Per + Act024Per + Act025Per + Act026Per + Act027Per + Act041Per + Act042Per + Act043Per + Act044Per + Act045Per + Act046Per + Act047Per + Act048Per + Act049Per + Act061Per + Act062Per + Act063Per + Act064Per + Act065Per + Act066Per + Act067Per + Act068Per + Act069Per + Act070Per then + Tadare525000_Act070(ai, goal) + elseif fateAct <= Act001Per + Act002Per + Act003Per + Act004Per + Act005Per + Act006Per + Act021Per + Act022Per + Act023Per + Act024Per + Act025Per + Act026Per + Act027Per + Act041Per + Act042Per + Act043Per + Act044Per + Act045Per + Act046Per + Act047Per + Act048Per + Act049Per + Act061Per + Act062Per + Act063Per + Act064Per + Act065Per + Act066Per + Act067Per + Act068Per + Act069Per + Act070Per + Act101Per then + Tadare525000_Act101(ai, goal) + elseif fateAct <= Act001Per + Act002Per + Act003Per + Act004Per + Act005Per + Act006Per + Act021Per + Act022Per + Act023Per + Act024Per + Act025Per + Act026Per + Act027Per + Act041Per + Act042Per + Act043Per + Act044Per + Act045Per + Act046Per + Act047Per + Act048Per + Act049Per + Act061Per + Act062Per + Act063Per + Act064Per + Act065Per + Act066Per + Act067Per + Act068Per + Act069Per + Act070Per + Act101Per + Act102Per then + Tadare525000_Act102(ai, goal) + elseif fateAct <= Act001Per + Act002Per + Act003Per + Act004Per + Act005Per + Act006Per + Act021Per + Act022Per + Act023Per + Act024Per + Act025Per + Act026Per + Act027Per + Act041Per + Act042Per + Act043Per + Act044Per + Act045Per + Act046Per + Act047Per + Act048Per + Act049Per + Act061Per + Act062Per + Act063Per + Act064Per + Act065Per + Act066Per + Act067Per + Act068Per + Act069Per + Act070Per + Act101Per + Act102Per + Act103Per then + Tadare525000_Act103(ai, goal) + elseif fateAct <= Act001Per + Act002Per + Act003Per + Act004Per + Act005Per + Act006Per + Act021Per + Act022Per + Act023Per + Act024Per + Act025Per + Act026Per + Act027Per + Act041Per + Act042Per + Act043Per + Act044Per + Act045Per + Act046Per + Act047Per + Act048Per + Act049Per + Act061Per + Act062Per + Act063Per + Act064Per + Act065Per + Act066Per + Act067Per + Act068Per + Act069Per + Act070Per + Act101Per + Act102Per + Act103Per + Act104Per then + Tadare525000_Act104(ai, goal) + elseif fateAct <= Act001Per + Act002Per + Act003Per + Act004Per + Act005Per + Act006Per + Act021Per + Act022Per + Act023Per + Act024Per + Act025Per + Act026Per + Act027Per + Act041Per + Act042Per + Act043Per + Act044Per + Act045Per + Act046Per + Act047Per + Act048Per + Act049Per + Act061Per + Act062Per + Act063Per + Act064Per + Act065Per + Act066Per + Act067Per + Act068Per + Act069Per + Act070Per + Act101Per + Act102Per + Act103Per + Act104Per + Act111Per then + Tadare525000_Act111(ai, goal) + else + Tadare525000_Act112(ai, goal) + end + return +end + +function Tadare525000_Act001(ai, goal) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 20, 3000, TARGET_ENE_0, 35, 2.5, 25) + return +end + +function Tadare525000_Act002(ai, goal) + local fate2 = ai:GetRandam_Int(1, 100) + if fate2 <= 40 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 20, 3001, TARGET_ENE_0, 40, 2.5, 25) + elseif fate2 <= 95 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 20, 3001, TARGET_ENE_0, 40, 2.5, 25) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 20, 3005, TARGET_ENE_0, 40, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 20, 3001, TARGET_ENE_0, 40, 2.5, 25) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 20, 3005, TARGET_ENE_0, 40, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 20, 3005, TARGET_ENE_0, 40, 0) + end + return +end + +function Tadare525000_Act003(ai, goal) + local fate2 = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 20, 3002, TARGET_ENE_0, 40, 2.5, 45) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 20, 3006, TARGET_ENE_0, 40, 0) + return +end + +function Tadare525000_Act004(ai, goal) + local fate2 = ai:GetRandam_Int(1, 100) + if fate2 <= 40 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 20, 3003, TARGET_ENE_0, 43, 2.5, 5) + elseif fate2 <= 90 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 20, 3007, TARGET_ENE_0, 43, 2.5, 5) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 20, 3010, TARGET_ENE_0, 43, 2.5, 5) + end + return +end + +function Tadare525000_Act005(ai, goal) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 20, 3004, TARGET_ENE_0, 45, 2.5, 5) + return +end + +function Tadare525000_Act006(ai, goal) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 20, 3025, TARGET_ENE_0, DIST_None, 2.5, 5) + return +end + +function Tadare525000_Act021(ai, goal) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 20, 3015, TARGET_ENE_0, 35, 2.5, 25) + return +end + +function Tadare525000_Act022(ai, goal) + local fate2 = ai:GetRandam_Int(1, 100) + if fate2 <= 40 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 20, 3016, TARGET_ENE_0, 40, 2.5, 25) + elseif fate2 <= 95 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 20, 3016, TARGET_ENE_0, 40, 2.5, 25) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 20, 3020, TARGET_ENE_0, 40, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 20, 3016, TARGET_ENE_0, 40, 2.5, 25) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 20, 3020, TARGET_ENE_0, 40, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 20, 3020, TARGET_ENE_0, 40, 0) + end + return +end + +function Tadare525000_Act023(ai, goal) + local fate2 = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 20, 3017, TARGET_ENE_0, 40, 2.5, 45) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 20, 3021, TARGET_ENE_0, 40, 0) + return +end + +function Tadare525000_Act024(ai, goal) + local fate2 = ai:GetRandam_Int(1, 100) + if fate2 <= 40 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 20, 3018, TARGET_ENE_0, 43, 2.5, 5) + elseif fate2 <= 90 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 20, 3022, TARGET_ENE_0, 43, 2.5, 5) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 20, 3023, TARGET_ENE_0, 43, 2.5, 5) + end + return +end + +function Tadare525000_Act025(ai, goal) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 20, 3019, TARGET_ENE_0, 45, 2.5, 5) + return +end + +function Tadare525000_Act026(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + ai:SetEventMoveTarget(1412720) + local EventPointDist = ai:GetDistAtoB(POINT_EVENT, TARGET_SELF) + if 2 <= EventPointDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, POINT_EVENT, 0.05, TARGET_SELF, false, -1) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 20, 3024, TARGET_ENE_0, DIST_None, 2.5, 5) + end + return +end + +function Tadare525000_Act027(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 20, 3024, TARGET_ENE_0, DIST_None, 2.5, 5) + return +end + +function Tadare525000_Act041(ai, goal) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 20, 3000, TARGET_ENE_0, 35, 2.5, 25) + return +end + +function Tadare525000_Act042(ai, goal) + local fate2 = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 20, 3002, TARGET_ENE_0, 40, 2.5, 45) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 20, 3006, TARGET_ENE_0, 40, 0) + return +end + +function Tadare525000_Act043(ai, goal) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 20, 3003, TARGET_ENE_0, 43, 2.5, 5) + return +end + +function Tadare525000_Act044(ai, goal) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 20, 3004, TARGET_ENE_0, 45, 2.5, 5) + return +end + +function Tadare525000_Act045(ai, goal) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 20, 3010, TARGET_ENE_0, 45, 2.5, 5) + return +end + +function Tadare525000_Act046(ai, goal) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 20, 3011, TARGET_ENE_0, 45, 2.5, 10) + return +end + +function Tadare525000_Act047(ai, goal) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 20, 3012, TARGET_ENE_0, 45, 2.5, 5) + return +end + +function Tadare525000_Act048(ai, goal) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 20, 3013, TARGET_ENE_0, 35, 2.5, 5) + return +end + +function Tadare525000_Act049(ai, goal) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 20, 3023, TARGET_ENE_0, DIST_None, 2.5, 5) + return +end + +function Tadare525000_Act061(ai, goal) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 20, 3015, TARGET_ENE_0, 35, 2.5, 25) + return +end + +function Tadare525000_Act062(ai, goal) + local fate2 = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 20, 3017, TARGET_ENE_0, 40, 2.5, 45) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 20, 3021, TARGET_ENE_0, 40, 0) + return +end + +function Tadare525000_Act063(ai, goal) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 20, 3018, TARGET_ENE_0, 43, 2.5, 5) + return +end + +function Tadare525000_Act064(ai, goal) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 20, 3019, TARGET_ENE_0, 45, 2.5, 5) + return +end + +function Tadare525000_Act065(ai, goal) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 20, 3025, TARGET_ENE_0, 45, 2.5, 5) + return +end + +function Tadare525000_Act066(ai, goal) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 20, 3026, TARGET_ENE_0, 45, 2.5, 10) + return +end + +function Tadare525000_Act067(ai, goal) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 20, 3027, TARGET_ENE_0, 45, 2.5, 5) + return +end + +function Tadare525000_Act068(ai, goal) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 20, 3028, TARGET_ENE_0, 30, 2.5, 5) + return +end + +function Tadare525000_Act069(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + ai:SetEventMoveTarget(1412720) + local EventPointDist = ai:GetDistAtoB(POINT_EVENT, TARGET_SELF) + if 2 <= EventPointDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, POINT_EVENT, 0.05, TARGET_SELF, false, -1) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 20, 3022, TARGET_ENE_0, DIST_None, 2.5, 5) + end + return +end + +function Tadare525000_Act070(ai, goal) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 20, 3022, TARGET_ENE_0, DIST_None, 2.5, 5) + return +end + +function Tadare525000_Act101(ai, goal) + goal:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_SELF, 0, 0, 0) + return +end + +function Tadare525000_Act102(ai, goal) + local StateNo = ai:GetNumber(0) + ai:SetNumber(0, StateNo + 1) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3009, TARGET_ENE_0, DIST_None, 0) + return +end + +function Tadare525000_Act103(ai, goal) + local StateNo = ai:GetNumber(0) + ai:SetNumber(0, StateNo + 1) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3008, TARGET_ENE_0, DIST_None, 0) + return +end + +function Tadare525000_Act104(ai, goal) + local EventPointDist = ai:GetDist_Point(POINT_EVENT) + if 2 <= EventPointDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, POINT_EVENT, 0.05, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Turn, 5, TARGET_ENE_0, 30) + else + goal:AddSubGoal(GOAL_COMMON_Wait, 0.01, TARGET_ENE_0, 0, 0, 0) + end + return +end + +function Tadare525000_Act111(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + ai:SetEventMoveTarget(1412713) + local EventPointDist = ai:GetDistAtoB(POINT_EVENT, TARGET_SELF) + if 2 <= EventPointDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, POINT_EVENT, 0.05, TARGET_SELF, false, -1) + elseif ai:HasSpecialEffectId(TARGET_SELF, 5133) then + if 34 <= targetDist then + if fate <= 30 then + Tadare525000_Act065(ai, goal) + else + Tadare525000_Act067(ai, goal) + end + else + Tadare525000_Act068(ai, goal) + end + elseif 38 <= targetDist then + Tadare525000_Act005(ai, goal) + elseif 32 <= targetDist then + Tadare525000_Act004(ai, goal) + else + Tadare525000_Act001(ai, goal) + end + return +end + +function Tadare525000_Act112(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + ai:SetEventMoveTarget(1412711) + local EventPointDist = ai:GetDistAtoB(POINT_EVENT, TARGET_SELF) + if 2 <= EventPointDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, POINT_EVENT, 0.05, TARGET_SELF, false, -1) + else + goal:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_ENE_0, 0, 0, 0) + end + return +end + +function Tadare525000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Tadare525000Battle_Terminate(ai, goal) + return +end + +function Tadare525000Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + return false +end + +return diff --git a/scripts_decompiled/526000_battle.lua b/scripts_decompiled/526000_battle.lua new file mode 100644 index 0000000..5c0d30b --- /dev/null +++ b/scripts_decompiled/526000_battle.lua @@ -0,0 +1,268 @@ +REGISTER_GOAL(GOAL_Donsyoku526000_Battle, "Donsyoku526000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 4 +local Att3001_Dist_min = 0 +local Att3001_Dist_max = 1.5 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 4 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 6 +local Att3005_Dist_min = 0 +local Att3005_Dist_max = 8 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 8 +local Att3007_Dist_min = 0 +local Att3007_Dist_max = 5 +local Att3008_Dist_min = 0 +local Att3008_Dist_max = 25 +local Att3009_Dist_min = 8 +local Att3009_Dist_max = 14 +local Att3010_Dist_min = -6 +local Att3010_Dist_max = -3 +REGISTER_GOAL_NO_UPDATE(GOAL_Donsyoku526000_Battle, 1) +function Donsyoku526000Battle_Activate(ai, goal) + local hprate = ai:GetHpRate(TARGET_SELF) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act08Per = 0 + local Act09Per = 0 + local Act10Per = 0 + local Act01PerOdds = 0 + local Act02PerOdds = 0 + local Act03PerOdds = 0 + local Act04PerOdds = 0 + local Act05PerOdds = 0 + local Act06PerOdds = 0 + local Act07PerOdds = 0 + local Act08PerOdds = 0 + local Act09PerOdds = 0 + local Act10PerOdds = 0 + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 240) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 120) and targetDist <= -0.5 then + Act01PerOdds = 3 + end + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 120) and targetDist <= -3 then + Act06PerOdds = 3 + end + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 45) and 0 <= targetDist and targetDist <= 2 then + Act02PerOdds = 1 + else + Act02PerOdds = 0.5 + end + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 90) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 200) and 0 <= targetDist and targetDist <= 5 then + Act03PerOdds = 1.5 + else + Act03PerOdds = 0.5 + end + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 45) and 0 <= targetDist and targetDist <= 5 then + Act04PerOdds = 1.5 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 220) then + Act04PerOdds = 0 + else + Act04PerOdds = 0.5 + end + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 240) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 330) and 0 <= targetDist and targetDist <= 10 then + Act05PerOdds = 2.5 + end + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 170) then + if 2 <= targetDist then + Act07PerOdds = 2.5 + else + Act07PerOdds = 5 + end + elseif targetDist <= 3 then + Act07PerOdds = 1 + end + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 45) and 8 <= targetDist and targetDist <= 14 then + Act09PerOdds = 1 + elseif 8 <= targetDist and targetDist <= 14 then + Act09PerOdds = 0.75 + elseif 4 <= targetDist and targetDist <= 8 then + Act09PerOdds = 0.25 + end + ai:AddObserveChrDmySphere(0, TARGET_ENE_0, 120, 16) + if ai:IsInsideObserve(0) and hprate <= 0.6 and ai:IsFinishTimer(1) == true then + Act08PerOdds = 1 + end + if 10 <= targetDist and targetDist <= 25 then + Act10PerOdds = 1.5 + elseif 10 <= targetDist then + Act10PerOdds = 1 + end + if 10 <= targetDist then + Act01Per = 0 * Act01PerOdds + Act02Per = 5 * Act02PerOdds + Act03Per = 5 * Act03PerOdds + Act04Per = 5 * Act04PerOdds + Act05Per = 0 * Act05PerOdds + Act06Per = 0 * Act06PerOdds + Act07Per = 0 * Act07PerOdds + Act08Per = 15 * Act08PerOdds + Act09Per = 15 * Act09PerOdds + Act10Per = 30 * Act10PerOdds + elseif 2 <= targetDist then + Act01Per = 0 * Act01PerOdds + Act02Per = 30 * Act02PerOdds + Act03Per = 30 * Act03PerOdds + Act04Per = 30 * Act04PerOdds + Act05Per = 15 * Act05PerOdds + Act06Per = 0 * Act06PerOdds + Act07Per = 15 * Act07PerOdds + Act08Per = 15 * Act08PerOdds + Act09Per = 15 * Act09PerOdds + Act10Per = 0 * Act10PerOdds + else + Act01Per = 30 * Act01PerOdds + Act02Per = 30 * Act02PerOdds + Act03Per = 30 * Act03PerOdds + Act04Per = 30 * Act04PerOdds + Act05Per = 15 * Act05PerOdds + Act06Per = 30 * Act06PerOdds + Act07Per = 15 * Act07PerOdds + Act08Per = 15 * Act08PerOdds + Act09Per = 0 * Act09PerOdds + Act10Per = 0 * Act10PerOdds + end + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per) + if fateAct <= Act01Per then + Donsyoku_Act1(ai, goal) + elseif fateAct <= Act01Per + Act02Per then + Donsyoku_Act2(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per then + Donsyoku_Act3(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + Donsyoku_Act4(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + Donsyoku_Act5(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + Donsyoku_Act6(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + Donsyoku_Act7(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per then + Donsyoku_Act8(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per then + Donsyoku_Act9(ai, goal) + else + Donsyoku_Act10(ai, goal) + end + return +end + +function Donsyoku_Act1(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 30, 3000, TARGET_ENE_0, DIST_Middle, 0) + return +end + +Att3000_Dist_min = Att3001_Dist_max +function Donsyoku_Act2(ai, goal) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3001_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 30, 3001, TARGET_ENE_0, DIST_Middle, 0) + return +end + +Att3000_Dist_min = Att3002_Dist_max +function Donsyoku_Act3(ai, goal) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3002_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 30, 3002, TARGET_ENE_0, DIST_Middle, 0) + return +end + +Att3000_Dist_min = Att3003_Dist_max +function Donsyoku_Act4(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3003_Dist_max, TARGET_SELF, true, -1) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 30, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack_SuccessAngle180, 30, 3003, TARGET_ENE_0, 15, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 30, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + return +end + +function Donsyoku_Act5(ai, goal) + local PARTS_IDX_TAIL = 0 + local tailDmgLv = ai:GetPartsDmg(PARTS_IDX_TAIL) + if tailDmgLv == PARTS_DMG_FINAL then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 30, 3006, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 30, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + return +end + +function Donsyoku_Act6(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 30, 3010, TARGET_ENE_0, DIST_Middle, 0) + return +end + +function Donsyoku_Act7(ai, goal) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 30, 3007, TARGET_ENE_0, DIST_Middle, 0, -1) + return +end + +function Donsyoku_Act8(ai, goal) + ai:SetTimer(1, 30) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 30, 3008, TARGET_ENE_0, DIST_None, 0) + return +end + +Att3000_Dist_min = Att3009_Dist_max +function Donsyoku_Act9(ai, goal) + goal:AddSubGoal(GOAL_COMMON_Turn, 3, TARGET_ENE_0, 20, 0, 0) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 30, TARGET_ENE_0, Att3009_Dist_max, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 30, 3009, TARGET_ENE_0, DIST_Middle, -1, 20) + return +end + +function Donsyoku_Act10(ai, goal) + goal:AddSubGoal(GOAL_COMMON_Turn, 3, TARGET_ENE_0, 20, 0, 0) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, 25, TARGET_SELF, true, -1) + goal:AddSubGoal(GOAL_COMMON_ComboAttack_SuccessAngle180, 30, 3003, TARGET_ENE_0, DIST_None, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 30, 3004, TARGET_ENE_0, DIST_Middle, 0) + return +end + +function Donsyoku526000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Donsyoku526000Battle_Terminate(ai, goal) + return +end + +function Donsyoku526000Battle_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + if ai:IsInterupt(INTERUPT_SuccessThrow) then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Wait, 1, 0, 0, 0, 0) + return true + elseif ai:IsInterupt(INTERUPT_Damaged) then + local eventNo = ai:GetEventRequest(0) + if eventNo == 1 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 45) and targetDist <= 5 and ai:IsFinishTimer(0) == true and fate <= 100 then + ai:SetTimer(0, 30) + goal:ClearSubGoal() + if fate2 <= 25 then + goal:AddSubGoal(GOAL_COMMON_Attack, 30, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack_SuccessAngle180, 30, 3003, TARGET_ENE_0, DIST_None, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 30, 3004, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/527000_battle.lua b/scripts_decompiled/527000_battle.lua new file mode 100644 index 0000000..b900578 --- /dev/null +++ b/scripts_decompiled/527000_battle.lua @@ -0,0 +1,419 @@ +REGISTER_GOAL(GOAL_Griffith527000_Battle, "Griffith527000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 4.5 +local Att3004_Dist_min = 5.3 +local Att3004_Dist_max = 6.2 +local Att3005_Dist_min = 9.1 +local Att3005_Dist_max = 10.8 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 2.4 +local Att3007_Dist_min = 10.4 +local Att3007_Dist_max = 12.3 +local Att3008_Dist_min = 0 +local Att3008_Dist_max = 4.5 +local Att3011_Dist_min = 3 +local Att3011_Dist_max = 6 +local Att3012_Dist_min = 10.3 +local Att3012_Dist_max = 11.4 +local Att3013_Dist_min = 0 +local Att3013_Dist_max = 2.5 +local Att3016_Dist_min = 0 +local Att3016_Dist_max = 8 +local Att3017_Dist_min = 0 +local Att3017_Dist_max = 4.9 +REGISTER_GOAL_NO_UPDATE(GOAL_Griffith527000_Battle, 1) +function OnIf_527000(ai, goal, codeNo) + local targetDist = ai:GetDist(TARGET_ENE_0) + local OddsLR = ai:GetRandam_Int(1, 100) + if codeNo == 0 then + if ai:IsInsideTarget(TARGET_FRI_0, AI_DIR_TYPE_R, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_FRI_0, 0, AI_DIR_TYPE_L, 4) + elseif ai:IsInsideTarget(TARGET_FRI_0, AI_DIR_TYPE_L, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_FRI_0, 0, AI_DIR_TYPE_R, 4) + elseif ai:IsInsideTarget(TARGET_FRI_0, AI_DIR_TYPE_F, 120) then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_FRI_0, 0, AI_DIR_TYPE_B, 4) + elseif OddsLR <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_FRI_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_FRI_0, 0, AI_DIR_TYPE_R, 4) + end + end + return +end + +function Griffith527000Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + ai:AddObserveArea(0, TARGET_FRI_0, TARGET_SELF, AI_DIR_TYPE_F, 360, 13) + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act08Per = 0 + local Act09Per = 0 + local Act10Per = 0 + local Act11Per = 0 + local GetWellSpace_Odds = 0 + if 12.3 <= targetDist then + Act01Per = 0 + Act02Per = 0 + Act03Per = 0 + Act04Per = 10 + Act05Per = 10 + Act06Per = 10 + Act07Per = 10 + Act08Per = 60 + Act09Per = 0 + Act10Per = 0 + Act11Per = 0 + elseif 10.8 <= targetDist then + Act01Per = 0 + Act02Per = 0 + Act03Per = 0 + Act04Per = 20 + Act05Per = 20 + Act06Per = 20 + Act07Per = 20 + Act08Per = 20 + Act09Per = 0 + Act10Per = 0 + Act11Per = 0 + elseif 6.2 <= targetDist then + Act01Per = 10 + Act02Per = 10 + Act03Per = 35 + Act04Per = 0 + Act05Per = 15 + Act06Per = 0 + Act07Per = 10 + Act08Per = 0 + Act09Per = 0 + Act10Per = 10 + Act11Per = 10 + elseif 2.5 <= targetDist then + Act01Per = 25 + Act02Per = 25 + Act03Per = 0 + Act04Per = 0 + Act05Per = 20 + Act06Per = 0 + Act07Per = 0 + Act08Per = 0 + Act09Per = 0 + Act10Per = 10 + Act11Per = 20 + else + Act01Per = 13 + Act02Per = 12 + Act03Per = 0 + Act04Per = 0 + Act05Per = 0 + Act06Per = 0 + Act07Per = 0 + Act08Per = 0 + Act09Per = 60 + Act10Per = 5 + Act11Per = 10 + end + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per) + if fateAct <= Act01Per then + Griffith527000_Act01(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per then + Griffith527000_Act02(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per then + Griffith527000_Act03(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + Griffith527000_Act04(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + Griffith527000_Act05(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + Griffith527000_Act06(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + Griffith527000_Act07(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per then + Griffith527000_Act08(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per then + Griffith527000_Act09(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per then + Griffith527000_Act10(ai, goal) + GetWellSpace_Odds = 0 + else + Griffith527000_Act11(ai, goal) + GetWellSpace_Odds = 100 + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + Griffith527000_ActAfter_AdjustSpace(ai, goal, paramTbl) + end + return +end + +Att3000_Dist_min = Att3000_Dist_max +function Griffith527000_Act01(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 5 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 15 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + return +end + +Att3000_Dist_min = Att3008_Dist_max +function Griffith527000_Act02(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3008_Dist_max + local DashDist = Att3008_Dist_max + 2 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3008, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3008, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3008, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3010, TARGET_ENE_0, DIST_Middle, 0) + end + return +end + +Att3000_Dist_min = Att3004_Dist_max +function Griffith527000_Act03(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + return +end + +Att3000_Dist_min = Att3005_Dist_max +function Griffith527000_Act04(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + return +end + +Att3000_Dist_min = Att3007_Dist_max +function Griffith527000_Act05(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 2 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + return +end + +Att3000_Dist_min = Att3012_Dist_max +function Griffith527000_Act06(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3012_Dist_max + local DashDist = Att3012_Dist_max + 2 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3012, TARGET_ENE_0, DIST_Middle, 0) + return +end + +function Griffith527000_Act07(ai, goal) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3011, TARGET_ENE_0, DIST_None, 0) + return +end + +function Griffith527000_Act08(ai, goal) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3013, TARGET_ENE_0, DIST_None, 0) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 20, TARGET_ENE_0, 5.5, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3014, TARGET_ENE_0, DIST_None, 0, -1) + return +end + +Att3000_Dist_min = Att3006_Dist_max +function Griffith527000_Act09(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 0 + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + return +end + +function Griffith527000_Act10(ai, goal) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3016, TARGET_ENE_0, DIST_None, 0) + return +end + +Att3000_Dist_min = Att3017_Dist_max +function Griffith527000_Act11(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3017_Dist_max + local DashDist = Att3017_Dist_max + 2 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3017, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttack, 10, 3017, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3018, TARGET_ENE_0, DIST_Middle, 0) + end + return +end + +function Griffith527000_ActAfter_AdjustSpace(ai, goal, paramTbl) + local GW_fate = ai:GetRandam_Int(0, 100) + local bRight = ai:GetRandam_Int(0, 1) + local friendNum = ai:GetTeamRecordCount(COORDINATE_TYPE_SideWalk_L + bRight, TARGET_ENE_0, 2) + if GW_fate <= 30 and friendNum < 2 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 2, TARGET_ENE_0, true, -1) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, bRight, ai:GetRandam_Int(30, 45), true, true, -1) + elseif GW_fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 3, TARGET_ENE_0, true, -1) + elseif GW_fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + else + local fate = ai:GetRandam_Int(1, 100) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + end + return +end + +function Griffith527000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Griffith527000Battle_Terminate(ai, goal) + return +end + +function Griffith527000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if ai:IsInterupt(INTERUPT_Inside_ObserveArea) and ai:IsFinishTimer(0) == true then + ai:SetTimer(0, 5) + goal:AddSubGoal(GOAL_COMMON_If, 30, 0) + return true + else + local distDamagedStep = 3 + local oddsDamagedStep = 25 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 4 + if Damaged_Step(ai, goal, distDamagedStep, oddsDamagedStep, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distGuardBreak_Act = 6.2 + local oddsGuardBreak_Act = 70 + local fate = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if 4.5 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3008, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distMissSwing_Int = 6.2 + local oddsMissSwing_Int = 50 + local targetDist = ai:GetDist(TARGET_ENE_0) + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if 4.5 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3008, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distUseItem_Act = 12.3 + local oddsUseItem_Act = 30 + local targetDist = ai:GetDist(TARGET_ENE_0) + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3011, TARGET_ENE_0, DIST_Middle, 0) + return true + else + local oddsResponse = 35 + local bkStepPer = 40 + local leftStepPer = 30 + local rightStepPer = 30 + local safetyDist = 4 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + local distResNear = 3 + local distResFar = 18 + local oddsResNear = 0 + local oddsResFar = 60 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + return true + elseif ResBehavID == 2 then + if fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + else + return false + end + end + end + end + end + end + end +end + +return diff --git a/scripts_decompiled/527100_battle.lua b/scripts_decompiled/527100_battle.lua new file mode 100644 index 0000000..af80a77 --- /dev/null +++ b/scripts_decompiled/527100_battle.lua @@ -0,0 +1,422 @@ +REGISTER_GOAL(GOAL_Griffith_large527100_Battle, "Griffith_large527100Battle") +local Att3000_Dist_min = 2.8 +local Att3000_Dist_max = 3.5 +local Att3004_Dist_min = 7 +local Att3004_Dist_max = 9.8 +local Att3005_Dist_min = 14.1 +local Att3005_Dist_max = 16.5 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 1.5 +local Att3007_Dist_min = 12.6 +local Att3007_Dist_max = 17 +local Att3008_Dist_min = 5.2 +local Att3008_Dist_max = 6.5 +local Att3011_Dist_min = 9.9 +local Att3011_Dist_max = 30 +local Att3012_Dist_min = -0.6 +local Att3012_Dist_max = 1.2 +local Att3013_Dist_min = 0 +local Att3013_Dist_max = 15 +local Att3015_Dist_min = -6 +local Att3015_Dist_max = 1.2 +local Att3016_Dist_min = 14.1 +local Att3016_Dist_max = 30 +local Att3017_Dist_min = 4.3 +local Att3017_Dist_max = 7.8 +REGISTER_GOAL_NO_UPDATE(GOAL_Griffith_large527100_Battle, 1) +function Griffith_large527100Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + ai:AddObserveArea(0, TARGET_FRI_0, TARGET_SELF, AI_DIR_TYPE_F, 360, 10) + local canStep701 = 0 + local canStep702 = 0 + local canStep703 = 0 + local canStep = 0 + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_B, 8) then + canStep701 = 1 + end + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_L, 6) then + canStep702 = 1 + end + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_R, 6) then + canStep703 = 1 + end + if canStep703 == 1 or canStep702 == 1 or canStep701 == 1 then + canStep = 1 + end + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act08Per = 0 + local Act09Per = 0 + local Act10Per = 0 + local Act11Per = 0 + local Act12Per = 0 + local Act13Per = 0 + local GetWellSpace_Odds = 0 + if 30 <= targetDist then + Act04Per = 10 + Act05Per = 10 + Act07Per = 10 + Act08Per = 60 + Act11Per = 10 + elseif 20 <= targetDist then + Act04Per = 20 + Act05Per = 20 + Act07Per = 15 + Act08Per = 35 + Act11Per = 10 + elseif 14.1 <= targetDist then + Act04Per = 25 + Act05Per = 25 + Act07Per = 25 + Act11Per = 25 + elseif 7 <= targetDist then + Act01Per = 10 + Act02Per = 10 + Act03Per = 40 + Act11Per = 20 + Act12Per = 20 + elseif 5 <= targetDist then + Act01Per = 25 + Act02Per = 25 + Act11Per = 30 + Act12Per = 20 + elseif 4.3 <= targetDist then + Act01Per = 35 + Act12Per = 35 + Act13Per = 30 * canStep + elseif 3 <= targetDist then + Act01Per = 25 + Act02Per = 25 + Act10Per = 20 + Act13Per = 30 * canStep + elseif 1.5 <= targetDist then + Act10Per = 50 + Act13Per = 50 * canStep + else + Act06Per = 40 + Act09Per = 20 + Act10Per = 20 + Act13Per = 20 * canStep + end + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per) + if fateAct <= Act01Per then + Griffith_large527100_Act01(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per then + Griffith_large527100_Act02(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per then + Griffith_large527100_Act03(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + Griffith_large527100_Act04(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + Griffith_large527100_Act05(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + Griffith_large527100_Act06(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + Griffith_large527100_Act07(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per then + Griffith_large527100_Act08(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per then + Griffith_large527100_Act09(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per then + Griffith_large527100_Act10(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per then + Griffith_large527100_Act11(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per then + Griffith_large527100_Act12(ai, goal) + GetWellSpace_Odds = 0 + else + Griffith_large527100_Act13(ai, goal) + GetWellSpace_Odds = 0 + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + Griffith_large527100_ActAfter_AdjustSpace(ai, goal, paramTbl) + end + return +end + +Att3000_Dist_min = Att3000_Dist_max +function Griffith_large527100_Act01(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 4.5 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 5 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Near, 2, 10) + elseif fate <= 15 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Near, 2, 10) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Near, 0) + elseif fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Near, 2, 10) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Near, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Near, 2, 10) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3002, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, DIST_Near, 0) + end + return +end + +Att3000_Dist_min = Att3008_Dist_max +function Griffith_large527100_Act02(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3008_Dist_max + local DashDist = Att3008_Dist_max + 4.5 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3008, TARGET_ENE_0, DIST_Middle, 2, 42) + elseif fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3008, TARGET_ENE_0, DIST_Middle, 2, 42) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3008, TARGET_ENE_0, DIST_Middle, 2, 42) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3010, TARGET_ENE_0, DIST_Middle, 0) + end + return +end + +Att3000_Dist_min = Att3004_Dist_max +function Griffith_large527100_Act03(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 4.5 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3004, TARGET_ENE_0, DIST_None, 2, 35) + return +end + +Att3000_Dist_min = Att3005_Dist_max +function Griffith_large527100_Act04(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 4.5 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3005, TARGET_ENE_0, DIST_None, 2, 45) + return +end + +Att3000_Dist_min = Att3007_Dist_max +function Griffith_large527100_Act05(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 4.5 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + return +end + +Att3000_Dist_min = Att3012_Dist_max +function Griffith_large527100_Act06(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3012_Dist_max + local DashDist = Att3012_Dist_max + 4.5 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3012, TARGET_ENE_0, DIST_None, 2, 35) + return +end + +function Griffith_large527100_Act07(ai, goal) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3011, TARGET_ENE_0, DIST_None, 0) + return +end + +function Griffith_large527100_Act08(ai, goal) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3013, TARGET_ENE_0, DIST_None, 0) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 20, TARGET_ENE_0, 11.3, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3014, TARGET_ENE_0, DIST_None, 0, -1) + return +end + +Att3000_Dist_min = Att3006_Dist_max +function Griffith_large527100_Act09(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 4.5 + local Odds_Guard = 0 + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, DIST_Middle, 2, 37) + return +end + +Att3000_Dist_min = Att3015_Dist_max +function Griffith_large527100_Act10(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3015_Dist_max + local DashDist = Att3015_Dist_max + 4.5 + local Odds_Guard = 0 + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3015, TARGET_ENE_0, DIST_Middle, 0, -1) + return +end + +function Griffith_large527100_Act11(ai, goal) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3016, TARGET_ENE_0, DIST_None, 0) + return +end + +Att3000_Dist_min = Att3017_Dist_max +function Griffith_large527100_Act12(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3017_Dist_max + local DashDist = Att3017_Dist_max + 4.5 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3017, TARGET_ENE_0, DIST_None, 2, 45) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3017, TARGET_ENE_0, DIST_Middle, 2, 45) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3018, TARGET_ENE_0, DIST_Middle, 0) + end + return +end + +function Griffith_large527100_Act13(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local canStep701 = 0 + local canStep702 = 0 + local canStep703 = 0 + local canStep = 0 + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_B, 8) then + canStep701 = 1 + end + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_L, 6) then + canStep702 = 1 + end + if ai:IsOnNearMeshByPos(TARGET_SELF, AI_DIR_TYPE_R, 6) then + canStep703 = 1 + end + if canStep703 == 1 or canStep702 == 1 or canStep701 == 1 then + canStep = 1 + end + if canStep701 == 1 or canStep703 == 0 and canStep702 == 0 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 8) + elseif fate3 <= 50 or canStep702 == 0 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 6) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 6) + end + return true +end + +function Griffith_large527100_ActAfter_AdjustSpace(ai, goal, paramTbl) + local GW_fate = ai:GetRandam_Int(0, 100) + local bRight = ai:GetRandam_Int(0, 1) + local friendNum = ai:GetTeamRecordCount(COORDINATE_TYPE_SideWalk_L + bRight, TARGET_ENE_0, 2) + if GW_fate <= 30 and friendNum < 2 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 2, TARGET_ENE_0, true, -1) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, bRight, ai:GetRandam_Int(30, 45), true, true, -1) + elseif GW_fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2.5, TARGET_ENE_0, 3, TARGET_ENE_0, true, -1) + elseif GW_fate <= 80 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + else + local fate = ai:GetRandam_Int(1, 100) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + end + return +end + +function Griffith_large527100Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Griffith_large527100Battle_Terminate(ai, goal) + return +end + +function Griffith_large527100Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distGuardBreak_Act = 7.8 + local oddsGuardBreak_Act = 50 + local fate = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if 3.5 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3017, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + end + return true + else + local distUseItem_Act = 30 + local oddsUseItem_Act = 50 + local targetDist = ai:GetDist(TARGET_ENE_0) + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if 9.9 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3011, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3013, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 20, TARGET_ENE_0, 11.3, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3014, TARGET_ENE_0, DIST_None, 0, -1) + end + return true + else + local distResNear = 5 + local distResFar = 30 + local oddsResNear = 0 + local oddsResFar = 60 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, 9910) + return true + elseif ResBehavID == 2 then + if 9.9 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3011, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3013, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 20, TARGET_ENE_0, 11.3, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3014, TARGET_ENE_0, DIST_None, 0, -1) + end + return true + else + return false + end + end + end +end + +return diff --git a/scripts_decompiled/528000_battle.lua b/scripts_decompiled/528000_battle.lua new file mode 100644 index 0000000..47472b9 --- /dev/null +++ b/scripts_decompiled/528000_battle.lua @@ -0,0 +1,356 @@ +REGISTER_GOAL(GOAL_CragSpider528000_Battle, "CragSpider528000Battle") +local Att3000_Dist_min = 1.5 +local Att3000_Dist_max = 1.5 +local Att3003_Dist_min = 4 +local Att3003_Dist_max = 5 +local Att3004_Dist_min = 4 +local Att3004_Dist_max = 5 +local Att3005_Dist_min = 4 +local Att3005_Dist_max = 5 +local Att3006_Dist_min = 2 +local Att3006_Dist_max = 6.5 +local Att3007_Dist_min = 0 +local Att3007_Dist_max = 2 +local Att3008_Dist_min = 0 +local Att3008_Dist_max = 2 +local Att3009_Dist_min = 0 +local Att3009_Dist_max = 2 +local Att3010_Dist_min = 0 +local Att3010_Dist_max = 6 +local Att3012_Dist_min = 10 +local Att3012_Dist_max = 16 +local Att3013_Dist_min = 2.5 +local Att3013_Dist_max = 4.5 +REGISTER_GOAL_NO_UPDATE(GOAL_CragSpider528000_Battle, 1) +function CragSpider528000Battle_Activate(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + local fate5 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local targetDistY = ai:GetDistYSigned(TARGET_ENE_0) + ai:AddObserveChrDmySphere(0, TARGET_ENE_0, 120, 2) + ai:AddObserveChrDmySphere(1, TARGET_ENE_0, 121, 2) + ai:AddObserveChrDmySphere(2, TARGET_ENE_0, 122, 2) + ai:AddObserveChrDmySphere(3, TARGET_ENE_0, 123, 2) + ai:AddObserveChrDmySphere(4, TARGET_ENE_0, 130, 2) + ai:AddObserveChrDmySphere(5, TARGET_ENE_0, 131, 2) + ai:AddObserveChrDmySphere(6, TARGET_ENE_0, 132, 2) + ai:AddObserveChrDmySphere(7, TARGET_ENE_0, 133, 2) + ai:AddObserveChrDmySphere(8, TARGET_ENE_0, 140, 2) + ai:AddObserveChrDmySphere(9, TARGET_ENE_0, 141, 2) + ai:AddObserveChrDmySphere(10, TARGET_ENE_0, 142, 2) + ai:AddObserveChrDmySphere(11, TARGET_ENE_0, 143, 2) + local Att3007Flag = 0 + local Att3008Flag = 0 + local Att3009Flag = 0 + if not not ai:IsInsideObserve(0) or not not ai:IsInsideObserve(1) or not not ai:IsInsideObserve(2) or ai:IsInsideObserve(3) then + Att3007Flag = 1 + elseif not not ai:IsInsideObserve(4) or not not ai:IsInsideObserve(5) or not not ai:IsInsideObserve(6) or ai:IsInsideObserve(7) then + Att3008Flag = 1 + elseif not not ai:IsInsideObserve(8) or not not ai:IsInsideObserve(9) or not not ai:IsInsideObserve(10) or ai:IsInsideObserve(11) then + Att3009Flag = 1 + end + local Act00Per = 0 + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act08Per = 0 + local Act09Per = 0 + local Act10Per = 0 + local Act11Per = 0 + local GetWellSpace_Odds = 50 + local SB_Odds = 1 + if ai:IsFinishTimer(0) == false then + SB_Odds = 0 + else + SB_Odds = 1 + end + if 1.5 <= targetDist and targetDist <= 3 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 45) and fate <= 65 then + Act00Per = 100 + elseif 4 <= targetDist and targetDist <= 5 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 30) and fate2 <= 75 then + Act01Per = 100 + elseif targetDist <= 5 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 110) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 120) and fate2 <= 75 then + Act02Per = 100 + elseif targetDist <= 5 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 190) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 30) and fate2 <= 75 then + Act03Per = 100 + elseif Att3007Flag == 1 and fate3 <= 20 then + Act05Per = 100 + elseif Att3008Flag == 1 and fate3 <= 20 then + Act06Per = 100 + elseif Att3009Flag == 1 and fate3 <= 20 then + Act07Per = 100 + elseif 12.5 <= targetDist then + Act00Per = 5 + Act01Per = 20 + Act04Per = 30 * SB_Odds + Act05Per = 0 + Act08Per = 0 + Act10Per = 5 + Act11Per = 40 + elseif 5 <= targetDist then + Act00Per = 35 + Act01Per = 20 + Act04Per = 30 * SB_Odds + Act05Per = 0 + Act08Per = 0 + Act10Per = 25 + Act11Per = 0 + elseif 2 <= targetDist then + Act00Per = 35 + Act01Per = 20 + Act04Per = 30 * SB_Odds + Act05Per = 0 + Act08Per = 0 + Act10Per = 10 + Act11Per = 0 + elseif 1.5 <= targetDist then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 45) then + Act00Per = 25 + Act01Per = 5 + Act04Per = 10 * SB_Odds + Act05Per = 10 + Act08Per = 35 + Act09Per = 15 + Act10Per = 0 + Act11Per = 0 + else + Act00Per = 0 + Act01Per = 10 + Act04Per = 10 * SB_Odds + Act05Per = 0 + Act08Per = 60 + Act09Per = 35 + Act10Per = 0 + Act11Per = 0 + end + else + Act00Per = 0 + Act01Per = 0 + Act04Per = 0 + Act05Per = 0 + Act08Per = 60 + Act09Per = 40 + Act10Per = 0 + Act11Per = 0 + end + local fateAct = ai:GetRandam_Int(1, Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per) + if fateAct <= Act00Per then + CragSpider528000_Act00(ai, goal) + elseif fateAct <= Act00Per + Act01Per then + CragSpider528000_Act01(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per then + CragSpider528000_Act02(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per then + CragSpider528000_Act03(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per then + CragSpider528000_Act04(ai, goal) + ai:SetTimer(0, 30) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + CragSpider528000_Act05(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + CragSpider528000_Act06(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + CragSpider528000_Act07(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per then + CragSpider528000_Act08(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per then + CragSpider528000_Act09(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per then + CragSpider528000_Act10(ai, goal) + else + CragSpider528000_Act11(ai, goal) + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + CragSpider528000_GetWellSpace_Act(ai, goal) + end + return +end + +Att3000_Dist_min = Att3000_Dist_max +function CragSpider528000_Act00(ai, goal) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + local TurnTime = 1.5 + local SuccessAngle = 20 + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, TurnTime, SuccessAngle) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + return +end + +Att3000_Dist_min = Att3003_Dist_max +function CragSpider528000_Act01(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local targetDistY = ai:GetDistYSigned(TARGET_ENE_0) + if 0.1 <= targetDistY or targetDistY <= -0.1 then + local AppDist = 1 + local DashDist = 1 + 3 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3003, TARGET_ENE_0, DIST_Middle, 3, 5) + else + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 3 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3003, TARGET_ENE_0, DIST_Middle, 3, 5) + end + return +end + +function CragSpider528000_Act02(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3004, TARGET_ENE_0, DIST_Middle) + return +end + +function CragSpider528000_Act03(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3005, TARGET_ENE_0, DIST_Middle) + return +end + +Att3000_Dist_min = Att3006_Dist_max +function CragSpider528000_Act04(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local targetDistY = ai:GetDistYSigned(TARGET_ENE_0) + if 0.2 <= targetDistY then + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 5, 3006, TARGET_ENE_0, DIST_Middle, 3, 20) + else + local AppDist = Att3006_Dist_max - 2 + local DashDist = Att3006_Dist_max + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 5, 3006, TARGET_ENE_0, DIST_Middle, 3, 20) + end + return +end + +Att3000_Dist_min = Att3007_Dist_max +function CragSpider528000_Act05(ai, goal) + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 3 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3007, TARGET_ENE_0, DIST_Middle, 3, 20) + return +end + +function CragSpider528000_Act06(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3008, TARGET_ENE_0, DIST_Middle) + return +end + +function CragSpider528000_Act07(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3009, TARGET_ENE_0, DIST_Middle) + return +end + +function CragSpider528000_Act08(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3010, TARGET_ENE_0, DIST_Middle) + return +end + +function CragSpider528000_Act09(ai, goal) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 4) + return +end + +Att3000_Dist_min = Att3013_Dist_max +function CragSpider528000_Act10(ai, goal) + local AppDist = Att3013_Dist_max + local DashDist = Att3013_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3013, TARGET_ENE_0, DIST_Near, 0) + return +end + +Att3000_Dist_min = Att3012_Dist_max +function CragSpider528000_Act11(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local targetDistY = ai:GetDistYSigned(TARGET_ENE_0) + if 0.2 <= targetDistY then + local AppDist = Att3012_Dist_max - 3 + local DashDist = Att3012_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 5, 3012, TARGET_ENE_0, DIST_Middle, 3, 5) + else + local AppDist = Att3012_Dist_max + 3 + local DashDist = Att3012_Dist_max + 5 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3012, TARGET_ENE_0, DIST_Middle, 3, 5) + end + return +end + +function CragSpider528000_GetWellSpace_Act(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, -1, -1) + elseif fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, -1, -1) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, -1, -1) + end + return +end + +function CragSpider528000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function CragSpider528000Battle_Terminate(ai, goal) + return +end + +function CragSpider528000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local distUseItem_Act = 12 + local oddsUseItem_Act = 10 + local targetDist = ai:GetDist(TARGET_ENE_0) + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if 2.5 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + local distResNear = 16 + local distResFar = 30 + local oddsResNear = 0 + local oddsResFar = 15 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + elseif ResBehavID == 2 then + if fate2 <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + return true + end + return false +end + +return diff --git a/scripts_decompiled/529000_battle.lua b/scripts_decompiled/529000_battle.lua new file mode 100644 index 0000000..2bf7726 --- /dev/null +++ b/scripts_decompiled/529000_battle.lua @@ -0,0 +1,305 @@ +REGISTER_GOAL(GOAL_WhiteDragon_Seath529000_Battle, "WhiteDragon_Seath529000Battle") +local Att3000_Dist_min = -0.2 +local Att3000_Dist_max = 2 +local Att3001_Dist_min = 6.2 +local Att3001_Dist_max = 8.9 +local Att3002_Dist_min = -2.4 +local Att3002_Dist_max = 9.1 +local Att3003_Dist_min = -2.4 +local Att3003_Dist_max = 4.6 +local Att3004_Dist_min = -2 +local Att3004_Dist_max = 5.3 +local Att3005_Dist_min = -2.4 +local Att3005_Dist_max = 9.3 +local Att3006_Dist_min = -2.4 +local Att3006_Dist_max = 4 +local Att3007_Dist_min = -2.4 +local Att3007_Dist_max = 4 +local Att3008_Dist_min = -4 +local Att3008_Dist_max = -2.9 +local Att3009_Dist_min = -4 +local Att3009_Dist_max = -0.8 +local Att3010_Dist_min = -2.4 +local Att3010_Dist_max = -2.47 +REGISTER_GOAL_NO_UPDATE(GOAL_WhiteDragon_Seath529000_Battle, 1) +function WhiteDragon_Seath529000Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + ai:AddObserveChrDmySphere(0, TARGET_ENE_0, 130, 3) + ai:AddObserveChrDmySphere(1, TARGET_ENE_0, 131, 4) + ai:AddObserveChrDmySphere(2, TARGET_ENE_0, 132, 5) + ai:AddObserveChrDmySphere(3, TARGET_ENE_0, 133, 3) + ai:AddObserveChrDmySphere(4, TARGET_ENE_0, 134, 4) + ai:AddObserveChrDmySphere(5, TARGET_ENE_0, 135, 5) + ai:AddObserveChrDmySphere(6, TARGET_ENE_0, 136, 3) + ai:AddObserveChrDmySphere(7, TARGET_ENE_0, 137, 4) + ai:AddObserveChrDmySphere(8, TARGET_ENE_0, 138, 5) + ai:AddObserveChrDmySphere(9, TARGET_ENE_0, 139, 3) + ai:AddObserveChrDmySphere(10, TARGET_ENE_0, 140, 4) + ai:AddObserveChrDmySphere(11, TARGET_ENE_0, 141, 5) + ai:AddObserveChrDmySphere(12, TARGET_ENE_0, 142, 3) + ai:AddObserveChrDmySphere(13, TARGET_ENE_0, 143, 4) + ai:AddObserveChrDmySphere(14, TARGET_ENE_0, 144, 5) + local GetWellSpace_Odds = 100 + local Act00Per = 0 + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act08Per = 0 + local Act09Per = 0 + local Act10Per = 0 + local Act11Per = 0 + local Act12Per = 0 + local GetWellSpace_Odds = 100 + if not not ai:IsInsideObserve(3) or not not ai:IsInsideObserve(4) or not not ai:IsInsideObserve(6) or not not ai:IsInsideObserve(7) or not not ai:IsInsideObserve(9) or not not ai:IsInsideObserve(10) or not not ai:IsInsideObserve(12) or ai:IsInsideObserve(13) then + Act00Per = 100 + end + if not not ai:IsInsideObserve(2) or not not ai:IsInsideObserve(5) or not not ai:IsInsideObserve(8) or not not ai:IsInsideObserve(11) or ai:IsInsideObserve(14) then + Act01Per = 100 + end + if not not ai:IsInsideObserve(7) or ai:IsInsideObserve(8) then + Act02Per = 100 + end + if not not ai:IsInsideObserve(6) or not not ai:IsInsideObserve(9) or ai:IsInsideObserve(12) then + Act03Per = 80 + end + if not not ai:IsInsideObserve(3) or not not ai:IsInsideObserve(4) or not not ai:IsInsideObserve(6) or ai:IsInsideObserve(7) then + Act04Per = 80 + end + if not not ai:IsInsideObserve(0) or not not ai:IsInsideObserve(3) or not not ai:IsInsideObserve(6) or not not ai:IsInsideObserve(9) or ai:IsInsideObserve(12) then + Act10Per = 0 + end + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 15) and targetDist <= 18.7 then + Act02Per = 100 + end + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 160) then + if 17.6 <= targetDist then + Act00Per = 10 + Act01Per = 45 + Act02Per = 45 + elseif 9.4 <= targetDist then + Act06Per = 30 + Act07Per = 30 + Act12Per = 40 + else + Act05Per = 25 + Act06Per = 20 + Act07Per = 20 + Act12Per = 35 + end + elseif targetDist <= -1 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 10) then + Act00Per = 30 + Act02Per = 0 + Act08Per = 10 + Act09Per = 10 + Act05Per = 40 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 64) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then + Act05Per = 20 + Act08Per = 40 + Act10Per = 40 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 54) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 180) then + Act05Per = 20 + Act09Per = 40 + Act10Per = 40 + else + Act05Per = 50 + Act10Per = 50 + end + else + Act11Per = 100 + end + local fateAct = ai:GetRandam_Int(1, Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per) + if fateAct <= Act00Per then + WhiteDragon_Seath529000_Act00(ai, goal) + elseif fateAct <= Act00Per + Act01Per then + WhiteDragon_Seath529000_Act01(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per then + WhiteDragon_Seath529000_Act02(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per then + WhiteDragon_Seath529000_Act03(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per then + WhiteDragon_Seath529000_Act04(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + WhiteDragon_Seath529000_Act05(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + WhiteDragon_Seath529000_Act06(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + WhiteDragon_Seath529000_Act07(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per then + WhiteDragon_Seath529000_Act08(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per then + WhiteDragon_Seath529000_Act09(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per then + WhiteDragon_Seath529000_Act10(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per then + WhiteDragon_Seath529000_Act11(ai, goal) + else + WhiteDragon_Seath529000_Act12(ai, goal) + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + WhiteDragon_Seath529000_GetWellSpace_Act(ai, goal) + end + return +end + +Att3000_Dist_min = Att3000_Dist_max +function WhiteDragon_Seath529000_Act00(ai, goal) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 200 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, 5, 30) + return +end + +Att3000_Dist_min = Att3001_Dist_max +function WhiteDragon_Seath529000_Act01(ai, goal) + local AppDist = Att3001_Dist_max + local DashDist = Att3001_Dist_max + 200 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3001, TARGET_ENE_0, DIST_Middle, 5, 30) + return +end + +Att3000_Dist_min = Att3002_Dist_max +function WhiteDragon_Seath529000_Act02(ai, goal) + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 200 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3002, TARGET_ENE_0, DIST_Middle, 5, 5) + return +end + +Att3000_Dist_min = Att3003_Dist_max +function WhiteDragon_Seath529000_Act03(ai, goal) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 200 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + return +end + +Att3000_Dist_min = Att3004_Dist_max +function WhiteDragon_Seath529000_Act04(ai, goal) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 200 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + return +end + +Att3000_Dist_min = Att3005_Dist_max +function WhiteDragon_Seath529000_Act05(ai, goal) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 200 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + return +end + +Att3000_Dist_min = Att3006_Dist_max +function WhiteDragon_Seath529000_Act06(ai, goal) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 200 + local Odds_Guard = 0 + local PARTS_IDX_TAIL = 0 + local tailDmgLv = ai:GetPartsDmg(PARTS_IDX_TAIL) + if tailDmgLv == PARTS_DMG_FINAL then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3012, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + end + return +end + +Att3000_Dist_min = Att3007_Dist_max +function WhiteDragon_Seath529000_Act07(ai, goal) + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 200 + local Odds_Guard = 0 + local PARTS_IDX_TAIL = 0 + local tailDmgLv = ai:GetPartsDmg(PARTS_IDX_TAIL) + if tailDmgLv == PARTS_DMG_FINAL then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3013, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + end + return +end + +Att3000_Dist_min = Att3008_Dist_max +function WhiteDragon_Seath529000_Act08(ai, goal) + local AppDist = Att3008_Dist_max + local DashDist = Att3008_Dist_max + 200 + local Odds_Guard = 0 + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3008, TARGET_ENE_0, DIST_Middle, 0) + return +end + +Att3000_Dist_min = Att3009_Dist_max +function WhiteDragon_Seath529000_Act09(ai, goal) + local AppDist = Att3009_Dist_max + local DashDist = Att3009_Dist_max + 200 + local Odds_Guard = 0 + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + return +end + +Att3000_Dist_min = Att3010_Dist_max +function WhiteDragon_Seath529000_Act10(ai, goal) + local AppDist = Att3010_Dist_max + local DashDist = Att3010_Dist_max + 200 + local Odds_Guard = 0 + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3010, TARGET_ENE_0, DIST_Middle, 0) + return +end + +Att3000_Dist_min = Att3001_Dist_max +function WhiteDragon_Seath529000_Act11(ai, goal) + local AppDist = Att3001_Dist_max + local DashDist = Att3001_Dist_max + 200 + local Odds_Guard = 0 + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 1, TARGET_ENE_0, 0, TARGET_ENE_0, true, -1) + return +end + +function WhiteDragon_Seath529000_Act12(ai, goal) + goal:AddSubGoal(GOAL_COMMON_Turn, 5, TARGET_ENE_0, 30, 0, 0) + return +end + +function WhiteDragon_Seath529000_GetWellSpace_Act(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 1), 0, 0, 0, 0) + end + return +end + +function WhiteDragon_Seath529000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function WhiteDragon_Seath529000Battle_Terminate(ai, goal) + return +end + +function WhiteDragon_Seath529000Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/529001_battle.lua b/scripts_decompiled/529001_battle.lua new file mode 100644 index 0000000..ccf79cd --- /dev/null +++ b/scripts_decompiled/529001_battle.lua @@ -0,0 +1,271 @@ +REGISTER_GOAL(GOAL_WD_Seath_Muteki529001_Battle, "WD_Seath_Muteki529001Battle") +local Att3000_Dist_min = -0.2 +local Att3000_Dist_max = 2 +local Att3001_Dist_min = 6.2 +local Att3001_Dist_max = 8.9 +local Att3002_Dist_min = -2.4 +local Att3002_Dist_max = 9.1 +local Att3003_Dist_min = -2.4 +local Att3003_Dist_max = 4.6 +local Att3004_Dist_min = -2 +local Att3004_Dist_max = 5.3 +local Att3005_Dist_min = -2.4 +local Att3005_Dist_max = 9.3 +local Att3006_Dist_min = -2.4 +local Att3006_Dist_max = 4 +local Att3007_Dist_min = -2.4 +local Att3007_Dist_max = 4 +local Att3008_Dist_min = -4 +local Att3008_Dist_max = -2.9 +local Att3009_Dist_min = -4 +local Att3009_Dist_max = -0.8 +local Att3010_Dist_min = -2.4 +local Att3010_Dist_max = -2.47 +REGISTER_GOAL_NO_UPDATE(GOAL_WD_Seath_Muteki529001_Battle, 1) +function WD_Seath_Muteki529001Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local eventNo = ai:GetEventRequest() + ai:AddObserveChrDmySphere(0, TARGET_ENE_0, 130, 3) + ai:AddObserveChrDmySphere(1, TARGET_ENE_0, 131, 4) + ai:AddObserveChrDmySphere(2, TARGET_ENE_0, 132, 5) + ai:AddObserveChrDmySphere(3, TARGET_ENE_0, 133, 3) + ai:AddObserveChrDmySphere(4, TARGET_ENE_0, 134, 4) + ai:AddObserveChrDmySphere(5, TARGET_ENE_0, 135, 5) + ai:AddObserveChrDmySphere(6, TARGET_ENE_0, 136, 3) + ai:AddObserveChrDmySphere(7, TARGET_ENE_0, 137, 4) + ai:AddObserveChrDmySphere(8, TARGET_ENE_0, 138, 5) + ai:AddObserveChrDmySphere(9, TARGET_ENE_0, 139, 3) + ai:AddObserveChrDmySphere(10, TARGET_ENE_0, 140, 4) + ai:AddObserveChrDmySphere(11, TARGET_ENE_0, 141, 5) + ai:AddObserveChrDmySphere(12, TARGET_ENE_0, 142, 3) + ai:AddObserveChrDmySphere(13, TARGET_ENE_0, 143, 4) + ai:AddObserveChrDmySphere(14, TARGET_ENE_0, 144, 5) + local Act00Per = 0 + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act08Per = 0 + local Act09Per = 0 + local Act10Per = 0 + local Act11Per = 0 + local GetWellSpace_Odds = 100 + if ai:IsFinishTimer(0) == true then + ai:SetTimer(0, 9999) + ai:SetTimer(1, 20) + end + if ai:IsFinishTimer(1) == true then + Act05Per = 100 + else + if not not ai:IsInsideObserve(3) or not not ai:IsInsideObserve(4) or not not ai:IsInsideObserve(6) or not not ai:IsInsideObserve(7) or not not ai:IsInsideObserve(9) or not not ai:IsInsideObserve(10) or not not ai:IsInsideObserve(12) or ai:IsInsideObserve(13) then + Act00Per = 100 + end + if not not ai:IsInsideObserve(2) or not not ai:IsInsideObserve(5) or not not ai:IsInsideObserve(8) or not not ai:IsInsideObserve(11) or ai:IsInsideObserve(14) then + Act01Per = 100 + end + if not not ai:IsInsideObserve(6) or not not ai:IsInsideObserve(7) or ai:IsInsideObserve(8) then + Act02Per = 100 + end + if not not ai:IsInsideObserve(6) or not not ai:IsInsideObserve(9) or ai:IsInsideObserve(12) then + Act03Per = 80 + end + if not not ai:IsInsideObserve(3) or not not ai:IsInsideObserve(4) or not not ai:IsInsideObserve(6) or ai:IsInsideObserve(7) then + Act04Per = 80 + end + if not not ai:IsInsideObserve(0) or not not ai:IsInsideObserve(3) or not not ai:IsInsideObserve(6) or not not ai:IsInsideObserve(9) or ai:IsInsideObserve(12) then + Act10Per = 0 + end + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 15) and targetDist <= 18.7 then + Act02Per = 100 + end + if targetDist <= -1 then + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 10) then + Act00Per = 0 + Act02Per = 70 + Act08Per = 10 + Act09Per = 10 + Act05Per = 0 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 64) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then + Act08Per = 50 + Act10Per = 50 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 54) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 180) then + Act09Per = 50 + Act10Per = 50 + else + Act06Per = 40 + Act07Per = 40 + Act10Per = 20 + end + else + Act11Per = 0 + end + end + local fateAct = ai:GetRandam_Int(1, Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per) + if fateAct <= Act00Per then + WD_Seath_Muteki529001_Act00(ai, goal) + elseif fateAct <= Act00Per + Act01Per then + WD_Seath_Muteki529001_Act01(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per then + WD_Seath_Muteki529001_Act02(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per then + WD_Seath_Muteki529001_Act03(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per then + WD_Seath_Muteki529001_Act04(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + WD_Seath_Muteki529001_Act05(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + WD_Seath_Muteki529001_Act06(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + WD_Seath_Muteki529001_Act07(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per then + WD_Seath_Muteki529001_Act08(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per then + WD_Seath_Muteki529001_Act09(ai, goal) + elseif fateAct <= Act00Per + Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per then + WD_Seath_Muteki529001_Act10(ai, goal) + else + WD_Seath_Muteki529001_Act11(ai, goal) + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + WD_Seath_Muteki529001_GetWellSpace_Act(ai, goal) + end + return +end + +Att3000_Dist_min = Att3000_Dist_max +function WD_Seath_Muteki529001_Act00(ai, goal) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 200 + local Odds_Guard = 0 + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + return +end + +Att3000_Dist_min = Att3001_Dist_max +function WD_Seath_Muteki529001_Act01(ai, goal) + local AppDist = Att3001_Dist_max + local DashDist = Att3001_Dist_max + 200 + local Odds_Guard = 0 + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + return +end + +Att3000_Dist_min = Att3002_Dist_max +function WD_Seath_Muteki529001_Act02(ai, goal) + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 200 + local Odds_Guard = 0 + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + return +end + +Att3000_Dist_min = Att3003_Dist_max +function WD_Seath_Muteki529001_Act03(ai, goal) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 200 + local Odds_Guard = 0 + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + return +end + +Att3000_Dist_min = Att3004_Dist_max +function WD_Seath_Muteki529001_Act04(ai, goal) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 200 + local Odds_Guard = 0 + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + return +end + +Att3000_Dist_min = Att3005_Dist_max +function WD_Seath_Muteki529001_Act05(ai, goal) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 200 + local Odds_Guard = 0 + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + return +end + +Att3000_Dist_min = Att3006_Dist_max +function WD_Seath_Muteki529001_Act06(ai, goal) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 200 + local Odds_Guard = 0 + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + return +end + +Att3000_Dist_min = Att3007_Dist_max +function WD_Seath_Muteki529001_Act07(ai, goal) + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 200 + local Odds_Guard = 0 + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3007, TARGET_ENE_0, DIST_Middle, 0) + return +end + +Att3000_Dist_min = Att3008_Dist_max +function WD_Seath_Muteki529001_Act08(ai, goal) + local AppDist = Att3008_Dist_max + local DashDist = Att3008_Dist_max + 200 + local Odds_Guard = 0 + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3008, TARGET_ENE_0, DIST_Middle, 0) + return +end + +Att3000_Dist_min = Att3009_Dist_max +function WD_Seath_Muteki529001_Act09(ai, goal) + local AppDist = Att3009_Dist_max + local DashDist = Att3009_Dist_max + 200 + local Odds_Guard = 0 + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + return +end + +Att3000_Dist_min = Att3010_Dist_max +function WD_Seath_Muteki529001_Act10(ai, goal) + local AppDist = Att3010_Dist_max + local DashDist = Att3010_Dist_max + 200 + local Odds_Guard = 0 + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3010, TARGET_ENE_0, DIST_Middle, 0) + return +end + +Att3000_Dist_min = Att3010_Dist_max +function WD_Seath_Muteki529001_Act11(ai, goal) + local AppDist = Att3010_Dist_max + local DashDist = Att3010_Dist_max + 200 + local Odds_Guard = 0 + goal:AddSubGoal(GOAL_COMMON_Wait, 0.5, TARGET_ENE_0) + return +end + +function WD_Seath_Muteki529001_GetWellSpace_Act(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0.5, 1), 0, 0, 0, 0) + end + return +end + +function WD_Seath_Muteki529001Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function WD_Seath_Muteki529001Battle_Terminate(ai, goal) + return +end + +function WD_Seath_Muteki529001Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/532000_battle.lua b/scripts_decompiled/532000_battle.lua new file mode 100644 index 0000000..8e3e041 --- /dev/null +++ b/scripts_decompiled/532000_battle.lua @@ -0,0 +1,175 @@ +REGISTER_GOAL(GOAL_ImperialMother532000_Battle, "ImperialMother532000Battle") +REGISTER_GOAL_NO_UPDATE(GOAL_ImperialMother532000_Battle, 1) +function ImperialMother532000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest() + ai:AddObserveArea(0, TARGET_SELF, TARGET_ENE_0, AI_DIR_TYPE_F, 360, 15) + local FirstImpression = ai:GetNumber(0) + local WarpOdds = 1 + if eventNo == 1 then + WarpOdds = 0 + end + if FirstImpression == 0 then + actPerArr[6] = 100 + elseif ai:HasSpecialEffectId(TARGET_SELF, 5400) then + if 75 <= targetDist then + actPerArr[5] = 100 + elseif 25 <= targetDist then + actPerArr[1] = 30 + actPerArr[2] = 35 + actPerArr[3] = 35 + actPerArr[4] = 0 * WarpOdds + actPerArr[5] = 0 + elseif 12 <= targetDist then + actPerArr[1] = 40 + actPerArr[2] = 35 + actPerArr[3] = 25 + actPerArr[4] = 0 * WarpOdds + actPerArr[5] = 0 + elseif 6 <= targetDist then + actPerArr[1] = 30 + actPerArr[2] = 40 + actPerArr[3] = 30 + actPerArr[4] = 0 * WarpOdds + actPerArr[5] = 0 + else + actPerArr[1] = 5 + actPerArr[2] = 35 + actPerArr[3] = 60 + actPerArr[4] = 0 * WarpOdds + actPerArr[5] = 0 + end + elseif 75 <= targetDist then + actPerArr[5] = 100 + elseif 25 <= targetDist then + actPerArr[1] = 20 + actPerArr[2] = 35 + actPerArr[3] = 35 + actPerArr[4] = 0 * WarpOdds + actPerArr[5] = 0 + elseif 12 <= targetDist then + actPerArr[1] = 35 + actPerArr[2] = 45 + actPerArr[3] = 20 + actPerArr[4] = 0 * WarpOdds + actPerArr[5] = 0 + elseif 6 <= targetDist then + actPerArr[1] = 15 + actPerArr[2] = 55 + actPerArr[3] = 30 + actPerArr[4] = 0 * WarpOdds + actPerArr[5] = 0 + else + actPerArr[1] = 0 + actPerArr[2] = 40 + actPerArr[3] = 60 + actPerArr[4] = 0 * WarpOdds + actPerArr[5] = 0 + end + actFuncArr[1] = REGIST_FUNC(ai, goal, ImperialMother532000_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, ImperialMother532000_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, ImperialMother532000_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, ImperialMother532000_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, ImperialMother532000_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, ImperialMother532000_Act06) + local local0 = {0, 70, 0, 0, 30, 0, 0} + local atkAfterFunc = REGIST_FUNC(ai, goal, HumanCommon_ActAfter_AdjustSpace_IncludeSidestep, local0) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +function ImperialMother532000_Act01(ai, goal) + if ai:HasSpecialEffectId(TARGET_SELF, 5401) then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3005, TARGET_ENE_0, DIST_None, 0) + end + local FirstAttID = 3000 + local ComAttID = 3001 + local ShootNum = ai:GetRandam_Int(2, 3) + Shoot_Act(ai, goal, FirstAttID, ComAttID, ShootNum) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function ImperialMother532000_Act02(ai, goal) + if ai:HasSpecialEffectId(TARGET_SELF, 5400) then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3004, TARGET_ENE_0, DIST_None, 0) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3003, TARGET_ENE_0, DIST_None, 1.5, 20) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function ImperialMother532000_Act03(ai, goal) + if ai:HasSpecialEffectId(TARGET_SELF, 5400) then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3004, TARGET_ENE_0, DIST_None, 0) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, DIST_None, 1.5, 20) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function ImperialMother532000_Act04(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if ai:HasSpecialEffectId(TARGET_SELF, 5400) then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3004, TARGET_ENE_0, DIST_None, 0) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, DIST_None, 0, -1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function ImperialMother532000_Act05(ai, goal) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(1, 2), TARGET_ENE_0, 0, 0, 0) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function ImperialMother532000_Act06(ai, goal) + ai:SetNumber(0, 1) + if ai:HasSpecialEffectId(TARGET_SELF, 5400) then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3004, TARGET_ENE_0, DIST_None, 0) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, DIST_None, 0, -1) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function ImperialMother532000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function ImperialMother532000Battle_Terminate(ai, goal) + return +end + +function ImperialMother532000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local eventNo = ai:GetEventRequest() + if ai:IsInterupt(INTERUPT_Damaged) and targetDist <= 3 and eventNo ~= 1 then + goal:ClearSubGoal() + if ai:HasSpecialEffectId(TARGET_SELF, 5400) then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3004, TARGET_ENE_0, DIST_None, 0) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, DIST_None, 0, -1) + return true + elseif ai:IsInterupt(INTERUPT_Inside_ObserveArea) and eventNo ~= 1 then + goal:ClearSubGoal() + if ai:HasSpecialEffectId(TARGET_SELF, 5400) then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3004, TARGET_ENE_0, DIST_None, 0) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, DIST_None, 0, -1) + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/535000_battle.lua b/scripts_decompiled/535000_battle.lua new file mode 100644 index 0000000..7b8423b --- /dev/null +++ b/scripts_decompiled/535000_battle.lua @@ -0,0 +1,716 @@ +REGISTER_GOAL(GOAL_Gargoyle535000_Battle, "Gargoyle535000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 7 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 10.3 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 4.1 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 8 +local Att3009_Dist_min = 6.5 +local Att3009_Dist_max = 11 +local Att3010_Dist_min = 3 +local Att3010_Dist_max = 6 +local Att3011_Dist_min = 2.5 +local Att3011_Dist_max = 9 +local Att3012_Dist_min = 0 +local Att3012_Dist_max = 6 +local Att3014_Dist_min = 0 +local Att3014_Dist_max = 1.6 +local Att3016_Dist_min = 0 +local Att3016_Dist_max = 3.5 +local Att3017_Dist_min = 0 +local Att3017_Dist_max = 2.5 +local Att3018_Dist_min = 12 +local Att3018_Dist_max = 15 +local Att3020_Dist_min = 17 +local Att3020_Dist_max = 20 +local Att3022_Dist_min = 0 +local Att3022_Dist_max = 4.5 +local Att3026_Dist_min = 2.5 +local Att3026_Dist_max = 9 +local Att3027_Dist_min = 0 +local Att3027_Dist_max = 4 +REGISTER_GOAL_NO_UPDATE(GOAL_Gargoyle535000_Battle, 1) +function Gargoyle535000Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local hprate = ai:GetHpRate(TARGET_SELF) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local PARTS_IDX_TAIL = 0 + local tailDmgLv = ai:GetPartsDmg(PARTS_IDX_TAIL) + local myThinkId = ai:GetNpcThinkParamID() + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act08Per = 0 + local Act09Per = 0 + local Act10Per = 0 + local Act11Per = 0 + local Act12Per = 0 + local Act13Per = 0 + local Act14Per = 0 + local Act15Per = 0 + local Act16Per = 0 + local Act17Per = 0 + local Act18Per = 0 + local Act19Per = 0 + local GetWellSpace_Odds = 100 + if myThinkId == 535000 then + if tailDmgLv == PARTS_DMG_FINAL then + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1012793) then + if 5 <= targetDist then + Act13Per = 100 + else + Act02Per = 30 + Act04Per = 30 + Act06Per = 30 + Act13Per = 10 + end + elseif targetDist <= 4.1 and fate <= 75 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 90) then + Act03Per = 100 + elseif targetDist <= 1.5 and fate <= 75 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 180) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 170) then + Act07Per = 100 + else + local Flag_Firebreath = 0 + if hprate <= 0.5 then + Flag_Firebreath = 1 + end + if 18 <= targetDist then + Act01Per = 0 + Act02Per = 0 + Act04Per = 0 + Act06Per = 0 + Act10Per = 15 + Act11Per = 45 + Act12Per = 0 + Act13Per = 0 + Act15Per = 15 + Act16Per = 25 * Flag_Firebreath + elseif 13 <= targetDist then + Act01Per = 10 + Act02Per = 10 + Act04Per = 10 + Act06Per = 10 + Act10Per = 25 + Act11Per = 0 + Act12Per = 0 + Act13Per = 10 * Flag_Firebreath + Act15Per = 15 + Act16Per = 10 * Flag_Firebreath + elseif 9 <= targetDist then + Act01Per = 10 + Act02Per = 10 + Act04Per = 10 + Act06Per = 10 + Act10Per = 0 + Act11Per = 0 + Act12Per = 0 + Act13Per = 25 * Flag_Firebreath + Act15Per = 15 + Act16Per = 20 * Flag_Firebreath + elseif 6.8 <= targetDist then + Act01Per = 15 + Act02Per = 15 + Act04Per = 10 + Act06Per = 10 + Act10Per = 0 + Act11Per = 0 + Act12Per = 0 + Act13Per = 35 * Flag_Firebreath + Act15Per = 5 + Act16Per = 10 * Flag_Firebreath + elseif 3 <= targetDist then + Act01Per = 20 + Act02Per = 15 + Act04Per = 20 + Act06Per = 15 + Act10Per = 0 + Act11Per = 0 + Act12Per = 10 + Act13Per = 15 * Flag_Firebreath + Act15Per = 0 + Act16Per = 5 * Flag_Firebreath + else + Act01Per = 15 + Act02Per = 10 + Act04Per = 10 + Act06Per = 10 + Act09Per = 0 + Act10Per = 0 + Act11Per = 0 + Act12Per = 5 + Act13Per = 0 + Act15Per = 0 + Act16Per = 0 + Act19Per = 50 + end + end + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1012793) then + if 5 <= targetDist then + Act13Per = 100 + else + Act02Per = 30 + Act04Per = 30 + Act06Per = 30 + Act13Per = 10 + end + elseif targetDist <= 4 and fate <= 95 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 30) then + Act14Per = 100 + elseif targetDist <= 3.5 and fate <= 60 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 130) then + Act08Per = 100 + elseif targetDist <= 4.1 and fate <= 75 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 90) then + Act03Per = 100 + elseif targetDist <= 1.5 and fate <= 75 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 180) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 170) then + Act07Per = 100 + else + local Flag_Firebreath = 0 + if hprate <= 0.5 then + Flag_Firebreath = 1 + end + if 18 <= targetDist then + Act01Per = 0 + Act02Per = 0 + Act04Per = 0 + Act06Per = 0 + Act10Per = 15 + Act11Per = 45 + Act12Per = 0 + Act13Per = 0 + Act15Per = 15 + Act16Per = 25 * Flag_Firebreath + Act17Per = 0 + elseif 13 <= targetDist then + Act01Per = 10 + Act02Per = 10 + Act04Per = 10 + Act06Per = 10 + Act10Per = 25 + Act11Per = 0 + Act12Per = 0 + Act13Per = 10 * Flag_Firebreath + Act15Per = 15 + Act16Per = 10 * Flag_Firebreath + Act17Per = 0 + elseif 9 <= targetDist then + Act01Per = 10 + Act02Per = 10 + Act04Per = 10 + Act06Per = 10 + Act10Per = 0 + Act11Per = 0 + Act12Per = 0 + Act13Per = 25 * Flag_Firebreath + Act15Per = 15 + Act16Per = 20 * Flag_Firebreath + Act17Per = 0 + elseif 6.8 <= targetDist then + Act01Per = 10 + Act02Per = 10 + Act04Per = 10 + Act06Per = 10 + Act10Per = 0 + Act11Per = 0 + Act12Per = 0 + Act13Per = 35 * Flag_Firebreath + Act15Per = 5 + Act16Per = 15 * Flag_Firebreath + Act17Per = 10 + elseif 3 <= targetDist then + Act01Per = 20 + Act02Per = 15 + Act04Per = 15 + Act06Per = 20 + Act10Per = 0 + Act11Per = 0 + Act12Per = 10 + Act13Per = 15 * Flag_Firebreath + Act15Per = 0 + Act16Per = 5 * Flag_Firebreath + Act17Per = 5 + else + Act01Per = 15 + Act02Per = 10 + Act04Per = 10 + Act06Per = 10 + Act09Per = 0 + Act10Per = 0 + Act11Per = 0 + Act12Per = 5 + Act13Per = 0 + Act15Per = 0 + Act16Per = 0 + Act17Per = 0 + Act19Per = 50 + end + end + elseif ai:IsInsideTargetRegion(TARGET_ENE_0, 1012793) then + if 5 <= targetDist then + Act13Per = 100 + else + Act02Per = 30 + Act04Per = 30 + Act06Per = 30 + Act13Per = 10 + end + elseif targetDist <= 4.1 and fate <= 75 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 90) then + Act03Per = 100 + elseif targetDist <= 1.5 and fate <= 75 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 180) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 170) then + Act07Per = 100 + elseif 18 <= targetDist then + Act01Per = 5 + Act02Per = 5 + Act04Per = 5 + Act06Per = 5 + Act13Per = 80 + elseif 13 <= targetDist then + Act01Per = 7 + Act02Per = 8 + Act04Per = 7 + Act06Per = 8 + Act13Per = 70 + elseif 9 <= targetDist then + Act01Per = 7 + Act02Per = 8 + Act04Per = 7 + Act06Per = 8 + Act13Per = 70 + elseif 6.8 <= targetDist then + Act01Per = 7 + Act02Per = 8 + Act04Per = 7 + Act06Per = 8 + Act13Per = 70 + elseif 3 <= targetDist then + Act01Per = 10 + Act02Per = 10 + Act04Per = 10 + Act06Per = 10 + Act13Per = 60 + else + Act01Per = 10 + Act02Per = 10 + Act04Per = 10 + Act06Per = 10 + Act18Per = 60 + end + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per + Act16Per + Act17Per + Act18Per + Act19Per) + if fateAct <= Act01Per then + Gargoyle535000_Act01(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per then + Gargoyle535000_Act02(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per then + Gargoyle535000_Act03(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + Gargoyle535000_Act04(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + Gargoyle535000_Act05(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + Gargoyle535000_Act06(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + Gargoyle535000_Act07(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per then + Gargoyle535000_Act08(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per then + Gargoyle535000_Act09(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per then + Gargoyle535000_Act10(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per then + Gargoyle535000_Act11(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per then + Gargoyle535000_Act12(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per then + Gargoyle535000_Act13(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per + Act14Per then + Gargoyle535000_Act14(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per then + Gargoyle535000_Act15(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per + Act16Per then + Gargoyle535000_Act16(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per + Act16Per + Act17Per then + Gargoyle535000_Act17(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per + Act16Per + Act17Per + Act18Per then + Gargoyle535000_Act18(ai, goal) + GetWellSpace_Odds = 100 + else + Gargoyle535000_Act19(ai, goal) + GetWellSpace_Odds = 0 + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + Gargoyle535000_GetWellSpace_Act(ai, goal) + end + return +end + +Att3000_Dist_min = Att3000_Dist_max +function Gargoyle535000_Act01(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 35, 9, 8) + elseif fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 35, 9, 8) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 9, 8) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 35, 9, 8) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 9, 8) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3015, TARGET_ENE_0, DIST_Middle, 9, 8) + end + return +end + +Att3000_Dist_min = Att3003_Dist_max +function Gargoyle535000_Act02(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3003, TARGET_ENE_0, DIST_Middle, -1, 15, 8, 7) + return +end + +function Gargoyle535000_Act03(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3004, TARGET_ENE_0, DIST_Middle, 9, 8) + else + goal:AddSubGoal(GOAL_COMMON_NonspinningComboAttack, 10, 3004, TARGET_ENE_0, DIST_Middle, 9, 8) + goal:AddSubGoal(GOAL_COMMON_NonspinningComboFinal, 10, 3005, TARGET_ENE_0, DIST_Middle, 9, 8) + end + return +end + +Att3000_Dist_min = Att3006_Dist_max +function Gargoyle535000_Act04(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, DIST_Middle, -1, 15, 8, 0) + return +end + +function Gargoyle535000_Act05(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3008, TARGET_ENE_0, DIST_Middle, 0, 0) + return +end + +Att3000_Dist_min = Att3012_Dist_max +function Gargoyle535000_Act06(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3012_Dist_max + local DashDist = Att3012_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3012, TARGET_ENE_0, DIST_Middle, -1, 15, 8, 0) + return +end + +function Gargoyle535000_Act07(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3014, TARGET_ENE_0, DIST_Middle, 9, 8) + return +end + +function Gargoyle535000_Act08(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if targetDist <= 1.5 then + goal:AddSubGoal(GOAL_COMMON_ComboTunable_SuccessAngle180, 10, 3016, TARGET_ENE_0, DIST_Middle, 0, -1, 9, 8) + goal:AddSubGoal(GOAL_COMMON_NonspinningComboFinal, 10, 3029, TARGET_ENE_0, DIST_Middle, 9, 8) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3016, TARGET_ENE_0, DIST_Middle, 0, -1, 9, 8) + end + return +end + +function Gargoyle535000_Act09(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3017, TARGET_ENE_0, DIST_Middle, -1, 60, 9, 8) + return +end + +Att3000_Dist_min = Att3018_Dist_max +function Gargoyle535000_Act10(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3018_Dist_max + local DashDist = Att3018_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3018, TARGET_ENE_0, DIST_Middle, -1, 30) + return +end + +Att3000_Dist_min = Att3020_Dist_max +function Gargoyle535000_Act11(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3020_Dist_max + local DashDist = Att3020_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3020, TARGET_ENE_0, DIST_Middle, -1, 45) + return +end + +Att3000_Dist_min = Att3022_Dist_max +function Gargoyle535000_Act12(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3022_Dist_max + local DashDist = Att3022_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3022, TARGET_ENE_0, DIST_Middle, -1, 30) + return +end + +Att3000_Dist_min = Att3026_Dist_max +function Gargoyle535000_Act13(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3026_Dist_max + local DashDist = Att3026_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3026, TARGET_ENE_0, DIST_Middle, -1, 25, 0, 8) + return +end + +function Gargoyle535000_Act14(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3027, TARGET_ENE_0, DIST_Middle, 0, -1, 9, 0) + return +end + +Att3000_Dist_min = Att3009_Dist_max +function Gargoyle535000_Act15(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3009_Dist_max + local DashDist = Att3009_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3009, TARGET_ENE_0, DIST_Middle, -1, 30) + return +end + +Att3000_Dist_min = Att3011_Dist_max +function Gargoyle535000_Act16(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3011_Dist_max + local DashDist = Att3011_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3011, TARGET_ENE_0, DIST_Middle, -1, 30) + return +end + +Att3000_Dist_min = Att3010_Dist_max +function Gargoyle535000_Act17(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3010_Dist_max + local DashDist = Att3010_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3010, TARGET_ENE_0, DIST_Middle, -1, 30) + return +end + +Att3000_Dist_min = Att3026_Dist_max +function Gargoyle535000_Act18(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3026_Dist_max + local DashDist = Att3026_Dist_max + 2 + local Odds_Guard = 0 + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 3.5) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3026, TARGET_ENE_0, DIST_Middle, -1, 25, 0, 8) + return +end + +function Gargoyle535000_Act19(ai, goal) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 3.5) + return +end + +function Gargoyle535000_GetWellSpace_Act(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local waittime = ai:GetRandam_Int(1, 3) + if fate > 45 then + if fate <= 95 then + goal:AddSubGoal(GOAL_COMMON_If, 10, 0) + elseif fate <= 95 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2, TARGET_ENE_0, 8, TARGET_ENE_0, true, -1) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, -1) + end + end + return +end + +function OnIf_535000(ai, goal, codeNo) + local canStep713 = 0 + local canStep712 = 0 + local canStep711 = 0 + local canStep701 = 0 + local canStep702 = 0 + local canStep703 = 0 + local myThinkId = ai:GetNpcThinkParamID() + if not not ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_B, 7, 1012790) or not not ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_B, 7, 1012791) or ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_B, 7, 1012792) then + canStep711 = 1 + end + if not not ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_R, 7, 1012790) or not not ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_R, 7, 1012791) or ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_R, 7, 1012792) then + canStep713 = 1 + end + if not not ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_L, 7, 1012790) or not not ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_L, 7, 1012791) or ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_L, 7, 1012792) then + canStep712 = 1 + end + if not not ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_B, 5, 1012790) or not not ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_B, 5, 1012791) or ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_B, 5, 1012792) then + canStep701 = 1 + end + if not not ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_R, 5, 1012790) or not not ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_R, 5, 1012791) or ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_R, 5, 1012792) then + canStep703 = 1 + end + if not not ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_L, 5, 1012790) or not not ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_L, 5, 1012791) or ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_L, 5, 1012792) then + canStep702 = 1 + end + local oddsBigJump = 40 + local oddsBackJump = 60 + if myThinkId == 535001 then + oddsBigJump = 0 + oddsBackJump = 100 + end + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if fate <= oddsBigJump and (canStep713 == 1 or canStep712 == 1 or canStep711 == 1) and myThinkId == 535000 then + if not (fate2 > oddsBackJump or canStep711 ~= 1) or canStep713 == 0 and canStep712 == 0 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 711, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 7) + elseif fate3 <= 50 or canStep712 == 0 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 713, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 7) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 712, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 7) + end + elseif not (fate2 > oddsBackJump or canStep701 ~= 1) or canStep702 == 0 and canStep703 == 0 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + elseif fate3 <= 50 or canStep702 == 0 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + end + return +end + +function Gargoyle535000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Gargoyle535000Battle_Terminate(ai, goal) + return +end + +function Gargoyle535000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local superStepDist = 3 + local superStepPer = 15 + local bkStepPer = 50 + local leftStepPer = 25 + local rightStepPer = 25 + local safetyDist = 5 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + end + local distGuardBreak_Act = 10.3 + local oddsGuardBreak_Act = 30 + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if 50 <= fate then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + local distMissSwing_Int = 10.3 + local oddsMissSwing_Int = 30 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if 50 <= fate then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + local distUseItem_Act = 10.3 + local oddsUseItem_Act = 5 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if 6 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3012, TARGET_ENE_0, DIST_Middle, 0) + end + end + local distResNear = 13.5 + local distResFar = 25 + local oddsResNear = 0 + local oddsResFar = 20 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 3) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 3) + end + return true + elseif ResBehavID == 2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 3) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 3) + end + end + local oddsResponse = 30 + local bkStepPer = 50 + local leftStepPer = 25 + local rightStepPer = 25 + local safetyDist = 5 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/535100_battle.lua b/scripts_decompiled/535100_battle.lua new file mode 100644 index 0000000..8146395 --- /dev/null +++ b/scripts_decompiled/535100_battle.lua @@ -0,0 +1,639 @@ +REGISTER_GOAL(GOAL_Gargoyle_m15_535100_Battle, "Gargoyle_m15_535100Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 7 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 10.3 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 4.1 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 8 +local Att3009_Dist_min = 6.5 +local Att3009_Dist_max = 11 +local Att3010_Dist_min = 3 +local Att3010_Dist_max = 5.9 +local Att3011_Dist_min = 2.5 +local Att3011_Dist_max = 9 +local Att3012_Dist_min = 0 +local Att3012_Dist_max = 6 +local Att3014_Dist_min = 0 +local Att3014_Dist_max = 1.6 +local Att3016_Dist_min = 0 +local Att3016_Dist_max = 3.5 +local Att3017_Dist_min = 0 +local Att3017_Dist_max = 2.5 +local Att3018_Dist_min = 12 +local Att3018_Dist_max = 15 +local Att3020_Dist_min = 17 +local Att3020_Dist_max = 20 +local Att3022_Dist_min = 0 +local Att3022_Dist_max = 4.5 +local Att3026_Dist_min = 2.5 +local Att3026_Dist_max = 9 +local Att3027_Dist_min = 0 +local Att3027_Dist_max = 4 +REGISTER_GOAL_NO_UPDATE(GOAL_Gargoyle_m15_535100_Battle, 1) +function Gargoyle_m15_535100Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local hprate = ai:GetHpRate(TARGET_SELF) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local PARTS_IDX_TAIL = 0 + local tailDmgLv = ai:GetPartsDmg(PARTS_IDX_TAIL) + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act08Per = 0 + local Act09Per = 0 + local Act10Per = 0 + local Act11Per = 0 + local Act12Per = 0 + local Act13Per = 0 + local Act14Per = 0 + local Act15Per = 0 + local Act16Per = 0 + local Act17Per = 0 + local Act18Per = 0 + local GetWellSpace_Odds = 100 + if not not ai:IsInsideTargetRegion(TARGET_ENE_0, 1512790) or not not ai:IsInsideTargetRegion(TARGET_ENE_0, 1512791) or ai:IsInsideTargetRegion(TARGET_ENE_0, 1512792) then + Act18Per = 100 + elseif tailDmgLv == PARTS_DMG_FINAL then + if targetDist <= 4.8 and fate <= 75 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 90) then + Act03Per = 100 + elseif targetDist <= 1.7 and fate <= 75 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 180) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 170) then + Act07Per = 100 + else + local Flag_Firebreath = 0 + if hprate <= 0.5 then + Flag_Firebreath = 1 + end + if 18 <= targetDist then + Act01Per = 0 + Act02Per = 0 + Act04Per = 0 + Act06Per = 0 + Act10Per = 10 + Act11Per = 30 + Act12Per = 0 + Act13Per = 0 + Act15Per = 40 + Act16Per = 20 * Flag_Firebreath + Act17Per = 0 + elseif 13 <= targetDist then + Act01Per = 0 + Act02Per = 5 + Act04Per = 5 + Act06Per = 0 + Act10Per = 30 + Act11Per = 0 + Act12Per = 0 + Act13Per = 5 * Flag_Firebreath + Act15Per = 40 + Act16Per = 15 * Flag_Firebreath + Act17Per = 0 + elseif 9 <= targetDist then + Act01Per = 10 + Act02Per = 15 + Act04Per = 10 + Act06Per = 10 + Act10Per = 0 + Act11Per = 0 + Act12Per = 0 + Act13Per = 10 * Flag_Firebreath + Act15Per = 30 + Act16Per = 15 * Flag_Firebreath + Act17Per = 0 + elseif 6.8 <= targetDist then + Act01Per = 15 + Act02Per = 10 + Act04Per = 10 + Act06Per = 10 + Act10Per = 0 + Act11Per = 0 + Act12Per = 5 + Act13Per = 20 * Flag_Firebreath + Act15Per = 5 + Act16Per = 25 * Flag_Firebreath + Act17Per = 0 + elseif 3 <= targetDist then + Act01Per = 15 + Act02Per = 0 + Act04Per = 15 + Act06Per = 0 + Act10Per = 0 + Act11Per = 0 + Act12Per = 30 + Act13Per = 20 * Flag_Firebreath + Act15Per = 0 + Act16Per = 20 * Flag_Firebreath + Act17Per = 0 + else + Act01Per = 15 + Act02Per = 0 + Act04Per = 10 + Act06Per = 10 + Act09Per = 35 + Act10Per = 0 + Act11Per = 0 + Act12Per = 30 + Act13Per = 0 + Act15Per = 0 + Act16Per = 0 + Act17Per = 0 + end + end + elseif targetDist <= 5.5 and fate <= 95 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 30) then + Act14Per = 100 + elseif targetDist <= 5.5 and fate <= 60 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 130) then + Act08Per = 100 + elseif targetDist <= 4.8 and fate <= 75 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 90) then + Act03Per = 100 + elseif targetDist <= 1.7 and fate <= 75 and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 180) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 170) then + Act07Per = 100 + else + local Flag_Firebreath = 0 + if hprate <= 0.5 then + Flag_Firebreath = 1 + end + if 18 <= targetDist then + Act01Per = 0 + Act02Per = 0 + Act04Per = 0 + Act06Per = 0 + Act10Per = 10 + Act11Per = 30 + Act12Per = 0 + Act13Per = 0 + Act15Per = 40 + Act16Per = 20 * Flag_Firebreath + Act17Per = 0 + elseif 13 <= targetDist then + Act01Per = 0 + Act02Per = 5 + Act04Per = 5 + Act06Per = 0 + Act10Per = 30 + Act11Per = 0 + Act12Per = 0 + Act13Per = 5 * Flag_Firebreath + Act15Per = 40 + Act16Per = 15 * Flag_Firebreath + Act17Per = 0 + elseif 9 <= targetDist then + Act01Per = 10 + Act02Per = 15 + Act04Per = 10 + Act06Per = 10 + Act10Per = 0 + Act11Per = 0 + Act12Per = 0 + Act13Per = 10 * Flag_Firebreath + Act15Per = 30 + Act16Per = 15 * Flag_Firebreath + Act17Per = 0 + elseif 6.8 <= targetDist then + Act01Per = 13 + Act02Per = 10 + Act04Per = 10 + Act06Per = 10 + Act10Per = 0 + Act11Per = 0 + Act12Per = 5 + Act13Per = 17 * Flag_Firebreath + Act15Per = 5 + Act16Per = 20 * Flag_Firebreath + Act17Per = 10 + elseif 3 <= targetDist then + Act01Per = 13 + Act02Per = 0 + Act04Per = 13 + Act06Per = 0 + Act10Per = 0 + Act11Per = 0 + Act12Per = 30 + Act13Per = 15 * Flag_Firebreath + Act15Per = 0 + Act16Per = 15 * Flag_Firebreath + Act17Per = 14 + else + Act01Per = 10 + Act02Per = 0 + Act04Per = 10 + Act06Per = 10 + Act09Per = 35 + Act10Per = 0 + Act11Per = 0 + Act12Per = 30 + Act13Per = 0 + Act15Per = 0 + Act16Per = 0 + Act17Per = 5 + end + end + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per + Act16Per + Act17Per + Act18Per) + if fateAct <= Act01Per then + Gargoyle_m15_535100_Act01(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per then + Gargoyle_m15_535100_Act02(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per then + Gargoyle_m15_535100_Act03(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + Gargoyle_m15_535100_Act04(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + Gargoyle_m15_535100_Act05(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + Gargoyle_m15_535100_Act06(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + Gargoyle_m15_535100_Act07(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per then + Gargoyle_m15_535100_Act08(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per then + Gargoyle_m15_535100_Act09(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per then + Gargoyle_m15_535100_Act10(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per then + Gargoyle_m15_535100_Act11(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per then + Gargoyle_m15_535100_Act12(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per then + Gargoyle_m15_535100_Act13(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per + Act14Per then + Gargoyle_m15_535100_Act14(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per then + Gargoyle_m15_535100_Act15(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per + Act16Per then + Gargoyle_m15_535100_Act16(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per + Act16Per + Act17Per then + Gargoyle_m15_535100_Act17(ai, goal) + GetWellSpace_Odds = 0 + else + Gargoyle_m15_535100_Act18(ai, goal) + GetWellSpace_Odds = 0 + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + Gargoyle_m15_535100_GetWellSpace_Act(ai, goal) + end + return +end + +Att3000_Dist_min = Att3000_Dist_max +function Gargoyle_m15_535100_Act01(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 35, 20, 4) + elseif fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 35, 20, 4) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 20, 4) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 35, 20, 4) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Middle, 20, 4) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3015, TARGET_ENE_0, DIST_Middle, 20, 4) + end + return +end + +Att3000_Dist_min = Att3003_Dist_max +function Gargoyle_m15_535100_Act02(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3003, TARGET_ENE_0, DIST_Middle, -1, 15, 8, 7) + return +end + +function Gargoyle_m15_535100_Act03(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3004, TARGET_ENE_0, DIST_Middle, 18, 5) + else + goal:AddSubGoal(GOAL_COMMON_NonspinningComboAttack, 10, 3004, TARGET_ENE_0, DIST_Middle, 18, 5) + goal:AddSubGoal(GOAL_COMMON_NonspinningComboFinal, 10, 3005, TARGET_ENE_0, DIST_Middle, 18, 5) + end + return +end + +Att3000_Dist_min = Att3006_Dist_max +function Gargoyle_m15_535100_Act04(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, DIST_Middle, -1, 15, 18, 0) + return +end + +function Gargoyle_m15_535100_Act05(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3008, TARGET_ENE_0, DIST_Middle, 0, 0) + return +end + +Att3000_Dist_min = Att3012_Dist_max +function Gargoyle_m15_535100_Act06(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3012_Dist_max + local DashDist = Att3012_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3012, TARGET_ENE_0, DIST_Middle, -1, 15, 18, 0) + return +end + +function Gargoyle_m15_535100_Act07(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3014, TARGET_ENE_0, DIST_Middle, 12, 8) + return +end + +function Gargoyle_m15_535100_Act08(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if targetDist <= 1.5 then + goal:AddSubGoal(GOAL_COMMON_ComboTunable_SuccessAngle180, 10, 3016, TARGET_ENE_0, DIST_Middle, 0, -1, 12, 9) + goal:AddSubGoal(GOAL_COMMON_NonspinningComboFinal, 10, 3029, TARGET_ENE_0, DIST_Middle, 12, 9) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3016, TARGET_ENE_0, DIST_Middle, 0, -1, 12, 9) + end + return +end + +function Gargoyle_m15_535100_Act09(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3017, TARGET_ENE_0, DIST_Middle, -1, 90, 20, 8) + return +end + +Att3000_Dist_min = Att3018_Dist_max +function Gargoyle_m15_535100_Act10(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3018_Dist_max + local DashDist = Att3018_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3018, TARGET_ENE_0, DIST_Middle, -1, 30) + return +end + +Att3000_Dist_min = Att3020_Dist_max +function Gargoyle_m15_535100_Act11(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3020_Dist_max + local DashDist = Att3020_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3020, TARGET_ENE_0, DIST_Middle, -1, 45) + return +end + +Att3000_Dist_min = Att3022_Dist_max +function Gargoyle_m15_535100_Act12(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3022_Dist_max + local DashDist = Att3022_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3022, TARGET_ENE_0, DIST_Middle, -1, 30) + return +end + +Att3000_Dist_min = Att3026_Dist_max +function Gargoyle_m15_535100_Act13(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3026_Dist_max + local DashDist = Att3026_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3026, TARGET_ENE_0, DIST_Middle, -1, 25, 0, 10) + return +end + +function Gargoyle_m15_535100_Act14(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3027, TARGET_ENE_0, DIST_Middle, 0, -1, 12, 9) + return +end + +Att3000_Dist_min = Att3009_Dist_max +function Gargoyle_m15_535100_Act15(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3009_Dist_max + local DashDist = Att3009_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3009, TARGET_ENE_0, DIST_Middle, -1, 30) + return +end + +Att3000_Dist_min = Att3011_Dist_max +function Gargoyle_m15_535100_Act16(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3011_Dist_max + local DashDist = Att3011_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3011, TARGET_ENE_0, DIST_Middle, -1, 30) + return +end + +Att3000_Dist_min = Att3010_Dist_max +function Gargoyle_m15_535100_Act17(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3010_Dist_max + local DashDist = Att3010_Dist_max + 2 + local Odds_Guard = 0 + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3010, TARGET_ENE_0, DIST_Middle, -1, 30) + return +end + +function Gargoyle_m15_535100_Act18(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + if targetDist <= 8 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, POINT_INITIAL, 1, TARGET_ENE_0, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, POINT_INITIAL, 1, TARGET_SELF, false, -1) + end + goal:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_SELF) + goal:AddSubGoal(GOAL_COMMON_Turn, 2, TARGET_ENE_0, 0, 0, 0) + return +end + +function Gargoyle_m15_535100_GetWellSpace_Act(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local waittime = ai:GetRandam_Int(1, 3) + if fate > 45 then + if fate <= 95 then + goal:AddSubGoal(GOAL_COMMON_If, 10, 0) + elseif fate <= 95 then + goal:AddSubGoal(GOAL_COMMON_LeaveTarget, 2, TARGET_ENE_0, 8, TARGET_ENE_0, true, -1) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, ai:GetRandam_Int(0, 1), ai:GetRandam_Int(30, 45), true, true, -1) + end + end + return +end + +function OnIf_535100(ai, goal, codeNo) + local canStep713 = 0 + local canStep712 = 0 + local canStep711 = 0 + local canStep701 = 0 + local canStep702 = 0 + local canStep703 = 0 + if not not ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_B, 7, 1512702) or ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_B, 7, 1512703) then + canStep711 = 1 + end + if not not ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_R, 7, 1512702) or ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_R, 7, 1512703) then + canStep713 = 1 + end + if not not ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_L, 7, 1512702) or ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_L, 7, 1512703) then + canStep712 = 1 + end + if not not ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_B, 5, 1512702) or ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_B, 5, 1512703) then + canStep701 = 1 + end + if not not ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_R, 5, 1512702) or ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_R, 5, 1512703) then + canStep703 = 1 + end + if not not ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_L, 5, 1512702) or ai:IsInsideMsbRegion(TARGET_SELF, AI_DIR_TYPE_L, 5, 1512703) then + canStep702 = 1 + end + local oddsBigJump = 40 + local oddsBackJump = 60 + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if fate <= oddsBigJump and (canStep713 == 1 or canStep712 == 1 or canStep711 == 1) then + if not (fate2 > oddsBackJump or canStep711 ~= 1) or canStep713 == 0 and canStep712 == 0 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 711, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 7) + elseif fate3 <= 50 or canStep712 == 0 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 713, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 7) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 712, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 7) + end + elseif not (fate2 > oddsBackJump or canStep701 ~= 1) or canStep702 == 0 and canStep703 == 0 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 5) + elseif fate3 <= 50 or canStep702 == 0 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 5) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 5) + end + return +end + +function Gargoyle_m15_535100Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Gargoyle_m15_535100Battle_Terminate(ai, goal) + return +end + +function Gargoyle_m15_535100Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local superStepDist = 3 + local superStepPer = 15 + local bkStepPer = 50 + local leftStepPer = 25 + local rightStepPer = 25 + local safetyDist = 5 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + end + local distGuardBreak_Act = 10.5 + local oddsGuardBreak_Act = 30 + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if 50 <= fate then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + local distMissSwing_Int = 10.5 + local oddsMissSwing_Int = 30 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if 50 <= fate then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3006, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + local distUseItem_Act = 10.5 + local oddsUseItem_Act = 5 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if 6 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3012, TARGET_ENE_0, DIST_Middle, 0) + end + end + local distResNear = 13.5 + local distResFar = 25 + local oddsResNear = 0 + local oddsResFar = 20 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 3) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 3) + end + return true + elseif ResBehavID == 2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 3) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 3) + end + end + local oddsResponse = 30 + local bkStepPer = 50 + local leftStepPer = 25 + local rightStepPer = 25 + local safetyDist = 5 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/536000_battle.lua b/scripts_decompiled/536000_battle.lua new file mode 100644 index 0000000..15d255e --- /dev/null +++ b/scripts_decompiled/536000_battle.lua @@ -0,0 +1,343 @@ +REGISTER_GOAL(GOAL_LargeCat536000_Battle, "LargeCat536000Battle") +local Att3000_Dist_min = 0.5 +local Att3000_Dist_max = 1.1 +local Att3001_Dist_min = 2.7 +local Att3001_Dist_max = 4.5 +local Att3002_Dist_min = 0.5 +local Att3002_Dist_max = 1.7 +local Att3003_Dist_min = 0.5 +local Att3003_Dist_max = 1.1 +local Att3004_Dist_min = 0.5 +local Att3004_Dist_max = 12.7 +local Att3005_Dist_min = 0.5 +local Att3005_Dist_max = 24.5 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 24 +REGISTER_GOAL_NO_UPDATE(GOAL_LargeCat536000_Battle, 1) +function LargeCat536000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + ai:AddObserveArea(0, TARGET_SELF, TARGET_ENE_0, AI_DIR_TYPE_B, 100, 2) + local RateStep = 1 + if ai:IsFinishTimer(0) == false then + RateStep = 0 + end + local RateUnaru = 1 + if ai:IsFinishTimer(1) == false then + RateUnaru = 0 + end + if not ai:IsInsideTargetRegion(TARGET_ENE_0, 1202730) and not ai:IsInsideTargetRegion(TARGET_ENE_0, 1202731) then + actPerArr[11] = 100 + else + local RateKamiNage = 0 + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 15) then + RateKamiNage = 1 + end + if ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 180) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 100) and targetDist <= 0.8 then + actPerArr[8] = 100 + elseif ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 180) and ai:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_L, 100) and targetDist <= 0.8 then + actPerArr[9] = 100 + elseif 12.7 <= targetDist then + actPerArr[1] = 5 + actPerArr[2] = 5 + actPerArr[3] = 5 + actPerArr[4] = 5 * RateKamiNage + actPerArr[5] = 35 + actPerArr[6] = 40 + actPerArr[7] = 5 * RateUnaru + elseif 8 <= targetDist then + actPerArr[1] = 15 + actPerArr[2] = 20 + actPerArr[3] = 15 + actPerArr[4] = 15 * RateKamiNage + actPerArr[5] = 15 + actPerArr[6] = 10 + actPerArr[7] = 5 * RateUnaru + elseif 4.5 <= targetDist then + actPerArr[1] = 32 + actPerArr[2] = 28 + actPerArr[3] = 20 + actPerArr[4] = 20 * RateKamiNage + actPerArr[5] = 0 + actPerArr[6] = 0 + actPerArr[7] = 0 + elseif 2 <= targetDist then + actPerArr[1] = 25 + actPerArr[2] = 20 + actPerArr[3] = 25 + actPerArr[4] = 20 * RateKamiNage + actPerArr[5] = 0 + actPerArr[6] = 0 + actPerArr[7] = 0 + actPerArr[10] = 10 * RateStep + else + actPerArr[1] = 10 + actPerArr[2] = 0 + actPerArr[3] = 30 + actPerArr[4] = 40 * RateKamiNage + actPerArr[5] = 0 + actPerArr[6] = 0 + actPerArr[7] = 0 + actPerArr[10] = 20 * RateStep + end + end + actFuncArr[1] = REGIST_FUNC(ai, goal, LargeCat536000_Act01) + actFuncArr[2] = REGIST_FUNC(ai, goal, LargeCat536000_Act02) + actFuncArr[3] = REGIST_FUNC(ai, goal, LargeCat536000_Act03) + actFuncArr[4] = REGIST_FUNC(ai, goal, LargeCat536000_Act04) + actFuncArr[5] = REGIST_FUNC(ai, goal, LargeCat536000_Act05) + actFuncArr[6] = REGIST_FUNC(ai, goal, LargeCat536000_Act06) + actFuncArr[7] = REGIST_FUNC(ai, goal, LargeCat536000_Act07) + actFuncArr[8] = REGIST_FUNC(ai, goal, LargeCat536000_Act08) + actFuncArr[9] = REGIST_FUNC(ai, goal, LargeCat536000_Act09) + actFuncArr[10] = REGIST_FUNC(ai, goal, LargeCat536000_Act10) + actFuncArr[11] = REGIST_FUNC(ai, goal, LargeCat536000_Act11) + local atkAfterFunc = REGIST_FUNC(ai, goal, LargeCat536000_ActAfter_AdjustSpace, atkAfterOddsTbl) + Common_Battle_Activate(ai, goal, actPerArr, actFuncArr, atkAfterFunc, defFuncParamTbl) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function LargeCat536000_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3000, TARGET_ENE_0, DIST_Middle, -1, 25) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3001_Dist_max +function LargeCat536000_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3001_Dist_max + local DashDist = Att3001_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3001, TARGET_ENE_0, DIST_Middle, -1, -1) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3002_Dist_max +function LargeCat536000_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3002, TARGET_ENE_0, DIST_Middle, -1, 25) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3003_Dist_max +function LargeCat536000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3003, TARGET_ENE_0, DIST_Middle, -1, 25) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3004_Dist_max +function LargeCat536000_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3004, TARGET_ENE_0, DIST_Middle, -1, 22) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3005_Dist_max +function LargeCat536000_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3005, TARGET_ENE_0, DIST_Middle, -1, 20) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +Att3000_Dist_min = Att3006_Dist_max +function LargeCat536000_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, 3006, TARGET_ENE_0, DIST_Middle, 0) + ai:SetTimer(1, 20) + GetWellSpace_Odds = 0 + return GetWellSpace_Odds +end + +function LargeCat536000_Act08(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 5, 3007, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function LargeCat536000_Act09(ai, goal, paramTbl) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 5, 3008, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 100 + return GetWellSpace_Odds +end + +function LargeCat536000_Act10(ai, goal, paramTbl) + ai:SetTimer(0, 15) + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 9) + return +end + +function LargeCat536000_Act11(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + ai:SetEventMoveTarget(1202732) + local Sumade = ai:GetDistAtoB(POINT_EVENT, TARGET_SELF) + if 3 <= Sumade then + ai:SetEventMoveTarget(1202732) + if targetDist <= 5 then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, POINT_EVENT, 1, TARGET_ENE_0, true, -1) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, POINT_EVENT, 1, TARGET_SELF, false, -1) + end + end + goal:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_SELF) + goal:AddSubGoal(GOAL_COMMON_Turn, 2, TARGET_ENE_0, 0, 0, 0) + return +end + +function LargeCat536000_ActAfter_AdjustSpace(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + if fate <= 25 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0.5, AI_DIR_TYPE_B, 9) + return true + elseif fate <= 45 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0.5, AI_DIR_TYPE_L, 5) + return true + elseif fate <= 65 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0.5, AI_DIR_TYPE_R, 5) + return true + else + return false + end +end + +function LargeCat536000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function LargeCat536000Battle_Terminate(ai, goal) + return +end + +Att3000_Dist_min = Att3002_Dist_max +Att3000_Dist_min = Att3005_Dist_max +Att3000_Dist_min = Att3004_Dist_max +function LargeCat536000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + if ai:IsInterupt(INTERUPT_Inside_ObserveArea) and ai:IsFinishTimer(0) == true then + ai:SetTimer(0, 10) + if fate <= 50 then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 2.5) + elseif fate <= 75 then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 2.5) + else + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 2.5) + end + return true + end + local superStepDist = 4.5 + local superStepPer = 15 + local bkStepPer = 50 + local leftStepPer = 25 + local rightStepPer = 25 + local safetyDist = 5 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + end + local distGuardBreak_Act = 3.5 + local oddsGuardBreak_Act = 60 + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if 2 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3002_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + local distMissSwing_Int = 3.5 + local oddsMissSwing_Int = 50 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if 2 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3002_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + local distUseItem_Act = 12.7 + local oddsUseItem_Act = 10 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if 3.5 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + elseif 2 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3000, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, Att3002_Dist_max, TARGET_SELF, false, -1) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + end + end + local distResNear = 25 + local distResFar = 100 + local oddsResNear = 0 + local oddsResFar = 85 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 3) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 3) + end + return true + elseif ResBehavID == 2 then + if 35 <= targetDist then + local AppDist = Att3005_Dist_max + local DashDist = Att3005_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3005, TARGET_ENE_0, DIST_Middle, -1, 60) + else + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 2 + local Odds_Guard = 0 + BusyApproach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 5, 3004, TARGET_ENE_0, DIST_Middle, -1, 50) + end + end + return false +end + +return diff --git a/scripts_decompiled/537000_battle.lua b/scripts_decompiled/537000_battle.lua new file mode 100644 index 0000000..e662463 --- /dev/null +++ b/scripts_decompiled/537000_battle.lua @@ -0,0 +1,459 @@ +REGISTER_GOAL(GOAL_FirewoodKing537000_Battle, "FirewoodKing537000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 3.2 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 3.9 +local Att3007_Dist_min = 7 +local Att3007_Dist_max = 10.7 +local Att3008_Dist_min = 0 +local Att3008_Dist_max = 9.1 +local Att3010_Dist_min = 8 +local Att3010_Dist_max = 9.3 +local Att3012_Dist_min = 0 +local Att3012_Dist_max = 3.9 +local Att3018_Dist_min = 11.5 +local Att3018_Dist_max = 13.7 +local Att3019_Dist_min = 14 +local Att3019_Dist_max = 16 +local Att3020_Dist_min = 0 +local Att3020_Dist_max = 2.4 +local Att3021_Dist_min = 0 +local Att3021_Dist_max = 2.8 +local Att3022_Dist_min = 7 +local Att3022_Dist_max = 10.4 +local Suki = 1.8 +REGISTER_GOAL_NO_UPDATE(GOAL_FirewoodKing537000_Battle, 1) +function FirewoodKing537000Battle_Activate(ai, goal) + local actPerArr = {} + local actFuncArr = {} + local defFuncParamTbl = {} + Common_Clear_Param(actPerArr, actFuncArr, defFuncParamTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local hprate = ai:GetHpRate(TARGET_SELF) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act08Per = 0 + local Act09Per = 0 + local GetWellSpace_Odds = 100 + local Throw = 1 + if ai:IsFinishTimer(0) == false then + Throw = 0.25 + else + Throw = 1 + end + if ai:IsTargetGuard(TARGET_ENE_0) == true and fate <= 70 and targetDist <= 5 then + Act02Per = 30 + Act09Per = 70 + elseif 15 <= targetDist then + Act06Per = 30 + Act07Per = 70 + elseif 12 <= targetDist then + Act04Per = 15 + Act06Per = 70 + Act07Per = 15 + elseif 10 <= targetDist then + Act03Per = 30 + Act04Per = 40 + Act06Per = 30 + elseif 7 <= targetDist then + Act01Per = 10 + Act02Per = 0 + Act03Per = 30 + Act04Per = 15 + Act05Per = 15 + Act06Per = 30 + elseif 4 <= targetDist then + Act01Per = 28 + Act02Per = 20 * Throw + Act03Per = 15 + Act04Per = 0 + Act05Per = 37 + else + Act01Per = 30 + Act02Per = 40 * Throw + Act03Per = 0 + Act04Per = 0 + Act05Per = 30 + end + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per) + if fateAct <= Act01Per then + FirewoodKing537000_Act01(ai, goal) + elseif fateAct <= Act01Per + Act02Per then + FirewoodKing537000_Act02(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per then + FirewoodKing537000_Act03(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + FirewoodKing537000_Act04(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + FirewoodKing537000_Act05(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + FirewoodKing537000_Act06(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + FirewoodKing537000_Act07(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per then + FirewoodKing537000_Act08(ai, goal) + else + FirewoodKing537000_Act09(ai, goal) + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + FirewoodKing537000_GetWellSpace_Act(ai, goal) + end + return +end + +Att3000_Dist_min = Att3000_Dist_max +Att3000_Dist_min = Suki +function FirewoodKing537000_Act01(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local bRight = ai:GetRandam_Int(0, 1) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 0.5 + local Odds_Guard = 0 + if DashDist <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, AppDist, TARGET_SELF, false, -1) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, TARGET_ENE_0, AppDist, TARGET_SELF, true, -1) + end + if fate <= 5 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 20) + elseif fate <= 15 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Near, -1, 20) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Near, -1, 20) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 45 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Near, -1, 20) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3004, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 75 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Near, -1, 20) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3002, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Near, -1, 20) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3004, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, Suki, TARGET_ENE_0, bRight, ai:GetRandam_Int(20, 30), true, true, -1) + GetWellSpace_Odds = 0 + return +end + +Att3000_Dist_min = Att3006_Dist_max +function FirewoodKing537000_Act02(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 0.5 + local Odds_Guard = 0 + if DashDist <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, AppDist, TARGET_SELF, false, -1) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, TARGET_ENE_0, AppDist, TARGET_SELF, true, -1) + end + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, DIST_Middle, -1, 20) + else + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3023, TARGET_ENE_0, DIST_Middle, -1, 20) + end + if ai:IsFinishTimer(0) == true then + ai:SetTimer(0, 30) + end + GetWellSpace_Odds = 0 + return +end + +Att3000_Dist_min = Att3008_Dist_max +Att3000_Dist_min = Suki +function FirewoodKing537000_Act03(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local bRight = ai:GetRandam_Int(0, 1) + local AppDist = Att3008_Dist_max + local DashDist = Att3008_Dist_max + 0.5 + local Odds_Guard = 0 + if DashDist <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, AppDist, TARGET_SELF, false, -1) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, TARGET_ENE_0, AppDist, TARGET_SELF, true, -1) + end + if fate <= 60 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3008, TARGET_ENE_0, DIST_Middle, -1, 20) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3008, TARGET_ENE_0, DIST_Near, -1, 20) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3009, TARGET_ENE_0, DIST_Middle, 0) + end + goal:AddSubGoal(GOAL_COMMON_SidewayMove, Suki, TARGET_ENE_0, bRight, ai:GetRandam_Int(20, 30), true, true, -1) + GetWellSpace_Odds = 0 + return +end + +Att3000_Dist_min = Att3010_Dist_max +Att3000_Dist_min = Suki +function FirewoodKing537000_Act04(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local bRight = ai:GetRandam_Int(0, 1) + local AppDist = Att3010_Dist_max + local DashDist = Att3010_Dist_max + 0.5 + local Odds_Guard = 0 + if DashDist <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, AppDist, TARGET_SELF, false, -1) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, TARGET_ENE_0, AppDist, TARGET_SELF, true, -1) + end + if fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3010, TARGET_ENE_0, DIST_Middle, -1, 25) + GetWellSpace_Odds = 100 + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3010, TARGET_ENE_0, DIST_Near, -1, 25) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3011, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, Suki, TARGET_ENE_0, bRight, ai:GetRandam_Int(20, 30), true, true, -1) + GetWellSpace_Odds = 0 + end + return +end + +Att3000_Dist_min = Att3012_Dist_max +Att3000_Dist_min = Suki +function FirewoodKing537000_Act05(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local bRight = ai:GetRandam_Int(0, 1) + local AppDist = Att3012_Dist_max + local DashDist = Att3012_Dist_max + 0.5 + local Odds_Guard = 0 + if DashDist <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, AppDist, TARGET_SELF, false, -1) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, TARGET_ENE_0, AppDist, TARGET_SELF, true, -1) + end + if fate <= 5 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3012, TARGET_ENE_0, DIST_Middle, -1, 40) + GetWellSpace_Odds = 100 + elseif fate <= 10 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3012, TARGET_ENE_0, DIST_Near, -1, 40) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3013, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, Suki, TARGET_ENE_0, bRight, ai:GetRandam_Int(20, 30), true, true, -1) + GetWellSpace_Odds = 0 + elseif fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3012, TARGET_ENE_0, DIST_Near, -1, 40) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3013, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3016, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, Suki, TARGET_ENE_0, bRight, ai:GetRandam_Int(20, 30), true, true, -1) + GetWellSpace_Odds = 0 + elseif fate <= 70 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3012, TARGET_ENE_0, DIST_Near, -1, 40) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3013, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3014, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, Suki, TARGET_ENE_0, bRight, ai:GetRandam_Int(20, 30), true, true, -1) + GetWellSpace_Odds = 0 + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3012, TARGET_ENE_0, DIST_Near, -1, 40) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3015, TARGET_ENE_0, DIST_Middle, 0) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, Suki, TARGET_ENE_0, bRight, ai:GetRandam_Int(20, 30), true, true, -1) + GetWellSpace_Odds = 0 + end + return +end + +Att3000_Dist_min = Att3018_Dist_max +Att3000_Dist_min = Suki +function FirewoodKing537000_Act06(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local bRight = ai:GetRandam_Int(0, 1) + local AppDist = Att3018_Dist_max + local DashDist = Att3018_Dist_max + 0.5 + local Odds_Guard = 0 + if DashDist <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, AppDist, TARGET_SELF, false, -1) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, TARGET_ENE_0, AppDist, TARGET_SELF, true, -1) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3018, TARGET_ENE_0, DIST_Middle, -1, 25) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, Suki, TARGET_ENE_0, bRight, ai:GetRandam_Int(20, 30), true, true, -1) + GetWellSpace_Odds = 0 + return +end + +Att3000_Dist_min = Att3019_Dist_max +Att3000_Dist_min = Suki +function FirewoodKing537000_Act07(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local bRight = ai:GetRandam_Int(0, 1) + local AppDist = Att3019_Dist_max + local DashDist = Att3019_Dist_max + 0.5 + local Odds_Guard = 0 + if DashDist <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, AppDist, TARGET_SELF, false, -1) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, TARGET_ENE_0, AppDist, TARGET_SELF, true, -1) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3019, TARGET_ENE_0, DIST_Middle, -1, 25) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, Suki, TARGET_ENE_0, bRight, ai:GetRandam_Int(20, 30), true, true, -1) + GetWellSpace_Odds = 0 + return +end + +Att3000_Dist_min = Att3020_Dist_max +function FirewoodKing537000_Act08(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3020_Dist_max + local DashDist = Att3020_Dist_max + 0.5 + local Odds_Guard = 0 + if DashDist <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, AppDist, TARGET_SELF, false, -1) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, TARGET_ENE_0, AppDist, TARGET_SELF, true, -1) + end + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3020, TARGET_ENE_0, DIST_Middle, 0) + GetWellSpace_Odds = 0 + return +end + +Att3000_Dist_min = Att3021_Dist_max +function FirewoodKing537000_Act09(ai, goal, paramTbl) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3021_Dist_max + local DashDist = Att3021_Dist_max + 0.5 + local Odds_Guard = 0 + if DashDist <= targetDist then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, AppDist, TARGET_SELF, false, -1) + else + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 2, TARGET_ENE_0, AppDist, TARGET_SELF, true, -1) + end + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3021, TARGET_ENE_0, DIST_Middle, -1, 20) + GetWellSpace_Odds = 100 + return +end + +function FirewoodKing537000_GetWellSpace_Act(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + if fate <= 15 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 701, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 3) + elseif fate <= 22 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 3) + elseif fate <= 30 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 10, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 3) + end + return +end + +function FirewoodKing537000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function FirewoodKing537000Battle_Terminate(ai, goal) + return +end + +function FirewoodKing537000Battle_Interupt(ai, goal) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local superStepDist = 4 + local superStepPer = 15 + local bkStepPer = 50 + local leftStepPer = 25 + local rightStepPer = 25 + local safetyDist = 5 + if FindAttack_Step(ai, goal, superStepDist, superStepPer, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + end + local distGuardBreak_Act = 4 + local oddsGuardBreak_Act = 80 + if GuardBreak_Act(ai, goal, distGuardBreak_Act, oddsGuardBreak_Act) then + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, -1, 25) + elseif fate <= 65 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Near, -1, 25) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + elseif fate <= 85 then + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Near, -1, 25) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3002, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Near, -1, 25) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3002, TARGET_ENE_0, DIST_Near, 0) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + local distMissSwing_Int = 9.3 + local oddsMissSwing_Int = 80 + if MissSwing_Int(ai, goal, distMissSwing_Int, oddsMissSwing_Int) then + if 8 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3010, TARGET_ENE_0, DIST_Middle, 0) + elseif 3.9 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3008, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3012, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + local distUseItem_Act = 9.3 + local oddsUseItem_Act = 40 + if UseItem_Act(ai, goal, distUseItem_Act, oddsUseItem_Act) then + if 8 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3010, TARGET_ENE_0, DIST_Middle, 0) + elseif 3.9 <= targetDist then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 3008, TARGET_ENE_0, DIST_Middle, 0) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3012, TARGET_ENE_0, DIST_Near, -1, 40) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3013, TARGET_ENE_0, DIST_Middle, 0) + end + return true + end + local distResNear = 0.5 + local distResFar = 25 + local oddsResNear = 0 + local oddsResFar = 100 + local ResBehavID = Shoot_2dist(ai, goal, distResNear, distResFar, oddsResNear, oddsResFar) + if ResBehavID == 1 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 3) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 3) + end + return true + elseif ResBehavID == 2 then + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 3) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 3) + end + end + local oddsResponse = 35 + local bkStepPer = 50 + local leftStepPer = 25 + local rightStepPer = 25 + local safetyDist = 3 + if RebByOpGuard_Step(ai, goal, oddsResponse, bkStepPer, leftStepPer, rightStepPer, safetyDist) then + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/539000_battle.lua b/scripts_decompiled/539000_battle.lua new file mode 100644 index 0000000..e041e31 --- /dev/null +++ b/scripts_decompiled/539000_battle.lua @@ -0,0 +1,580 @@ +REGISTER_GOAL(GOAL_Ja_yearl_demon539000_Battle, "Ja_yearl_demon539000Battle") +local Att3000_Dist_min = 0 +local Att3000_Dist_max = 12.5 +local Att3002_Dist_min = 0 +local Att3002_Dist_max = 10.6 +local Att3003_Dist_min = 0 +local Att3003_Dist_max = 0 +local Att3004_Dist_min = 0 +local Att3004_Dist_max = 10.4 +local Att3006_Dist_min = 0 +local Att3006_Dist_max = 11.3 +local Att3007_Dist_min = 0 +local Att3007_Dist_max = 8 +local Att3008_Dist_min = 0 +local Att3008_Dist_max = 10 +local Att3009_Dist_min = 22 +local Att3009_Dist_max = 29 +local Att3010_Dist_min = 10 +local Att3010_Dist_max = 15 +REGISTER_GOAL_NO_UPDATE(GOAL_Ja_yearl_demon539000_Battle, 1) +function Ja_yearl_demon539000Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local eventNo = ai:GetEventRequest(0) + local waitTime = ai:GetRandam_Float(0.5, 2) + local role = ai:GetTeamOrder(ORDER_TYPE_Role) + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act06Per = 0 + local Act07Per = 0 + local Act08Per = 0 + local Act09Per = 0 + local Act10Per = 0 + local Act11Per = 0 + local Act12Per = 0 + local Act13Per = 0 + local Act14Per = 0 + local Act15Per = 0 + local Act16Per = 0 + local Act17Per = 0 + local Act18Per = 0 + local Act19Per = 0 + local GetWellSpace_Odds = 0 + if ai:IsFinishTimer(1) == true then + ai:SetTimer(1, 9999) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(0, 3), TARGET_ENE_0, 0, 0, 0) + end + if role == ROLE_TYPE_Attack then + if eventNo == 1 and ai:IsFinishTimer(0) == true then + if 22 <= targetDist then + Act01Per = 8 + Act02Per = 8 + Act04Per = 8 + Act05Per = 8 + Act06Per = 3 + Act07Per = 0 + Act08Per = 25 + Act09Per = 40 + elseif 12.5 <= targetDist then + Act01Per = 15 + Act02Per = 15 + Act04Per = 15 + Act05Per = 15 + Act06Per = 5 + Act07Per = 0 + Act09Per = 35 + elseif 8 <= targetDist then + Act01Per = 18 + Act02Per = 18 + Act04Per = 18 + Act05Per = 18 + Act06Per = 5 + Act07Per = 5 + Act09Per = 18 + elseif 4 <= targetDist then + Act01Per = 20 + Act02Per = 20 + Act04Per = 20 + Act05Per = 20 + Act06Per = 5 + Act07Per = 5 + Act09Per = 10 + else + Act01Per = 21 + Act02Per = 21 + Act04Per = 21 + Act05Per = 21 + Act06Per = 5 + Act07Per = 11 + end + elseif 22 <= targetDist then + Act01Per = 25 + Act02Per = 25 + Act04Per = 25 + Act05Per = 20 + Act06Per = 5 + Act07Per = 0 + elseif 13.4 <= targetDist then + Act01Per = 24 + Act02Per = 24 + Act04Per = 24 + Act05Per = 24 + Act06Per = 4 + Act07Per = 0 + elseif 8 <= targetDist then + Act01Per = 23 + Act02Per = 23 + Act04Per = 23 + Act05Per = 19 + Act06Per = 6 + Act07Per = 6 + elseif 4 <= targetDist then + Act01Per = 22 + Act02Per = 22 + Act04Per = 22 + Act05Per = 22 + Act06Per = 5 + Act07Per = 7 + else + Act01Per = 21 + Act02Per = 21 + Act04Per = 21 + Act05Per = 21 + Act06Per = 5 + Act07Per = 11 + end + elseif role == ROLE_TYPE_Torimaki then + if eventNo == 1 and ai:IsFinishTimer(0) == true then + Act08Per = 4 + Act09Per = 4 + Act10Per = 84 + Act12Per = 2 + Act13Per = 2 + Act14Per = 2 + Act15Per = 2 + else + Act10Per = 84 + Act12Per = 2 + Act13Per = 2 + Act14Per = 2 + Act15Per = 2 + end + elseif 22 <= targetDist then + Act10Per = 20 + Act11Per = 80 + elseif 15 <= targetDist then + if eventNo == 1 and ai:IsFinishTimer(0) == true then + Act08Per = 25 + Act09Per = 25 + Act10Per = 10 + Act16Per = 10 + Act17Per = 10 + Act18Per = 10 + Act19Per = 10 + else + Act10Per = 20 + Act16Per = 20 + Act17Per = 20 + Act18Per = 20 + Act19Per = 20 + end + else + Act10Per = 50 + Act16Per = 13 + Act17Per = 13 + Act18Per = 12 + Act19Per = 12 + end + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per + Act16Per + Act17Per + Act18Per + Act19Per) + if fateAct <= Act01Per then + Ja_yearl_demon539000_Act01(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per then + Ja_yearl_demon539000_Act02(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per then + Ja_yearl_demon539000_Act03(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + Ja_yearl_demon539000_Act04(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + Ja_yearl_demon539000_Act05(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per then + Ja_yearl_demon539000_Act06(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per then + Ja_yearl_demon539000_Act07(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per then + Ja_yearl_demon539000_Act08(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per then + Ja_yearl_demon539000_Act09(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per then + Ja_yearl_demon539000_Act10(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per then + Ja_yearl_demon539000_Act11(ai, goal) + GetWellSpace_Odds = 0 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per then + Ja_yearl_demon539000_Act12(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per then + Ja_yearl_demon539000_Act13(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per + Act14Per then + Ja_yearl_demon539000_Act14(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per then + Ja_yearl_demon539000_Act15(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per + Act16Per then + Ja_yearl_demon539000_Act16(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per + Act16Per + Act17Per then + Ja_yearl_demon539000_Act17(ai, goal) + GetWellSpace_Odds = 100 + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act06Per + Act07Per + Act08Per + Act09Per + Act10Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per + Act16Per + Act17Per + Act18Per then + Ja_yearl_demon539000_Act18(ai, goal) + GetWellSpace_Odds = 100 + else + Ja_yearl_demon539000_Act19(ai, goal) + GetWellSpace_Odds = 100 + end + local fateGWS = ai:GetRandam_Int(1, 100) + if fateGWS <= GetWellSpace_Odds then + Ja_yearl_demon539000_GetWellSpace_Act(ai, goal) + end + return +end + +Att3000_Dist_min = Att3000_Dist_max +function Ja_yearl_demon539000_Act01(ai, goal) + local DashFate = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3000_Dist_max + local DashDist = Att3000_Dist_max + 10 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + if DashFate <= 60 then + targetDist = ai:GetDist(TARGET_ENE_0) + AppDist = Att3000_Dist_max + DashDist = Att3000_Dist_max + 9999 + Odds_Guard = 0 + fate = ai:GetRandam_Int(1, 100) + end + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, 1.5, 25) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, 1.5, 25) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + end + return +end + +Att3000_Dist_min = Att3002_Dist_max +function Ja_yearl_demon539000_Act02(ai, goal) + local DashFate = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3002_Dist_max + local DashDist = Att3002_Dist_max + 10 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + if DashFate <= 60 then + targetDist = ai:GetDist(TARGET_ENE_0) + AppDist = Att3002_Dist_max + DashDist = Att3002_Dist_max + 9999 + Odds_Guard = 0 + fate = ai:GetRandam_Int(1, 100) + end + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, DIST_Middle, 1.5, 10) + return +end + +Att3000_Dist_min = Att3003_Dist_max +function Ja_yearl_demon539000_Act03(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3003_Dist_max + local DashDist = Att3003_Dist_max + 0 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3003, TARGET_ENE_0, DIST_Middle, 1.5, 25) + return +end + +Att3000_Dist_min = Att3004_Dist_max +Att3000_Dist_min = Att3000_Dist_max +function Ja_yearl_demon539000_Act04(ai, goal) + local DashFate = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3004_Dist_max + local DashDist = Att3004_Dist_max + 10 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + if DashFate <= 60 then + targetDist = ai:GetDist(TARGET_ENE_0) + AppDist = Att3004_Dist_max + DashDist = Att3000_Dist_max + 9999 + Odds_Guard = 0 + fate = ai:GetRandam_Int(1, 100) + end + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3004, TARGET_ENE_0, DIST_Middle, 1.5, 8) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3004, TARGET_ENE_0, DIST_Middle, 1.5, 8) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + return +end + +Att3000_Dist_min = Att3006_Dist_max +function Ja_yearl_demon539000_Act05(ai, goal) + local DashFate = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3006_Dist_max + local DashDist = Att3006_Dist_max + 10 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + if DashFate <= 60 then + targetDist = ai:GetDist(TARGET_ENE_0) + AppDist = Att3006_Dist_max + DashDist = Att3006_Dist_max + 9999 + Odds_Guard = 0 + fate = ai:GetRandam_Int(1, 100) + end + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, DIST_Middle, 1.5, 25) + return +end + +Att3000_Dist_min = Att3007_Dist_max +function Ja_yearl_demon539000_Act06(ai, goal) + local DashFate = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3007_Dist_max + local DashDist = Att3007_Dist_max + 10 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + if DashFate <= 60 then + targetDist = ai:GetDist(TARGET_ENE_0) + AppDist = Att3007_Dist_max + DashDist = Att3007_Dist_max + 9999 + Odds_Guard = 0 + fate = ai:GetRandam_Int(1, 100) + end + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3007, TARGET_ENE_0, DIST_Middle, 1.5, 25) + return +end + +function Ja_yearl_demon539000_Act07(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 10, 3008, TARGET_ENE_0, DIST_Middle) + return +end + +function Ja_yearl_demon539000_Act08(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fatetime = ai:GetRandam_Int(30, 60) + ai:SetTimer(0, fatetime) + goal:AddSubGoal(GOAL_COMMON_KeepDist, 10, TARGET_ENE_0, 15, 22, TARGET_ENE_0, true, -1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3009, TARGET_ENE_0, DIST_None, -1, -1) + return +end + +function Ja_yearl_demon539000_Act09(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fatetime = ai:GetRandam_Int(30, 60) + ai:SetTimer(0, fatetime) + goal:AddSubGoal(GOAL_COMMON_KeepDist, 10, TARGET_ENE_0, 15, 22, TARGET_ENE_0, true, -1) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3010, TARGET_ENE_0, DIST_None, -1, -1) + return +end + +function Ja_yearl_demon539000_Act10(ai, goal) + local GW_fate = ai:GetRandam_Int(0, 100) + local bRight = ai:GetRandam_Int(0, 1) + local friendNum = ai:GetTeamRecordCount(COORDINATE_TYPE_SideWalk_L + bRight, TARGET_ENE_0, 2) + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, bRight, ai:GetRandam_Int(50, 110), true, true, -1) + return +end + +function Ja_yearl_demon539000_Act11(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = 22 + local DashDist = 32 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_KeepDist, 10, TARGET_ENE_0, 15, 22, TARGET_ENE_0, true, -1) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function Ja_yearl_demon539000_Act12(ai, goal) + local DashFate = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3000_Dist_max + 2 + local DashDist = Att3000_Dist_max + 12 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + if DashFate <= 60 then + targetDist = ai:GetDist(TARGET_ENE_0) + AppDist = Att3000_Dist_max + 2 + DashDist = Att3000_Dist_max + 9999 + Odds_Guard = 0 + fate = ai:GetRandam_Int(1, 100) + end + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, 1.5, 25) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, 1.5, 25) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + end + return +end + +Att3000_Dist_min = Att3002_Dist_max +function Ja_yearl_demon539000_Act13(ai, goal) + local DashFate = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3002_Dist_max + 2 + local DashDist = Att3002_Dist_max + 12 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + if DashFate <= 60 then + targetDist = ai:GetDist(TARGET_ENE_0) + AppDist = Att3002_Dist_max + 2 + DashDist = Att3002_Dist_max + 9999 + Odds_Guard = 0 + fate = ai:GetRandam_Int(1, 100) + end + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, DIST_Middle, 1.5, 10) + return +end + +Att3000_Dist_min = Att3004_Dist_max +function Ja_yearl_demon539000_Act14(ai, goal) + local DashFate = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3004_Dist_max + 2 + local DashDist = Att3004_Dist_max + 12 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + if DashFate <= 60 then + targetDist = ai:GetDist(TARGET_ENE_0) + AppDist = Att3004_Dist_max + 2 + DashDist = Att3004_Dist_max + 9999 + Odds_Guard = 0 + fate = ai:GetRandam_Int(1, 100) + end + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3004, TARGET_ENE_0, DIST_Middle, 1.5, 25) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3004, TARGET_ENE_0, DIST_Middle, 1.5, 25) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + return +end + +Att3000_Dist_min = Att3006_Dist_max +Att3000_Dist_min = Att3000_Dist_max +function Ja_yearl_demon539000_Act15(ai, goal) + local DashFate = ai:GetRandam_Int(1, 100) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3006_Dist_max + 2 + local DashDist = Att3006_Dist_max + 12 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + if DashFate <= 60 then + targetDist = ai:GetDist(TARGET_ENE_0) + AppDist = Att3000_Dist_max + 2 + DashDist = Att3006_Dist_max + 9999 + Odds_Guard = 0 + fate = ai:GetRandam_Int(1, 100) + end + Approach_Act(ai, goal, AppDist, DashDist, Odds_Guard) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, DIST_Middle, 1.5, 25) + return +end + +Att3000_Dist_min = Att3000_Dist_max +function Ja_yearl_demon539000_Act16(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3000_Dist_max + 2 + local DashDist = Att3000_Dist_max + 12 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + if fate <= 20 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, 1.5, 25) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, DIST_Middle, 1.5, 25) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3001, TARGET_ENE_0, DIST_Middle, 0) + end + return +end + +Att3000_Dist_min = Att3002_Dist_max +function Ja_yearl_demon539000_Act17(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3002_Dist_max + 2 + local DashDist = Att3002_Dist_max + 12 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3002, TARGET_ENE_0, DIST_Middle, 1.5, 10) + return +end + +Att3000_Dist_min = Att3004_Dist_max +function Ja_yearl_demon539000_Act18(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3004_Dist_max + 2 + local DashDist = Att3004_Dist_max + 12 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + if fate <= 40 then + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3004, TARGET_ENE_0, DIST_Middle, 1.5, 25) + else + goal:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3004, TARGET_ENE_0, DIST_Middle, 1.5, 25) + goal:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3005, TARGET_ENE_0, DIST_Middle, 0) + end + return +end + +Att3000_Dist_min = Att3006_Dist_max +function Ja_yearl_demon539000_Act19(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local AppDist = Att3006_Dist_max + 2 + local DashDist = Att3006_Dist_max + 12 + local Odds_Guard = 0 + local fate = ai:GetRandam_Int(1, 100) + goal:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, DIST_Middle, 1.5, 25) + return +end + +function Ja_yearl_demon539000_GetWellSpace_Act(ai, goal) + local GW_fate = ai:GetRandam_Int(0, 100) + local bRight = ai:GetRandam_Int(0, 1) + local friendNum = ai:GetTeamRecordCount(COORDINATE_TYPE_SideWalk_L + bRight, TARGET_ENE_0, 2) + if GW_fate > 50 then + if GW_fate <= 75 and friendNum < 2 then + goal:AddSubGoal(GOAL_COMMON_SidewayMove, 3, TARGET_ENE_0, bRight, ai:GetRandam_Int(50, 110), true, true, -1) + else + local fate = ai:GetRandam_Int(1, 100) + if fate <= 50 then + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 702, TARGET_ENE_0, 0, AI_DIR_TYPE_L, 4) + else + goal:AddSubGoal(GOAL_COMMON_SpinStep, 5, 703, TARGET_ENE_0, 0, AI_DIR_TYPE_R, 4) + end + end + end + return +end + +function Ja_yearl_demon539000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Ja_yearl_demon539000Battle_Terminate(ai, goal) + return +end + +function Ja_yearl_demon539000Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/540000_battle.lua b/scripts_decompiled/540000_battle.lua new file mode 100644 index 0000000..d2e55c0 --- /dev/null +++ b/scripts_decompiled/540000_battle.lua @@ -0,0 +1,365 @@ +REGISTER_GOAL(GOAL_Boss_Izalis540000_Battle, "Boss_Izalis540000Battle") +REGISTER_GOAL_NO_UPDATE(GOAL_Boss_Izalis540000_Battle, 1) +function Boss_Izalis540000Battle_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local fate3 = ai:GetRandam_Int(1, 100) + local fate4 = ai:GetRandam_Int(1, 100) + local eventNo = ai:GetEventRequest(0) + local Act01Per = 0 + local Act02Per = 0 + local Act03Per = 0 + local Act04Per = 0 + local Act05Per = 0 + local Act11Per = 0 + local Act12Per = 0 + local Act13Per = 0 + local Act14Per = 0 + local Act15Per = 0 + local Act16Per = 0 + local Act21Per = 0 + local Act22Per = 0 + local Act23Per = 0 + local Act24Per = 0 + local Act25Per = 0 + local Act26Per = 0 + local Act31Per = 0 + local Act32Per = 0 + local Act33Per = 0 + local Act34Per = 0 + local Act35Per = 0 + local Act36Per = 0 + local Act40Per = 0 + local Att3000flag = 0 + local Att3001flag = 0 + local Att3002flag = 0 + local Att3003flag = 0 + local Att3004flag = 0 + local Att3006flag = 0 + local Att3007flag = 0 + local Att3008flag = 0 + local Att3009flag = 0 + local Att3010flag = 0 + local Att3011flag = 0 + local Att13000flag = 0 + local Att13001flag = 0 + local Att13002flag = 0 + local Att13003flag = 0 + local Att13004flag = 0 + local Att13005flag = 0 + local Att13006flag = 0 + local Att13007flag = 0 + local Att13008flag = 0 + local Att13009flag = 0 + local Att13010flag = 0 + local Att13011flag = 0 + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1412570) then + Att3006flag = 1 + Att13006flag = 1 + end + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1412572) then + Att3007flag = 1 + Att13007flag = 1 + end + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1412576) then + Att3008flag = 1 + Att13008flag = 1 + end + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1412580) then + Att3009flag = 1 + Att13009flag = 1 + end + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1412584) then + Att3010flag = 1 + Att13010flag = 1 + end + if ai:IsInsideTargetRegion(TARGET_ENE_0, 1412588) then + Att3011flag = 1 + Att13011flag = 1 + end + if not not ai:IsInsideTargetRegion(TARGET_ENE_0, 1412609) or not not ai:IsInsideTargetRegion(TARGET_ENE_0, 1412610) or not not ai:IsInsideTargetRegion(TARGET_ENE_0, 1412614) or ai:IsInsideTargetRegion(TARGET_ENE_0, 1412615) then + Att3000flag = 1 + Att13000flag = 1 + end + if not not ai:IsInsideTargetRegion(TARGET_ENE_0, 1412612) or not not ai:IsInsideTargetRegion(TARGET_ENE_0, 1412613) or not not ai:IsInsideTargetRegion(TARGET_ENE_0, 1412617) or ai:IsInsideTargetRegion(TARGET_ENE_0, 1412618) then + Att3001flag = 1 + Att13001flag = 1 + end + if not not ai:IsInsideTargetRegion(TARGET_ENE_0, 1412619) or not not ai:IsInsideTargetRegion(TARGET_ENE_0, 1412620) or not not ai:IsInsideTargetRegion(TARGET_ENE_0, 1412624) or ai:IsInsideTargetRegion(TARGET_ENE_0, 1412625) then + Att3003flag = 1 + Att13004flag = 1 + end + if not not ai:IsInsideTargetRegion(TARGET_ENE_0, 1412622) or not not ai:IsInsideTargetRegion(TARGET_ENE_0, 1412623) or not not ai:IsInsideTargetRegion(TARGET_ENE_0, 1412627) or ai:IsInsideTargetRegion(TARGET_ENE_0, 1412628) then + Att3004flag = 1 + Att13005flag = 1 + end + if not not ai:IsInsideTargetRegion(TARGET_ENE_0, 1412611) or ai:IsInsideTargetRegion(TARGET_ENE_0, 1412616) then + Att3002flag = 1 + Att13002flag = 1 + end + if ai:IsFinishTimer(0) == true then + Att13003flag = 1 + end + if ai:HasSpecialEffectId(TARGET_SELF, 5130) then + if Att13006flag == 1 then + Act31Per = 100 + end + if Att13007flag == 1 then + Act32Per = 100 + end + if Att13008flag == 1 then + Act33Per = 100 + end + if Att13009flag == 1 then + Act34Per = 100 + end + if Att13010flag == 1 then + Act35Per = 100 + end + if Att13011flag == 1 then + Act36Per = 100 + end + if Att13002flag == 1 then + Act23Per = 100 + end + if Att13000flag == 1 then + Act21Per = 2 + end + if Att13001flag == 1 then + Act22Per = 2 + end + if Att13003flag == 1 then + Act24Per = 20 + end + if Att13004flag == 1 then + Act25Per = 2 + end + if Att13005flag == 1 then + Act26Per = 2 + end + Act40Per = 10 + else + if Att3006flag == 1 then + Act11Per = 100 + end + if Att3007flag == 1 then + Act12Per = 100 + end + if Att3008flag == 1 then + Act13Per = 100 + end + if Att3009flag == 1 then + Act14Per = 100 + end + if Att3010flag == 1 then + Act15Per = 100 + end + if Att3011flag == 1 then + Act16Per = 100 + end + if Att3002flag == 1 then + Act03Per = 100 + end + if Att3000flag == 1 then + Act01Per = 2 + end + if Att3001flag == 1 then + Act02Per = 2 + end + if Att3003flag == 1 then + Act04Per = 2 + end + if Att3004flag == 1 then + Act05Per = 2 + end + Act40Per = 10 + end + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(2.5, 4), TARGET_NONE, 0, 0, 0) + local fateAct = ai:GetRandam_Int(1, Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per + Act16Per + Act21Per + Act22Per + Act23Per + Act24Per + Act25Per + Act26Per + Act31Per + Act32Per + Act33Per + Act34Per + Act35Per + Act36Per + Act40Per) + if fateAct <= Act01Per then + Boss_Izalis540000_Act01(ai, goal) + elseif fateAct <= Act01Per + Act02Per then + Boss_Izalis540000_Act02(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per then + Boss_Izalis540000_Act03(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per then + Boss_Izalis540000_Act04(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per then + Boss_Izalis540000_Act05(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act11Per then + Boss_Izalis540000_Act11(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act11Per + Act12Per then + Boss_Izalis540000_Act12(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act11Per + Act12Per + Act13Per then + Boss_Izalis540000_Act13(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act11Per + Act12Per + Act13Per + Act14Per then + Boss_Izalis540000_Act14(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per then + Boss_Izalis540000_Act15(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per + Act16Per then + Boss_Izalis540000_Act16(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per + Act16Per + Act21Per then + Boss_Izalis540000_Act21(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per + Act16Per + Act21Per + Act22Per then + Boss_Izalis540000_Act22(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per + Act16Per + Act21Per + Act22Per + Act23Per then + Boss_Izalis540000_Act23(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per + Act16Per + Act21Per + Act22Per + Act23Per + Act24Per then + Boss_Izalis540000_Act24(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per + Act16Per + Act21Per + Act22Per + Act23Per + Act24Per + Act25Per then + Boss_Izalis540000_Act25(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per + Act16Per + Act21Per + Act22Per + Act23Per + Act24Per + Act25Per + Act26Per then + Boss_Izalis540000_Act26(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per + Act16Per + Act21Per + Act22Per + Act23Per + Act24Per + Act25Per + Act26Per + Act31Per then + Boss_Izalis540000_Act31(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per + Act16Per + Act21Per + Act22Per + Act23Per + Act24Per + Act25Per + Act26Per + Act31Per + Act32Per then + Boss_Izalis540000_Act32(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per + Act16Per + Act21Per + Act22Per + Act23Per + Act24Per + Act25Per + Act26Per + Act31Per + Act32Per + Act33Per then + Boss_Izalis540000_Act33(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per + Act16Per + Act21Per + Act22Per + Act23Per + Act24Per + Act25Per + Act26Per + Act31Per + Act32Per + Act33Per + Act34Per then + Boss_Izalis540000_Act34(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per + Act16Per + Act21Per + Act22Per + Act23Per + Act24Per + Act25Per + Act26Per + Act31Per + Act32Per + Act33Per + Act34Per + Act35Per then + Boss_Izalis540000_Act35(ai, goal) + elseif fateAct <= Act01Per + Act02Per + Act03Per + Act04Per + Act05Per + Act11Per + Act12Per + Act13Per + Act14Per + Act15Per + Act16Per + Act21Per + Act22Per + Act23Per + Act24Per + Act25Per + Act26Per + Act31Per + Act32Per + Act33Per + Act34Per + Act35Per + Act36Per then + Boss_Izalis540000_Act36(ai, goal) + else + Boss_Izalis540000_Act40(ai, goal) + end + return +end + +function Boss_Izalis540000_Act01(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3000, TARGET_ENE_0, DIST_None, 0) + return +end + +function Boss_Izalis540000_Act02(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3001, TARGET_ENE_0, DIST_None, 0) + return +end + +function Boss_Izalis540000_Act03(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3002, TARGET_ENE_0, DIST_None, 0) + return +end + +function Boss_Izalis540000_Act04(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3003, TARGET_ENE_0, DIST_None, 0) + return +end + +function Boss_Izalis540000_Act05(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3004, TARGET_ENE_0, DIST_None, 0) + return +end + +function Boss_Izalis540000_Act11(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3006, TARGET_ENE_0, DIST_None, 0) + return +end + +function Boss_Izalis540000_Act12(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3007, TARGET_ENE_0, DIST_None, 0) + return +end + +function Boss_Izalis540000_Act13(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3008, TARGET_ENE_0, DIST_None, 0) + return +end + +function Boss_Izalis540000_Act14(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3009, TARGET_ENE_0, DIST_None, 0) + return +end + +function Boss_Izalis540000_Act15(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3010, TARGET_ENE_0, DIST_None, 0) + return +end + +function Boss_Izalis540000_Act16(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3011, TARGET_ENE_0, DIST_None, 0) + return +end + +function Boss_Izalis540000_Act21(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3000, TARGET_ENE_0, DIST_None, 0) + return +end + +function Boss_Izalis540000_Act22(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3001, TARGET_ENE_0, DIST_None, 0) + return +end + +function Boss_Izalis540000_Act23(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3002, TARGET_ENE_0, DIST_None, 0) + return +end + +function Boss_Izalis540000_Act24(ai, goal) + ai:SetTimer(0, 30) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3003, TARGET_ENE_0, DIST_None, 0) + return +end + +function Boss_Izalis540000_Act25(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3004, TARGET_ENE_0, DIST_None, 0) + return +end + +function Boss_Izalis540000_Act26(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3005, TARGET_ENE_0, DIST_None, 0) + return +end + +function Boss_Izalis540000_Act31(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3006, TARGET_ENE_0, DIST_None, 0) + return +end + +function Boss_Izalis540000_Act32(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3007, TARGET_ENE_0, DIST_None, 0) + return +end + +function Boss_Izalis540000_Act33(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3008, TARGET_ENE_0, DIST_None, 0) + return +end + +function Boss_Izalis540000_Act34(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3009, TARGET_ENE_0, DIST_None, 0) + return +end + +function Boss_Izalis540000_Act35(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3010, TARGET_ENE_0, DIST_None, 0) + return +end + +function Boss_Izalis540000_Act36(ai, goal) + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, 20, 3011, TARGET_ENE_0, DIST_None, 0) + return +end + +function Boss_Izalis540000_Act40(ai, goal) + goal:AddSubGoal(GOAL_COMMON_Wait, ai:GetRandam_Float(1, 3), TARGET_NONE, 0, 0, 0) + return +end + +function Boss_Izalis540000Battle_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Boss_Izalis540000Battle_Terminate(ai, goal) + return +end + +function Boss_Izalis540000Battle_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/approach_setting_direction.lua b/scripts_decompiled/approach_setting_direction.lua new file mode 100644 index 0000000..eecbbf7 --- /dev/null +++ b/scripts_decompiled/approach_setting_direction.lua @@ -0,0 +1,42 @@ +REGISTER_GOAL(GOAL_COMMON_ApproachSettingDirection, "ApproachSettingDirection") +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ApproachSettingDirection, 0, "ˆړ®‘ΏÛ", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ApproachSettingDirection, 1, "“ž’B”»’苗—£", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ApproachSettingDirection, 2, "�ù‰ñ‘ΏÛ", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ApproachSettingDirection, 3, "•à‚­?", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ApproachSettingDirection, 4, "ƒK�[ƒhEzState”ԍ†", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ApproachSettingDirection, 5, "ˆړ®•ûŒü", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ApproachSettingDirection, 6, "Žw’è•ûŒü‚ւ̋——£", 0) +REGISTER_GOAL_NO_UPDATE(GOAL_COMMON_ApproachSettingDirection, true) +REGISTER_GOAL_NO_INTERUPT(GOAL_COMMON_ApproachSettingDirection, true) +function ApproachSettingDirection_Activate(ai, goal) + local life_time = goal:GetLife() + local targetType = goal:GetParam(0) + local range = goal:GetParam(1) + local turnTarget = goal:GetParam(2) + local bWalk = goal:GetParam(3) + local guardActionId = goal:GetParam(4) + local moveTargetType = goal:GetParam(5) + local distDir = goal:GetParam(6) + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, life_time, targetType, moveTargetType, range, turnTarget, bWalk, moveTargetType, distDir) + if 0 < guardActionId then + local targetDist = ai:GetDist(targetType) + if range < targetDist then + ai:DoEzAction(life_time, guardActionId) + end + end + return +end + +function ApproachSettingDirection_Update(ai, goal, dT) + return +end + +function ApproachSettingDirection_Terminate(ai, goal) + return +end + +function ApproachSettingDirection_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/approach_target.lua b/scripts_decompiled/approach_target.lua new file mode 100644 index 0000000..94f5fef --- /dev/null +++ b/scripts_decompiled/approach_target.lua @@ -0,0 +1,62 @@ +REGISTER_GOAL(GOAL_COMMON_ApproachTarget, "ApproachTarget") +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ApproachTarget, 0, "ˆړ®‘ΏÛ", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ApproachTarget, 1, "“ž’B”»’苗—£", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ApproachTarget, 2, "�ù‰ñ‘ΏÛ", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ApproachTarget, 3, "•à‚­?", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ApproachTarget, 4, "ƒK�[ƒhEzState”ԍ†", 0) +REGISTER_GOAL_UPDATE_TIME(GOAL_COMMON_ApproachTarget, 0, 0) +REGISTER_GOAL_NO_INTERUPT(GOAL_COMMON_ApproachTarget, true) +function ApproachTarget_Activate(ai, goal) + local life_time = goal:GetLife() + local targetType = goal:GetParam(0) + local range = goal:GetParam(1) + local turnTarget = goal:GetParam(2) + local bWalk = goal:GetParam(3) + local guardActionId = goal:GetParam(4) + local moveTargetType = AI_DIR_TYPE_CENTER + local distDir = 0 + local resultTypeIfGuardSuccess = goal:GetParam(5) + local isLifeSuccessGuard = goal:GetParam(6) + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, life_time, targetType, moveTargetType, range, turnTarget, bWalk, moveTargetType, distDir) + if 0 < guardActionId then + local targetDist = ai:GetDist(targetType) + if range < targetDist then + ai:DoEzAction(life_time, guardActionId) + end + end + return +end + +function ApproachTarget_Update(ai, goal, dT) + local guardActionId = goal:GetParam(4) + if 0 < guardActionId then + if ai:IsInterupt(INTERUPT_Damaged) then + return GOAL_RESULT_Failed + elseif ai:IsInterupt(INTERUPT_SuccessGuard) then + local resultTypeIfGuardSuccess = goal:GetParam(5) + if resultTypeIfGuardSuccess ~= GOAL_RESULT_Continue then + return resultTypeIfGuardSuccess + end + end + end + if goal:GetLife() <= 0 then + local isLifeSuccessGuard = goal:GetParam(6) + if isLifeSuccessGuard then + return GOAL_RESULT_Success + else + return GOAL_RESULT_Failed + end + else + return GOAL_RESULT_Continue + end +end + +function ApproachTarget_Terminate(ai, goal) + return +end + +function ApproachTarget_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/attack.lua b/scripts_decompiled/attack.lua new file mode 100644 index 0000000..0041600 --- /dev/null +++ b/scripts_decompiled/attack.lua @@ -0,0 +1,39 @@ +REGISTER_GOAL(GOAL_COMMON_Attack, "Attack") +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_Attack, 0, "EzStateID", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_Attack, 1, "�UŒ‚‘ΏÛ", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_Attack, 2, "�¬Œ÷‹——£", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_Attack, 3, "�ã�UŒ‚Šp“x", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_Attack, 4, "‰º�UŒ‚Šp“x", 0) +REGISTER_GOAL_NO_UPDATE(GOAL_COMMON_Attack, 1) +function Attack_Activate(ai, goal) + local life = goal:GetLife() + local behaviorNo = goal:GetParam(0) + local attackTarget = goal:GetParam(1) + local distType = goal:GetParam(2) + local successAngle = 180 + local turnTime = 1.5 + local turnFaceAngle = 20 + local isComboAttack = false + local isMoveCancel = true + local isGaurdBreakAtk = false + local isTurn = false + local angleUpAtt = goal:GetParam(3) + local angleDownAtt = goal:GetParam(4) + goal:AddSubGoal(GOAL_COMMON_CommonAttack, life, behaviorNo, attackTarget, distType, successAngle, turnTime, turnFaceAngle, isComboAttack, isMoveCancel, isGaurdBreakAtk, isTurn, angleUpAtt, angleDownAtt) + return +end + +function Attack_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Attack_Terminate(ai, goal) + return +end + +REGISTER_GOAL_NO_INTERUPT(GOAL_COMMON_Attack, true) +function Attack_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/attack_tunable_spin.lua b/scripts_decompiled/attack_tunable_spin.lua new file mode 100644 index 0000000..b807a32 --- /dev/null +++ b/scripts_decompiled/attack_tunable_spin.lua @@ -0,0 +1,47 @@ +REGISTER_GOAL(GOAL_COMMON_AttackTunableSpin, "AttackTunableSpin") +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_AttackTunableSpin, 0, "EzStateID", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_AttackTunableSpin, 1, "�UŒ‚‘ΏÛ", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_AttackTunableSpin, 2, "�¬Œ÷‹——£", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_AttackTunableSpin, 3, "�UŒ‚‘O�ù‰񎞊Ô", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_AttackTunableSpin, 4, "�³–ʔ»’èŠp“x", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_AttackTunableSpin, 5, "�ã�UŒ‚Šp“x", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_AttackTunableSpin, 6, "‰º�UŒ‚Šp“x", 0) +REGISTER_GOAL_NO_UPDATE(GOAL_COMMON_AttackTunableSpin, 1) +function AttackTunableSpin_Activate(ai, goal) + local life = goal:GetLife() + local behaviorNo = goal:GetParam(0) + local attackTarget = goal:GetParam(1) + local distType = goal:GetParam(2) + local successAngle = 180 + local turnTime = goal:GetParam(3) + local turnFaceAngle = goal:GetParam(4) + if turnTime < 0 then + turnTime = 1.5 + end + if turnFaceAngle < 0 then + turnFaceAngle = 20 + end + local isComboAttack = false + local isMoveCancel = true + local isGaurdBreakAtk = false + local isTurn = false + local angleUpAtt = goal:GetParam(5) + local angleDownAtt = goal:GetParam(6) + goal:AddSubGoal(GOAL_COMMON_CommonAttack, life, behaviorNo, attackTarget, distType, successAngle, turnTime, turnFaceAngle, isComboAttack, isMoveCancel, isGaurdBreakAtk, isTurn, angleUpAtt, angleDownAtt) + return +end + +function AttackTunableSpin_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function AttackTunableSpin_Terminate(ai, goal) + return +end + +REGISTER_GOAL_NO_INTERUPT(GOAL_COMMON_AttackTunableSpin, true) +function AttackTunableSpin_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/combo_attack.lua b/scripts_decompiled/combo_attack.lua new file mode 100644 index 0000000..b619124 --- /dev/null +++ b/scripts_decompiled/combo_attack.lua @@ -0,0 +1,39 @@ +REGISTER_GOAL(GOAL_COMMON_ComboAttack, "ComboAttack") +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ComboAttack, 0, "EzStateID", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ComboAttack, 1, "�UŒ‚‘ΏÛ", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ComboAttack, 2, "�¬Œ÷‹——£", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ComboAttack, 3, "�ã�UŒ‚Šp“x", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ComboAttack, 4, "‰º�UŒ‚Šp“x", 0) +REGISTER_GOAL_NO_UPDATE(GOAL_COMMON_ComboAttack, 1) +function ComboAttack_Activate(ai, goal) + local life = goal:GetLife() + local behaviorNo = goal:GetParam(0) + local attackTarget = goal:GetParam(1) + local distType = goal:GetParam(2) + local successAngle = 90 + local turnTime = 1.5 + local turnFaceAngle = 20 + local isComboAttack = true + local isMoveCancel = true + local isGaurdBreakAtk = false + local isTurn = false + local angleUpAtt = goal:GetParam(3) + local angleDownAtt = goal:GetParam(4) + goal:AddSubGoal(GOAL_COMMON_CommonAttack, life, behaviorNo, attackTarget, distType, successAngle, turnTime, turnFaceAngle, isComboAttack, isMoveCancel, isGaurdBreakAtk, isTurn, angleUpAtt, angleDownAtt) + return +end + +function ComboAttack_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function ComboAttack_Terminate(ai, goal) + return +end + +REGISTER_GOAL_NO_INTERUPT(GOAL_COMMON_ComboAttack, true) +function ComboAttack_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/combo_attack_tunable_spin.lua b/scripts_decompiled/combo_attack_tunable_spin.lua new file mode 100644 index 0000000..efef330 --- /dev/null +++ b/scripts_decompiled/combo_attack_tunable_spin.lua @@ -0,0 +1,47 @@ +REGISTER_GOAL(GOAL_COMMON_ComboAttackTunableSpin, "ComboAttackTunableSpin") +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ComboAttackTunableSpin, 0, "EzStateID", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ComboAttackTunableSpin, 1, "�UŒ‚‘ΏÛ", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ComboAttackTunableSpin, 2, "�¬Œ÷‹——£", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ComboAttackTunableSpin, 3, "�UŒ‚‘O�ù‰񎞊ԁy•b�z", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ComboAttackTunableSpin, 4, "�³–ʔ»’èŠp“x�y“x�z", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ComboAttackTunableSpin, 5, "�ã�UŒ‚Šp“x", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ComboAttackTunableSpin, 6, "‰º�UŒ‚Šp“x", 0) +REGISTER_GOAL_NO_UPDATE(GOAL_COMMON_ComboAttackTunableSpin, 1) +function ComboAttackTunableSpin_Activate(ai, goal) + local life = goal:GetLife() + local behaviorNo = goal:GetParam(0) + local attackTarget = goal:GetParam(1) + local distType = goal:GetParam(2) + local successAngle = 90 + local turnTime = goal:GetParam(3) + local turnFaceAngle = goal:GetParam(4) + if turnTime < 0 then + turnTime = 1.5 + end + if turnFaceAngle < 0 then + turnFaceAngle = 20 + end + local isComboAttack = true + local isMoveCancel = true + local isGaurdBreakAtk = false + local isTurn = false + local angleUpAtt = goal:GetParam(5) + local angleDownAtt = goal:GetParam(6) + goal:AddSubGoal(GOAL_COMMON_CommonAttack, life, behaviorNo, attackTarget, distType, successAngle, turnTime, turnFaceAngle, isComboAttack, isMoveCancel, isGaurdBreakAtk, isTurn, angleUpAtt, angleDownAtt) + return +end + +function ComboAttackTunableSpin_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function ComboAttackTunableSpin_Terminate(ai, goal) + return +end + +REGISTER_GOAL_NO_INTERUPT(GOAL_COMMON_ComboAttackTunableSpin, true) +function ComboAttackTunableSpin_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/combo_final.lua b/scripts_decompiled/combo_final.lua new file mode 100644 index 0000000..310a325 --- /dev/null +++ b/scripts_decompiled/combo_final.lua @@ -0,0 +1,40 @@ +REGISTER_GOAL(GOAL_COMMON_ComboFinal, "ComboFinal") +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ComboFinal, 0, "EzStateID", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ComboFinal, 1, "�UŒ‚‘ΏÛ", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ComboFinal, 2, "�¬Œ÷‹——£", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ComboFinal, 3, "�ã�UŒ‚Šp“x", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ComboFinal, 4, "‰º�UŒ‚Šp“x", 0) +REGISTER_GOAL_NO_UPDATE(GOAL_COMMON_ComboFinal, 1) +ENABLE_COMBO_ATK_CANCEL(GOAL_COMMON_ComboFinal) +function ComboFinal_Activate(ai, goal) + local life = goal:GetLife() + local behaviorNo = goal:GetParam(0) + local attackTarget = goal:GetParam(1) + local distType = goal:GetParam(2) + local successAngle = 180 + local turnTime = 0 + local turnFaceAngle = 90 + local isComboAttack = false + local isMoveCancel = true + local isGaurdBreakAtk = false + local isTurn = false + local angleUpAtt = goal:GetParam(3) + local angleDownAtt = goal:GetParam(4) + goal:AddSubGoal(GOAL_COMMON_CommonAttack, life, behaviorNo, attackTarget, distType, successAngle, turnTime, turnFaceAngle, isComboAttack, isMoveCancel, isGaurdBreakAtk, isTurn, angleUpAtt, angleDownAtt) + return +end + +function ComboFinal_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function ComboFinal_Terminate(ai, goal) + return +end + +REGISTER_GOAL_NO_INTERUPT(GOAL_COMMON_ComboFinal, true) +function ComboFinal_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/combo_repeat.lua b/scripts_decompiled/combo_repeat.lua new file mode 100644 index 0000000..f50e4c6 --- /dev/null +++ b/scripts_decompiled/combo_repeat.lua @@ -0,0 +1,40 @@ +REGISTER_GOAL(GOAL_COMMON_ComboRepeat, "ComboRepeat") +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ComboRepeat, 0, "EzStateID", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ComboRepeat, 1, "�UŒ‚‘ΏÛ", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ComboRepeat, 2, "�¬Œ÷‹——£", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ComboRepeat, 3, "�ã�UŒ‚Šp“x", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ComboRepeat, 4, "‰º�UŒ‚Šp“x", 0) +REGISTER_GOAL_NO_UPDATE(GOAL_COMMON_ComboRepeat, 1) +ENABLE_COMBO_ATK_CANCEL(GOAL_COMMON_ComboRepeat) +function ComboRepeat_Activate(ai, goal) + local life = goal:GetLife() + local behaviorNo = goal:GetParam(0) + local attackTarget = goal:GetParam(1) + local distType = goal:GetParam(2) + local successAngle = 90 + local turnTime = 0 + local turnFaceAngle = 90 + local isComboAttack = true + local isMoveCancel = true + local isGaurdBreakAtk = false + local isTurn = false + local angleUpAtt = goal:GetParam(3) + local angleDownAtt = goal:GetParam(4) + goal:AddSubGoal(GOAL_COMMON_CommonAttack, life, behaviorNo, attackTarget, distType, successAngle, turnTime, turnFaceAngle, isComboAttack, isMoveCancel, isGaurdBreakAtk, isTurn, angleUpAtt, angleDownAtt) + return +end + +function ComboRepeat_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function ComboRepeat_Terminate(ai, goal) + return +end + +REGISTER_GOAL_NO_INTERUPT(GOAL_COMMON_ComboRepeat, true) +function ComboRepeat_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/combo_tunable_success_angle180.lua b/scripts_decompiled/combo_tunable_success_angle180.lua new file mode 100644 index 0000000..23e173c --- /dev/null +++ b/scripts_decompiled/combo_tunable_success_angle180.lua @@ -0,0 +1,47 @@ +REGISTER_GOAL(GOAL_COMMON_ComboTunable_SuccessAngle180, "ComboTunableSuccessAngle180") +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ComboTunable_SuccessAngle180, 0, "EzStateID", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ComboTunable_SuccessAngle180, 1, "�UŒ‚‘ΏÛ", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ComboTunable_SuccessAngle180, 2, "�¬Œ÷‹——£", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ComboTunable_SuccessAngle180, 3, "�UŒ‚‘O�ù‰񎞊ԁy•b�z", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ComboTunable_SuccessAngle180, 4, "�³–ʔ»’èŠp“x�y“x�z", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ComboTunable_SuccessAngle180, 5, "�ã�UŒ‚Šp“x", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ComboTunable_SuccessAngle180, 6, "‰º�UŒ‚Šp“x", 0) +REGISTER_GOAL_NO_UPDATE(GOAL_COMMON_ComboTunable_SuccessAngle180, 1) +function ComboTunableSuccessAngle180_Activate(ai, goal) + local life = goal:GetLife() + local behaviorNo = goal:GetParam(0) + local attackTarget = goal:GetParam(1) + local distType = goal:GetParam(2) + local successAngle = 180 + local turnTime = goal:GetParam(3) + local turnFaceAngle = goal:GetParam(4) + if turnTime < 0 then + turnTime = 1.5 + end + if turnFaceAngle < 0 then + turnFaceAngle = 20 + end + local isComboAttack = true + local isMoveCancel = true + local isGaurdBreakAtk = false + local isTurn = false + local angleUpAtt = goal:GetParam(5) + local angleDownAtt = goal:GetParam(6) + goal:AddSubGoal(GOAL_COMMON_CommonAttack, life, behaviorNo, attackTarget, distType, successAngle, turnTime, turnFaceAngle, isComboAttack, isMoveCancel, isGaurdBreakAtk, isTurn, angleUpAtt, angleDownAtt) + return +end + +function ComboTunableSuccessAngle180_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function ComboTunableSuccessAngle180_Terminate(ai, goal) + return +end + +REGISTER_GOAL_NO_INTERUPT(GOAL_COMMON_ComboTunable_SuccessAngle180, true) +function ComboTunableSuccessAngle180_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/come_down.lua b/scripts_decompiled/come_down.lua new file mode 100644 index 0000000..8a3a9f9 --- /dev/null +++ b/scripts_decompiled/come_down.lua @@ -0,0 +1,39 @@ +REGISTER_GOAL(GOAL_COMMON_ComeDown, "ComeDown") +REGISTER_GOAL_UPDATE_TIME(GOAL_COMMON_ComeDown, 0.5, 0.5) +REGISTER_GOAL_NO_INTERUPT(GOAL_COMMON_ComeDown, true) +function ComeDown_Activate(ai, goal) + goal:AddSubGoal(GOAL_COMMON_Attack, goal:GetLife(), 9510, TARGET_NONE, DIST_None) + return +end + +function ComeDown_Update(ai, goal) + ai:SetNumber(0, 0) + local goalDistY = goal:GetParam(0) + if ai:IsLanding() then + return GOAL_RESULT_Failed + end + local resultSubGoal = goal:GetLastSubGoalResult() + if resultSubGoal == GOAL_RESULT_Success or resultSubGoal == GOAL_RESULT_Failed then + local distY = ai:GetDistY(TARGET_ENE_0) + if distY < goalDistY then + goal:AddSubGoal(GOAL_COMMON_Attack, goal:GetLife(), 9510, TARGET_NONE, DIST_None) + end + end + local distY = ai:GetDistY(TARGET_ENE_0) + if distY <= goalDistY then + ai:SetNumber(0, 1) + return GOAL_RESULT_Success + else + return GOAL_RESULT_Continue + end +end + +function ComeDown_Terminate(ai, goal) + return +end + +function ComeDown_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/common_attack.lua b/scripts_decompiled/common_attack.lua new file mode 100644 index 0000000..b38b94f --- /dev/null +++ b/scripts_decompiled/common_attack.lua @@ -0,0 +1,18 @@ +REGISTER_GOAL(GOAL_COMMON_CommonAttack, "CommonAttack") +function CommonAttack_Activate(ai, goal) + return +end + +function CommonAttack_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function CommonAttack_Terminate(ai, goal) + return +end + +function CommonAttack_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/continue_attack.lua b/scripts_decompiled/continue_attack.lua new file mode 100644 index 0000000..6702313 --- /dev/null +++ b/scripts_decompiled/continue_attack.lua @@ -0,0 +1,43 @@ +REGISTER_GOAL(GOAL_COMMON_ContinueAttack, "ContinueAttack") +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ContinueAttack, 0, "EzState”ԍ†", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ContinueAttack, 1, "�UŒ‚‘ΏہyType�z", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ContinueAttack, 2, "�¬Œ÷‹——£�y‚��z", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_ContinueAttack, 3, "–½’†‚µ‚½‚琬Œ÷�H", 0) +function ContinueAttack_Activate(ai, goal) + local behaviorNo = goal:GetParam(0) + local target = goal:GetParam(1) + ai:TurnTo(target) + ai:SetAttackRequest(behaviorNo) + goal:AddGoalScopedTeamRecord(COORDINATE_TYPE_Attack, target, 0) + return +end + +function ContinueAttack_Update(ai, goal) + local behaviorNo = goal:GetParam(0) + local target = goal:GetParam(1) + local distType = goal:GetParam(2) + local successType = goal:GetParam(3) + local targetDist = ai:GetDist(target) + if distType <= targetDist then + return GOAL_RESULT_Failed + elseif goal:GetLife() <= 0 then + return GOAL_RESULT_Success + elseif successType == true and ai:IsHitAttack() == true then + return GOAL_RESULT_Success + else + ai:TurnTo(target) + ai:SetAttackRequest(behaviorNo) + return GOAL_RESULT_Continue + end +end + +function ContinueAttack_Terminate(ai, goal) + return +end + +REGISTER_GOAL_NO_INTERUPT(GOAL_COMMON_ContinueAttack, true) +function ContinueAttack_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/door_act.lua b/scripts_decompiled/door_act.lua new file mode 100644 index 0000000..e21e250 --- /dev/null +++ b/scripts_decompiled/door_act.lua @@ -0,0 +1,28 @@ +REGISTER_GOAL(GOAL_COMMON_DoorAct, "DoorAct") +REGISTER_GOAL_UPDATE_TIME(GOAL_COMMON_DoorAct, 0.2, 0.3) +function DoorAct_Activate(ai, goal) + ai:PrintText("[DoorAct_Activate]Notice ObjAct") + ai:SetAllowTriggerNearObjAct() + return +end + +function DoorAct_Update(ai, goal) + local isExistReqObjAct = ai:IsExistReqObjAct() + local hasObjActGoal = ai:HasGoal(GOAL_COMMON_ObjActTest) + if isExistReqObjAct and hasObjActGoal == false then + goal:AddSubGoal(GOAL_COMMON_ObjActTest, 10, OBJ_ACT_TYPE_DOOR) + end + goal:AddLifeParentSubGoal(0.3) + return GOAL_RESULT_Continue +end + +function DoorAct_Terminate(ai, goal) + return +end + +REGISTER_GOAL_NO_INTERUPT(GOAL_COMMON_DoorAct, true) +function DoorAct_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/fall.lua b/scripts_decompiled/fall.lua new file mode 100644 index 0000000..681906a --- /dev/null +++ b/scripts_decompiled/fall.lua @@ -0,0 +1,39 @@ +REGISTER_GOAL(GOAL_COMMON_Fall, "Fall") +REGISTER_GOAL_UPDATE_TIME(GOAL_COMMON_Fall, 0.1, 0.2) +REGISTER_GOAL_NO_INTERUPT(GOAL_COMMON_Fall, true) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_Fall, 0, "ƒ^�[ƒQƒbƒg�yType�z", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_Fall, 1, "—މºŠJŽnEzState”ԍ†", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_Fall, 2, "—މº’âŽ~EzState”ԍ†", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_Fall, 3, "—މº’âŽ~ƒ}�[ƒWƒ“[m]", 0) +function Fall_Activate(ai, goal) + local target = goal:GetParam(0) + local ezFallID = goal:GetParam(1) + local height_dist = ai:GetDistYSigned(target) + if height_dist <= 0 then + ai:SetAttackRequest(ezFallID) + end + return +end + +function Fall_Update(ai, goal) + local target = goal:GetParam(0) + local ezFallID = goal:GetParam(1) + local margin = goal:GetParam(3) + local height_dist = ai:GetDistYSigned(target) + if margin < height_dist then + return GOAL_RESULT_Success + end + ai:SetAttackRequest(ezFallID) +end + +function Fall_Terminate(ai, goal) + local ezStopID = goal:GetParam(2) + ai:SetAttackRequest(ezStopID) + return +end + +function Fall_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/if.lua b/scripts_decompiled/if.lua new file mode 100644 index 0000000..beed33d --- /dev/null +++ b/scripts_decompiled/if.lua @@ -0,0 +1,44 @@ +REGISTER_GOAL(GOAL_COMMON_If, "If") +REGISTER_GOAL_UPDATE_TIME(GOAL_COMMON_If, 0.5, 1) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_If, 1, "ޝ•ʗpƒR�[ƒhNo", 0) +function If_Activate(ai, goal) + local battleId = goal:GetBattleGoalId() + local codeNo = goal:GetParam(0) + local funcName = "OnIf_" + function _loadstring(str) + local f, err = loadstring("return function (arg) " .. str .. " end", str) + if f then + return f() + else + return f, err + end + end + + local f = _loadstring(funcName .. battleId .. "(arg.ai, arg.goal, arg.codeNo)") + local local0 = {} + local0["ai"] = ai + local0["goal"] = goal + local0["codeNo"] = codeNo + class = local0 + f(class) + return +end + +function If_Update(ai, goal) + if goal:GetSubGoalNum() <= 0 then + return GOAL_RESULT_Success + else + return GOAL_RESULT_Continue + end +end + +function If_Terminate(ai, goal) + return +end + +REGISTER_GOAL_NO_INTERUPT(GOAL_COMMON_If, true) +function If_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/ladder_act.lua b/scripts_decompiled/ladder_act.lua new file mode 100644 index 0000000..1970b10 --- /dev/null +++ b/scripts_decompiled/ladder_act.lua @@ -0,0 +1,124 @@ +REGISTER_GOAL(GOAL_COMMON_LadderAct, "LadderAct") +function _GetId(animId, ai) + local isPlayerType = false + if not not ai:IsNpcPlayer() or ai:IsLocalPlayer() then + isPlayerType = true + end + local ret = animId + if isPlayerType == true then + if animId == 7210 then + ret = NPC_ATK_Ladder_10 + elseif animId == 7211 then + ret = NPC_ATK_Ladder_11 + elseif animId == 7212 then + ret = NPC_ATK_Ladder_12 + elseif animId == 7213 then + ret = NPC_ATK_Ladder_13 + elseif animId == 7220 then + ret = NPC_ATK_Ladder_20 + elseif animId == 7221 then + ret = NPC_ATK_Ladder_21 + elseif animId == 7222 then + ret = NPC_ATK_Ladder_22 + elseif animId == 7223 then + ret = NPC_ATK_Ladder_23 + end + end + return ret +end + +local DEF_LADDER_ACT_STATE_InValid = -1 +local DEF_LADDER_ACT_STATE_BeginBottom = 0 +local DEF_LADDER_ACT_STATE_BeginTop = 1 +local DEF_LADDER_ACT_STATE_RightHandUp_Up = 2 +local DEF_LADDER_ACT_STATE_LeftHandUp_Up = 3 +local DEF_LADDER_ACT_STATE_RightHandUp_Down = 4 +local DEF_LADDER_ACT_STATE_LeftHandUp_Down = 5 +local DEF_LADDER_ACT_STATE_Exit_Up = 6 +local DEF_LADDER_ACT_STATE_Exit_Down = 7 +local DEF_LADDER_ACT_STATE_RightHandUp_Wait = 8 +local DEF_LADDER_ACT_STATE_LeftHandUp_Wait = 9 +local DEF_LADDER_ACT_STATE_StaminaFall = 23 +local DEF_LADDER_ACT_Up = 7210 +local DEF_LADDER_ACT_Down = 7220 +local DEF_LADDER_ACT_SlideDown = 7230 +function LadderAct_Activate(ai, goal) + local behaviorNo = goal:GetParam(0) + local target = goal:GetParam(1) + local initDirMove = goal:GetParam(2) + local ladderDirMove = initDirMove + local ladderActState = ai:GetLadderActState(TARGET_SELF) + local animStartId = 0 + local dmyStartId = ai:CalcGetNearestLadderActDmyIdByLadderObj() + if dmyStartId == 191 then + animStartId = _GetId(7210, ai) + else + animStartId = _GetId(7220, ai) + end + if ladderActState == DEF_LADDER_ACT_STATE_InValid then + if ai:IsChrAroundLadderEdge(2, dmyStartId) == false then + ai:SetPosAngBy1stNearObjDmyId(dmyStartId) + ai:SetAttackRequest(animStartId) + elseif dmyStartId ~= 192 and dmyStartId == 191 then + return GOAL_RESULT_Failed + end + end + return +end + +DEF_LADDER_ACT_STATE_InValid = DEF_LADDER_ACT_STATE_RightHandUp_Wait +DEF_LADDER_ACT_STATE_InValid = DEF_LADDER_ACT_STATE_LeftHandUp_Wait +DEF_LADDER_ACT_STATE_InValid = DEF_LADDER_ACT_Up +DEF_LADDER_ACT_STATE_InValid = DEF_LADDER_ACT_Down +DEF_LADDER_ACT_STATE_InValid = DEF_LADDER_ACT_STATE_StaminaFall +function LadderAct_Update(ai, goal) + local behaviorNo = goal:GetParam(0) + local target = goal:GetParam(1) + if ai:LastPathFindingIsFailed() == false and ai:HasPathResult() == false then + ai:FollowPath(target, AI_DIR_TYPE_CENTER, 1.5, true, 0) + end + local ladderDirMove = ai:GetLadderDirMove(TARGET_ENE_0) + ai:DoEzAction(0, -1) + local ladderActState = ai:GetLadderActState(TARGET_SELF) + local isPassNextAnim = false + if ladderActState == DEF_LADDER_ACT_STATE_RightHandUp_Wait or ladderActState == DEF_LADDER_ACT_STATE_LeftHandUp_Wait then + isPassNextAnim = true + elseif not not ai:IsFinishAttack() or ai:IsEnableComboAttack() then + isPassNextAnim = true + end + if isPassNextAnim then + if ladderActState == DEF_LADDER_ACT_STATE_InValid then + return GOAL_RESULT_Success + elseif ladderDirMove ~= 0 then + if ladderDirMove == 1 then + ai:SetAttackRequest(_GetId(DEF_LADDER_ACT_Up, ai)) + elseif ladderDirMove == -1 then + ai:SetAttackRequest(_GetId(DEF_LADDER_ACT_Down, ai)) + end + end + end + goal:AddLifeParentSubGoal(0.3) + local ladderActState = ai:GetLadderActState(TARGET_SELF) + if ladderActState == DEF_LADDER_ACT_STATE_InValid then + return GOAL_RESULT_Success + elseif ladderActState == DEF_LADDER_ACT_STATE_StaminaFall then + return GOAL_RESULT_Failed + else + return GOAL_RESULT_Continue + end +end + +function LadderAct_Terminate(ai, goal) + return +end + +REGISTER_GOAL_NO_INTERUPT(GOAL_COMMON_LadderAct, true) +function LadderAct_Interupt(ai, goal) + if ai:IsInterupt(INTERUPT_Damaged) then + return false + else + return false + end +end + +return diff --git a/scripts_decompiled/landing.lua b/scripts_decompiled/landing.lua new file mode 100644 index 0000000..78feff7 --- /dev/null +++ b/scripts_decompiled/landing.lua @@ -0,0 +1,123 @@ +REGISTER_GOAL(GOAL_COMMON_LiftOff, "LiftOff") +REGISTER_GOAL_NO_INTERUPT(GOAL_COMMON_LiftOff, true) +function LiftOff_Activate(ai, goal) + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 9520, TARGET_NONE, DIST_None) + return +end + +function LiftOff_Update(ai, goal) + local goalDistY = 5 + local curDistY = ai:GetDistY(TARGET_ENE_0) + local resultSubGoal = goal:GetLastSubGoalResult() + if (resultSubGoal == GOAL_RESULT_Success or resultSubGoal == GOAL_RESULT_Failed) and (not not ai:IsLanding() or curDistY < goalDistY) then + goal:AddSubGoal(GOAL_COMMON_Attack, 10, 9520, TARGET_NONE, DIST_None) + end + local isLanding = ai:IsLanding() + if not isLanding and goalDistY <= curDistY then + return GOAL_RESULT_Success + else + return GOAL_RESULT_Continue + end +end + +function LiftOff_Terminate(ai, goal) + return +end + +function LiftOff_Interupt(ai, goal) + return false +end + +REGISTER_GOAL(GOAL_COMMON_Landing, "Landing") +REGISTER_GOAL_NO_UPDATE(GOAL_COMMON_Landing, true) +REGISTER_GOAL_NO_INTERUPT(GOAL_COMMON_Landing, true) +function Landing_Activate(ai, goal) + local landingPoint = goal:GetParam(0) + ai:SetAIFixedMoveTarget(landingPoint, TARGET_SELF, 0) + local successRange = goal:GetParam(1) + goal:AddSubGoal(GOAL_COMMON_Landing_Move, 10, successRange) + if 0 < ai:GetDistYSigned(TARGET_ENE_0) then + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, POINT_AI_FIXED_POS, 0.1, TARGET_SELF, false, -1) + else + goal:AddSubGoal(GOAL_COMMON_Landing_Landing, 10) + end + return +end + +function Landing_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Landing_Terminate(ai, goal) + return +end + +function Landing_Interupt(ai, goal) + return false +end + +REGISTER_GOAL(GOAL_COMMON_Landing_Move, "Landing_Move") +REGISTER_GOAL_UPDATE_TIME(GOAL_COMMON_Landing_Move, 0.5, 0.5) +REGISTER_GOAL_NO_INTERUPT(GOAL_COMMON_Landing_Move, true) +function Landing_Move_Activate(ai, goal) + local successRange = goal:GetParam(0) + goal:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, POINT_AI_FIXED_POS, successRange, TARGET_SELF, false, -1) + return +end + +function Landing_Move_Update(ai, goal) + local distXZ = ai:GetDistXZ(POINT_AI_FIXED_POS) + if distXZ < 1 then + return GOAL_RESULT_Success + elseif ai:IsLanding() then + return GOAL_RESULT_Failed + else + return GOAL_RESULT_Continue + end +end + +function Landing_Move_Terminate(ai, goal) + return +end + +function Landing_Move_Interupt(ai, goal) + return false +end + +REGISTER_GOAL(GOAL_COMMON_Landing_Landing, "Landing_Landing") +REGISTER_GOAL_UPDATE_TIME(GOAL_COMMON_Landing_Landing, 0.5, 0.5) +REGISTER_GOAL_NO_INTERUPT(GOAL_COMMON_Landing_Landing, true) +function Landing_Landing_Activate(ai, goal) + goal:AddSubGoal(GOAL_COMMON_Attack, goal:GetLife(), 9510, TARGET_NONE, DIST_None) + return +end + +function Landing_Landing_Update(ai, goal) + if ai:IsLanding() then + local cnt = goal:GetNumber(0) + if 10 < cnt then + return GOAL_RESULT_Success + end + goal:SetNumber(0, cnt + 1) + end + local resultSubGoal = goal:GetLastSubGoalResult() + if (resultSubGoal == GOAL_RESULT_Success or resultSubGoal == GOAL_RESULT_Failed) and not ai:IsLanding() then + goal:AddSubGoal(GOAL_COMMON_Attack, goal:GetLife(), 9510, TARGET_NONE, DIST_None) + end + if 1 < ai:GetDistYSigned(POINT_AI_FIXED_POS) then + ai:PrintText("[Landing_Landing_Update]ƒ^�[ƒQƒbƒg‚æ‚荂‚³‚ª‰º‚ɂȂè‚܂µ‚½�Bޏ”s‚ð•Ԃµ‚܂·�B") + return GOAL_RESULT_Failed + else + return GOAL_RESULT_Continue + end +end + +function Landing_Landing_Terminate(ai, goal) + return +end + +function Landing_Landing_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/non_battle_act.lua b/scripts_decompiled/non_battle_act.lua new file mode 100644 index 0000000..bb196da --- /dev/null +++ b/scripts_decompiled/non_battle_act.lua @@ -0,0 +1,67 @@ +REGISTER_GOAL(GOAL_COMMON_NonBattleAct, "NonBattleAct") +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_NonBattleAct, 0, "“G‚ɔ½‰ž‚·‚鋗—£�ym�z", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_NonBattleAct, 1, "“G‚¢‚½‚ç�I—¹�H", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_NonBattleAct, 2, "‘–‚é�H", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_NonBattleAct, 3, "�ù‰ñ�yTYPE�z", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_NonBattleAct, 4, "‘ƒ‚̓ž’…‹——£�ym�z", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_NonBattleAct, 5, "‘ҋ@ŽžƒS�[ƒ‹", 0) +REGISTER_GOAL_UPDATE_TIME(GOAL_COMMON_NonBattleAct, 0.1, 0.2) +function NonBattleAct_Activate(ai, goal) + local movePointNo = ai:GetMovePointNumber() + if 0 <= movePointNo then + local isWalk = goal:GetParam(2) + if isWalk == 0 then + isWalk = true + else + isWalk = false + end + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, goal:GetLife(), POINT_MOVE_POINT, AI_DIR_TYPE_CENTER, 0, TARGET_SELF, isWalk) + else + local pointDist = ai:GetMovePointEffectRange() + local turn_tgt = goal:GetParam(3) + local arrive_dist = goal:GetParam(4) + if arrive_dist == 0 then + arrive_dist = 5 + end + if arrive_dist < pointDist then + local isEnableForceBattleGoal = goal:GetParam(6) + goal:AddSubGoal(GOAL_COMMON_BackToHome, goal:GetLife(), 0, isEnableForceBattleGoal, 0, 0) + elseif goal:IsExistParam(5) then + local wait_goalID = goal:GetParam(5) + if 0 < wait_goalID then + goal:AddSubGoal(wait_goalID, goal:GetLife()) + else + goal:AddSubGoal(GOAL_COMMON_Stay, goal:GetLife(), 0, turn_tgt) + end + else + goal:AddSubGoal(GOAL_COMMON_Stay, goal:GetLife(), 0, turn_tgt) + end + end + return +end + +function NonBattleAct_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function NonBattleAct_Terminate(ai, goal) + return +end + +function NonBattleAct_Interupt(ai, goal) + local isDamaged = false + if not isDamaged then + isDamaged = ai:IsInterupt(INTERUPT_Damaged_Stranger) + end + if not isDamaged then + isDamaged = ai:IsInterupt(INTERUPT_Damaged) + end + if isDamaged then + goal:SetTimer(1, 99999) + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/nonspinning_attack.lua b/scripts_decompiled/nonspinning_attack.lua new file mode 100644 index 0000000..0567119 --- /dev/null +++ b/scripts_decompiled/nonspinning_attack.lua @@ -0,0 +1,39 @@ +REGISTER_GOAL(GOAL_COMMON_NonspinningAttack, "NonspinningAttack") +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_NonspinningAttack, 0, "EzState”ԍ†", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_NonspinningAttack, 1, "�UŒ‚‘ΏہyType�z", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_NonspinningAttack, 2, "�¬Œ÷‹——£�yType�z", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_NonspinningAttack, 3, "�ã�UŒ‚Šp“x", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_NonspinningAttack, 4, "‰º�UŒ‚Šp“x", 0) +REGISTER_GOAL_NO_UPDATE(GOAL_COMMON_NonspinningAttack, 1) +function NonspinningAttack_Activate(ai, goal) + local life = goal:GetLife() + local behaviorNo = goal:GetParam(0) + local attackTarget = goal:GetParam(1) + local distType = goal:GetParam(2) + local successAngle = 180 + local turnTime = 0 + local turnFaceAngle = 180 + local isComboAttack = false + local isMoveCancel = true + local isGaurdBreakAtk = false + local isTurn = true + local angleUpAtt = goal:GetParam(3) + local angleDownAtt = goal:GetParam(4) + goal:AddSubGoal(GOAL_COMMON_CommonAttack, life, behaviorNo, attackTarget, distType, successAngle, turnTime, turnFaceAngle, isComboAttack, isMoveCancel, isGaurdBreakAtk, isTurn, angleUpAtt, angleDownAtt) + return +end + +function NonspinningAttack_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function NonspinningAttack_Terminate(ai, goal) + return +end + +REGISTER_GOAL_NO_INTERUPT(GOAL_COMMON_NonspinningAttack, true) +function NonspinningAttack_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/nonspinning_combo_attack.lua b/scripts_decompiled/nonspinning_combo_attack.lua new file mode 100644 index 0000000..f0f7a1f --- /dev/null +++ b/scripts_decompiled/nonspinning_combo_attack.lua @@ -0,0 +1,39 @@ +REGISTER_GOAL(GOAL_COMMON_NonspinningComboAttack, "NonspinningComboAttack") +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_NonspinningComboAttack, 0, "EzState”ԍ†", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_NonspinningComboAttack, 1, "�UŒ‚‘ΏہyType�z", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_NonspinningComboAttack, 2, "�¬Œ÷‹——£�yType�z", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_NonspinningComboAttack, 3, "�ã�UŒ‚Šp“x", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_NonspinningComboAttack, 4, "‰º�UŒ‚Šp“x", 0) +REGISTER_GOAL_NO_UPDATE(GOAL_COMMON_NonspinningComboAttack, 1) +function NonspinningComboAttack_Activate(ai, goal) + local life = goal:GetLife() + local behaviorNo = goal:GetParam(0) + local attackTarget = goal:GetParam(1) + local distType = goal:GetParam(2) + local successAngle = 180 + local turnTime = 0 + local turnFaceAngle = 180 + local isComboAttack = true + local isMoveCancel = true + local isGaurdBreakAtk = false + local isTurn = true + local angleUpAtt = goal:GetParam(3) + local angleDownAtt = goal:GetParam(4) + goal:AddSubGoal(GOAL_COMMON_CommonAttack, life, behaviorNo, attackTarget, distType, successAngle, turnTime, turnFaceAngle, isComboAttack, isMoveCancel, isGaurdBreakAtk, isTurn, angleUpAtt, angleDownAtt) + return +end + +function NonspinningComboAttack_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function NonspinningComboAttack_Terminate(ai, goal) + return +end + +REGISTER_GOAL_NO_INTERUPT(GOAL_COMMON_NonspinningComboAttack, true) +function NonspinningComboAttack_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/nonspinning_combo_final.lua b/scripts_decompiled/nonspinning_combo_final.lua new file mode 100644 index 0000000..4bf9eaa --- /dev/null +++ b/scripts_decompiled/nonspinning_combo_final.lua @@ -0,0 +1,40 @@ +REGISTER_GOAL(GOAL_COMMON_NonspinningComboFinal, "NonspinningComboFinal") +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_NonspinningComboFinal, 0, "EzState”ԍ†", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_NonspinningComboFinal, 1, "�UŒ‚‘ΏہyType�z", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_NonspinningComboFinal, 2, "�¬Œ÷‹——£�yType�z", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_NonspinningComboFinal, 3, "�ã�UŒ‚Šp“x", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_NonspinningComboFinal, 4, "‰º�UŒ‚Šp“x", 0) +REGISTER_GOAL_NO_UPDATE(GOAL_COMMON_NonspinningComboFinal, 1) +ENABLE_COMBO_ATK_CANCEL(GOAL_COMMON_NonspinningComboFinal) +function NonspinningComboFinal_Activate(ai, goal) + local life = goal:GetLife() + local behaviorNo = goal:GetParam(0) + local attackTarget = goal:GetParam(1) + local distType = goal:GetParam(2) + local successAngle = 180 + local turnTime = 0 + local turnFaceAngle = 180 + local isComboAttack = false + local isMoveCancel = true + local isGaurdBreakAtk = false + local isTurn = true + local angleUpAtt = goal:GetParam(3) + local angleDownAtt = goal:GetParam(4) + goal:AddSubGoal(GOAL_COMMON_CommonAttack, life, behaviorNo, attackTarget, distType, successAngle, turnTime, turnFaceAngle, isComboAttack, isMoveCancel, isGaurdBreakAtk, isTurn, angleUpAtt, angleDownAtt) + return +end + +function NonspinningComboFinal_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function NonspinningComboFinal_Terminate(ai, goal) + return +end + +REGISTER_GOAL_NO_INTERUPT(GOAL_COMMON_NonspinningComboFinal, true) +function NonspinningComboFinal_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/nonspinning_combo_repeat.lua b/scripts_decompiled/nonspinning_combo_repeat.lua new file mode 100644 index 0000000..b999ac5 --- /dev/null +++ b/scripts_decompiled/nonspinning_combo_repeat.lua @@ -0,0 +1,40 @@ +REGISTER_GOAL(GOAL_COMMON_NonspinningComboRepeat, "NonspinningComboRepeat") +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_NonspinningComboRepeat, 0, "EzState”ԍ†", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_NonspinningComboRepeat, 1, "�UŒ‚‘ΏہyType�z", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_NonspinningComboRepeat, 2, "�¬Œ÷‹——£�yType�z", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_NonspinningComboRepeat, 3, "�ã�UŒ‚Šp“x", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_NonspinningComboRepeat, 4, "‰º�UŒ‚Šp“x", 0) +REGISTER_GOAL_NO_UPDATE(GOAL_COMMON_NonspinningComboRepeat, 1) +ENABLE_COMBO_ATK_CANCEL(GOAL_COMMON_NonspinningComboRepeat) +function NonspinningComboRepeat_Activate(ai, goal) + local life = goal:GetLife() + local behaviorNo = goal:GetParam(0) + local attackTarget = goal:GetParam(1) + local distType = goal:GetParam(2) + local successAngle = 180 + local turnTime = 0 + local turnFaceAngle = 180 + local isComboAttack = true + local isMoveCancel = true + local isGaurdBreakAtk = false + local isTurn = true + local angleUpAtt = goal:GetParam(3) + local angleDownAtt = goal:GetParam(4) + goal:AddSubGoal(GOAL_COMMON_CommonAttack, life, behaviorNo, attackTarget, distType, successAngle, turnTime, turnFaceAngle, isComboAttack, isMoveCancel, isGaurdBreakAtk, isTurn, angleUpAtt, angleDownAtt) + return +end + +function NonspinningComboRepeat_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function NonspinningComboRepeat_Terminate(ai, goal) + return +end + +REGISTER_GOAL_NO_INTERUPT(GOAL_COMMON_NonspinningComboRepeat, true) +function NonspinningComboRepeat_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/normal.lua b/scripts_decompiled/normal.lua new file mode 100644 index 0000000..837ec7e --- /dev/null +++ b/scripts_decompiled/normal.lua @@ -0,0 +1,111 @@ +REGISTER_GOAL(GOAL_COMMON_Normal, "Normal") +REGISTER_GOAL_NO_UPDATE(GOAL_COMMON_Normal, 1) +function Normal_Activate(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local trigDistNear = 2 + local trigDistMid = 4 + local trigDistFar = 0 + local ezsNoNear = 3000 + local ezsNoMid = 3000 + local ezsNoFar = 3000 + local moveDistNear = 3 + local moveDistMid = 1 + local moveDistFar = 3 + local movePerNear = 20 + local movePerMid = 30 + local movePerFar = 40 + local maaiDistNear = 1.5 + local maaiDistMid = 3.5 + local maaiDistFar = 5.5 + local maaiPerNear = 40 + local maaiPerMid = 30 + local maaiPerFar = 20 + local attActDist = 6 + local trigDistDash = 0 + local trigDistWalk = 9 + local moveDistDash = 7 + local moveDistWalk = 3 + if targetDist <= attActDist then + if targetDist < trigDistNear then + if fate <= movePerNear then + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, 5, TARGET_ENE_0, AI_DIR_TYPE_CENTER, moveDistNear, TARGET_ENE_0, true) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, ezsNoNear, TARGET_ENE_0, DIST_Near, 0) + if fate2 <= maaiPerNear then + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, 5, TARGET_ENE_0, AI_DIR_TYPE_CENTER, maaiDistNear, TARGET_ENE_0, true) + end + end + elseif targetDist < trigDistMid then + if fate <= movePerMid then + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, 5, TARGET_ENE_0, AI_DIR_TYPE_CENTER, moveDistMid, TARGET_ENE_0, true) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, ezsNoMid, TARGET_ENE_0, DIST_Near, 0) + if fate2 <= maaiPerMid then + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, 5, TARGET_ENE_0, AI_DIR_TYPE_CENTER, maaiDistMid, TARGET_ENE_0, true) + end + end + elseif fate <= movePerFar then + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, 5, TARGET_ENE_0, AI_DIR_TYPE_CENTER, moveDistFar, TARGET_ENE_0, true) + else + goal:AddSubGoal(GOAL_COMMON_Attack, 10, ezsNoFar, TARGET_ENE_0, DIST_Near, 0) + if fate2 <= maaiPerFar then + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, 5, TARGET_ENE_0, AI_DIR_TYPE_CENTER, maaiDistFar, TARGET_ENE_0, true) + end + end + elseif targetDist <= trigDistWalk then + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, 10, TARGET_ENE_0, AI_DIR_TYPE_CENTER, moveDistWalk, TARGET_ENE_0, true) + else + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, 10, TARGET_ENE_0, AI_DIR_TYPE_CENTER, moveDistDash, TARGET_ENE_0, false) + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, 10, TARGET_ENE_0, AI_DIR_TYPE_CENTER, moveDistWalk, TARGET_ENE_0, true) + end + return +end + +function Normal_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Normal_Terminate(ai, goal) + return +end + +function Normal_Interupt(ai, goal) + local targetDist = ai:GetDist(TARGET_ENE_0) + local fate = ai:GetRandam_Int(1, 100) + local fate2 = ai:GetRandam_Int(1, 100) + local guardDist = 3 + local guardPer = 50 + local ezsNoguard = 9910 + local missContDist = 3 + local missContPer = 50 + local ezsNoMissCont = 3300 + local guardBreakAttDist = 3 + local guardBreakAttPer = 75 + local ezsNoguardBreakAtt = 3300 + local guardDownAttDist = 3 + local guardDownAttPer = 40 + local ezsNoguardDownAtt = 3000 + if ai:IsInterupt(INTERUPT_FindAttack) and targetDist <= guardDist and fate <= guardPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Guard, 5, ezsNoguard, TARGET_ENE_0, 0, 0) + return true + elseif ai:IsInterupt(INTERUPT_MissSwing) and targetDist < missContDist and fate <= missContPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Attack, 5, ezsNoMissCont, TARGET_ENE_0, DIST_Near, 0) + return true + elseif ai:IsInterupt(INTERUPT_GuardBreak) and targetDist < guardBreakAttDist and fate <= guardBreakAttPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Attack, 5, ezsNoguardBreakAtt, TARGET_ENE_0, DIST_Near, 0) + return true + elseif ai:IsInterupt(INTERUPT_GuardFinish) and targetDist < guardDownAttDist and fate <= guardDownAttPer then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_Attack, 5, ezsNoguardDownAtt, TARGET_ENE_0, DIST_Near, 0) + return true + else + return false + end +end + +return diff --git a/scripts_decompiled/pursuit.lua b/scripts_decompiled/pursuit.lua new file mode 100644 index 0000000..757a9eb --- /dev/null +++ b/scripts_decompiled/pursuit.lua @@ -0,0 +1,39 @@ +REGISTER_GOAL(GOAL_COMMON_Pursuit, "Pursuit") +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_Pursuit, 0, "EzStateID", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_Pursuit, 1, "�UŒ‚‘ΏÛ", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_Pursuit, 2, "�¬Œ÷‹——£", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_Pursuit, 3, "�ã�UŒ‚Šp“x", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_Pursuit, 4, "‰º�UŒ‚Šp“x", 0) +REGISTER_GOAL_NO_UPDATE(GOAL_COMMON_Pursuit, 1) +function Pursuit_Activate(ai, goal) + local life = goal:GetLife() + local behaviorNo = goal:GetParam(0) + local attackTarget = goal:GetParam(1) + local distType = goal:GetParam(2) + local successAngle = 180 + local turnTime = 0 + local turnFaceAngle = 90 + local isComboAttack = false + local isMoveCancel = true + local isGaurdBreakAtk = false + local isTurn = false + local angleUpAtt = goal:GetParam(3) + local angleDownAtt = goal:GetParam(4) + goal:AddSubGoal(GOAL_COMMON_CommonAttack, life, behaviorNo, attackTarget, distType, successAngle, turnTime, turnFaceAngle, isComboAttack, isMoveCancel, isGaurdBreakAtk, isTurn, angleUpAtt, angleDownAtt) + return +end + +function Pursuit_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Pursuit_Terminate(ai, goal) + return +end + +REGISTER_GOAL_NO_INTERUPT(GOAL_COMMON_Pursuit, true) +function Pursuit_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/team_call_help.lua b/scripts_decompiled/team_call_help.lua new file mode 100644 index 0000000..2ee5b8e --- /dev/null +++ b/scripts_decompiled/team_call_help.lua @@ -0,0 +1,40 @@ +REGISTER_GOAL(GOAL_COMMON_TeamCallHelp, "TeamCallHelp") +function TeamCallHelp_Activate(ai, goal) + local callActionId = ai:GetExcelParam(AI_EXCEL_THINK_PARAM_TYPE__callHelp_CallActionId) + local target = goal:GetParam(0) + ai:TeamHelp_ReserveCall() + ai:TurnTo(target) + if ai:IsLookToTarget() == true then + ai:SetAttackRequest(callActionId) + end + return +end + +function TeamCallHelp_Update(ai, goal) + local callActionId = ai:GetExcelParam(AI_EXCEL_THINK_PARAM_TYPE__callHelp_CallActionId) + local target = goal:GetParam(0) + if goal:GetLife() <= 0 then + return GOAL_RESULT_Success + elseif ai:IsFinishAttack() then + return GOAL_RESULT_Success + elseif ai:IsLookToTarget() == true then + if ai:IsStartAttack() == false then + ai:SetAttackRequest(callActionId) + end + else + ai:TurnTo(target) + end + return GOAL_RESULT_Continue +end + +function TeamCallHelp_Terminate(ai, goal) + ai:TeamHelp_Call() + return +end + +REGISTER_GOAL_NO_INTERUPT(GOAL_COMMON_TeamCallHelp, true) +function TeamCallHelp_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/team_reply_help.lua b/scripts_decompiled/team_reply_help.lua new file mode 100644 index 0000000..b26f8d3 --- /dev/null +++ b/scripts_decompiled/team_reply_help.lua @@ -0,0 +1,83 @@ +REGISTER_GOAL(GOAL_COMMON_TeamReplyHelp, "TeamReplyHelp") +function TeamReplyHelp_Activate(ai, goal) + local minWaitTime = ai:GetExcelParam(AI_EXCEL_THINK_PARAM_TYPE__callHelp_MinWaitTime) + local maxWaitTime = ai:GetExcelParam(AI_EXCEL_THINK_PARAM_TYPE__callHelp_MaxWaitTime) + local waitTime = ai:GetRandam_Float(minWaitTime, maxWaitTime) + goal:AddSubGoal(GOAL_COMMON_Wait, waitTime, TARGET_SELF) + ai:TeamHelp_Reply() + local replyAnimId = ai:GetExcelParam(AI_EXCEL_THINK_PARAM_TYPE__callHelp_ReplyActionId) + if replyAnimId ~= -1 then + goal:AddSubGoal(GOAL_COMMON_Attack, goal:GetLife(), replyAnimId, TARGET_FRI_0, DIST_None) + end + local BEHAVIOR_TYPE_Walk = 0 + local BEHAVIOR_TYPE_Run = 1 + local BEHAVIOR_TYPE_WalkWithHome = 2 + local BEHAVIOR_TYPE_RunWithHome = 3 + local BEHAVIOR_TYPE_FreeRun = 4 + local BEHAVIOR_TYPE_FreeRunWithHome = 5 + local BEHAVIOR_TYPE_WalkPos = 6 + local BEHAVIOR_TYPE_RunPos = 7 + local behaviorType = ai:GetExcelParam(AI_EXCEL_THINK_PARAM_TYPE__callHelp_ReplyBehaviorType) + if behaviorType == BEHAVIOR_TYPE_Walk then + local targetDist = ai:GetDist(TARGET_FRI_0) + if 3 < targetDist then + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, goal:GetLife(), TARGET_FRI_0, AI_DIR_TYPE_CENTER, 2.5, TARGET_SELF, true) + else + goal:AddSubGoal(GOAL_COMMON_Stay, goal:GetLife(), 0, TARGET_FRI_0) + end + elseif behaviorType == BEHAVIOR_TYPE_Run then + local targetDist = ai:GetDist(TARGET_FRI_0) + if 3 < targetDist then + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, goal:GetLife(), TARGET_FRI_0, AI_DIR_TYPE_CENTER, 2.5, TARGET_SELF, false) + else + goal:AddSubGoal(GOAL_COMMON_Stay, goal:GetLife(), 0, TARGET_FRI_0) + end + elseif behaviorType == BEHAVIOR_TYPE_WalkWithHome then + local targetDist = ai:GetDist(TARGET_FRI_0) + if 3 < targetDist then + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, goal:GetLife(), TARGET_FRI_0, AI_DIR_TYPE_CENTER, 2.5, TARGET_SELF, true) + else + goal:AddSubGoal(GOAL_COMMON_Stay, goal:GetLife(), 0, TARGET_FRI_0) + end + elseif behaviorType == BEHAVIOR_TYPE_RunWithHome then + local targetDist = ai:GetDist(TARGET_FRI_0) + if 3 < targetDist then + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, goal:GetLife(), TARGET_FRI_0, AI_DIR_TYPE_CENTER, 2.5, TARGET_SELF, false) + else + goal:AddSubGoal(GOAL_COMMON_Stay, goal:GetLife(), 0, TARGET_FRI_0) + end + elseif behaviorType ~= BEHAVIOR_TYPE_FreeRun and behaviorType ~= BEHAVIOR_TYPE_FreeRunWithHome then + if behaviorType == BEHAVIOR_TYPE_WalkPos then + local targetDist = ai:GetDist(POINT_AI_FIXED_POS) + if 2 < targetDist then + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, goal:GetLife(), POINT_AI_FIXED_POS, AI_DIR_TYPE_CENTER, 2.5, TARGET_SELF, false) + else + goal:AddSubGoal(GOAL_COMMON_Stay, goal:GetLife(), 0, POINT_AI_FIXED_POS) + end + elseif behaviorType == BEHAVIOR_TYPE_RunPos then + local targetDist = ai:GetDist(POINT_AI_FIXED_POS) + if 2 < targetDist then + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, goal:GetLife(), POINT_AI_FIXED_POS, AI_DIR_TYPE_CENTER, 2.5, TARGET_SELF, false) + else + goal:AddSubGoal(GOAL_COMMON_Stay, goal:GetLife(), 0, POINT_AI_FIXED_POS) + end + end + end + return +end + +REGISTER_GOAL_NO_UPDATE(GOAL_COMMON_TeamReplyHelp, 1) +function TeamReplyHelp_Update(ai, goal) + return +end + +function TeamReplyHelp_Terminate(ai, goal) + return +end + +REGISTER_GOAL_NO_INTERUPT(GOAL_COMMON_TeamReplyHelp, true) +function TeamReplyHelp_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/template.lua b/scripts_decompiled/template.lua new file mode 100644 index 0000000..8a4979b --- /dev/null +++ b/scripts_decompiled/template.lua @@ -0,0 +1,18 @@ +REGISTER_GOAL(GOAL_COMMON_Template, "Template") +function Template_Activate(ai, goal) + return +end + +function Template_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function Template_Terminate(ai, goal) + return +end + +function Template_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/top_goal.lua b/scripts_decompiled/top_goal.lua new file mode 100644 index 0000000..669824a --- /dev/null +++ b/scripts_decompiled/top_goal.lua @@ -0,0 +1,42 @@ +REGISTER_GOAL(GOAL_COMMON_TopGoal, "TopGoal") +REGISTER_GOAL_NO_UPDATE(GOAL_COMMON_TopGoal, 1) +function TopGoal_Activate(ai, goal) + return +end + +function TopGoal_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function TopGoal_Terminate(ai, goal) + return +end + +function TopGoal_Interupt(ai, goal) + if ai:IsInterupt(INTERUPT_CANNOT_MOVE) then + local idAction = ai:GetExcelParam(AI_EXCEL_THINK_PARAM_TYPE__CannotMoveAction) + if ai:IsTouchBreakableObject() and 0 <= idAction and ai:IsLookToTarget(POINT_CurrRequestPosition, 90) then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_NonspinningAttack, -1, idAction, TARGET_NONE, DIST_None) + return true + end + end + if ai:IsInterupt(INTERUPT_CANNOT_MOVE_DisableInterupt) then + local idAction = ai:GetExcelParam(AI_EXCEL_THINK_PARAM_TYPE__CannotMoveAction) + if ai:IsTouchBreakableObject() and 0 <= idAction and ai:IsLookToTarget(POINT_CurrRequestPosition, 90) then + goal:AddSubGoal_Front(GOAL_COMMON_NonspinningAttack, -1, idAction, TARGET_NONE, DIST_None) + return true + end + end + if ai:IsInterupt(INTERUPT_HitEnemyWall) then + local backhome_life = ai:GetExcelParam(AI_EXCEL_THINK_PARAM_TYPE__BackHomeLife_OnHitEnemyWall) + if 0 < backhome_life then + goal:ClearSubGoal() + goal:AddSubGoal(GOAL_COMMON_BackToHome, backhome_life, 0) + return true + end + end + return false +end + +return diff --git a/scripts_decompiled/turn.lua b/scripts_decompiled/turn.lua new file mode 100644 index 0000000..ba2ff9d --- /dev/null +++ b/scripts_decompiled/turn.lua @@ -0,0 +1,32 @@ +REGISTER_GOAL(GOAL_COMMON_Turn, "Turn") +REGISTER_GOAL_UPDATE_TIME(GOAL_COMMON_Turn, 0.2, 0.5) +REGISTER_GOAL_NO_INTERUPT(GOAL_COMMON_Turn, true) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_Turn, 0, "�ù‰ñƒ^�[ƒQƒbƒg", 0) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_Turn, 1, "�³–ʔ»’èŠp“x", 0) +function Turn_Update(ai, goal) + local turnTarget = goal:GetParam(0) + local angle_range = goal:GetParam(1) + if angle_range <= 0 then + angle_range = 10 + end + ai:TurnTo(turnTarget) + if ai:IsLookToTarget(angle_range) == true then + return GOAL_RESULT_Success + else + return GOAL_RESULT_Continue + end +end + +function Turn_Activate(ai, goal) + return +end + +function Turn_Terminate(ai, goal) + return +end + +function Turn_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/use_item.lua b/scripts_decompiled/use_item.lua new file mode 100644 index 0000000..ab4df64 --- /dev/null +++ b/scripts_decompiled/use_item.lua @@ -0,0 +1,24 @@ +REGISTER_GOAL(GOAL_COMMON_UseItem, "UseItem") +REGISTER_GOAL_NO_UPDATE(GOAL_COMMON_UseItem, true) +REGISTER_GOAL_NO_INTERUPT(GOAL_COMMON_UseItem, true) +REGISTER_DBG_GOAL_PARAM(GOAL_COMMON_UseItem, 0, "ƒAƒCƒeƒ€ƒCƒ“ƒfƒbƒNƒX", 0) +function UseItem_Activate(ai, goal) + local item_index = goal:GetParam(0) + ai:ChangeEquipItem(item_index) + goal:AddSubGoal(GOAL_COMMON_Attack, 5, NPC_ATK_Item, TARGET_NONE, DIST_None) + return +end + +function UseItem_Update(ai, goal) + return GOAL_RESULT_Continue +end + +function UseItem_Terminate(ai, goal) + return +end + +function UseItem_Interupt(ai, goal) + return false +end + +return diff --git a/scripts_decompiled/walk_around.lua b/scripts_decompiled/walk_around.lua new file mode 100644 index 0000000..1d4f12c --- /dev/null +++ b/scripts_decompiled/walk_around.lua @@ -0,0 +1,39 @@ +REGISTER_GOAL(GOAL_COMMON_WalkAround, "WalkAround") +function WalkAround_Activate(ai, goal) + local attackDist = goal:GetParam(0) + local turnDir = ai:GetRandam_Int(0, 1) + local dist = 1.5 + local walk = 1 + local life = 10 + if turnDir == 0 then + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, life, POINT_INITIAL, AI_DIR_TYPE_F, dist, TARGET_SELF, walk) + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, life, POINT_INITIAL, AI_DIR_TYPE_R, dist, TARGET_SELF, walk) + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, life, POINT_INITIAL, AI_DIR_TYPE_B, dist, TARGET_SELF, walk) + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, life, POINT_INITIAL, AI_DIR_TYPE_L, dist, TARGET_SELF, walk) + else + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, life, POINT_INITIAL, AI_DIR_TYPE_B, dist, TARGET_SELF, walk) + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, life, POINT_INITIAL, AI_DIR_TYPE_L, dist, TARGET_SELF, walk) + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, life, POINT_INITIAL, AI_DIR_TYPE_F, dist, TARGET_SELF, walk) + goal:AddSubGoal(GOAL_COMMON_MoveToSomewhere, life, POINT_INITIAL, AI_DIR_TYPE_R, dist, TARGET_SELF, walk) + end + return +end + +function WalkAround_Update(ai, goal) + local attackDist = goal:GetParam(0) + if ai:IsSearchTarget(TARGET_ENE_0) == true and ai:GetDist(TARGET_ENE_0) < attackDist then + return GOAL_RESULT_Failed + else + return GOAL_RESULT_Continue + end +end + +function WalkAround_Terminate(ai, goal) + return +end + +function WalkAround_Interupt(ai, goal) + return false +end + +return