diff --git a/1.txt b/1.txt deleted file mode 100644 index e69de29..0000000 diff --git a/audio/bgm/2000_Blackmarket.m4a b/audio/bgm/2000_Blackmarket.m4a new file mode 100644 index 0000000..a8ca90c Binary files /dev/null and b/audio/bgm/2000_Blackmarket.m4a differ diff --git a/audio/bgm/2000_Blackmarket.ogg b/audio/bgm/2000_Blackmarket.ogg new file mode 100644 index 0000000..6cbdf03 Binary files /dev/null and b/audio/bgm/2000_Blackmarket.ogg differ diff --git a/audio/bgm/2000_Ending3.m4a b/audio/bgm/2000_Ending3.m4a new file mode 100644 index 0000000..e43cc8a Binary files /dev/null and b/audio/bgm/2000_Ending3.m4a differ diff --git a/audio/bgm/2000_Ending3.ogg b/audio/bgm/2000_Ending3.ogg new file mode 100644 index 0000000..dc04aac Binary files /dev/null and b/audio/bgm/2000_Ending3.ogg differ diff --git a/audio/bgm/2000_Fairy2.m4a b/audio/bgm/2000_Fairy2.m4a new file mode 100644 index 0000000..811d107 Binary files /dev/null and b/audio/bgm/2000_Fairy2.m4a differ diff --git a/audio/bgm/2000_Fairy2.ogg b/audio/bgm/2000_Fairy2.ogg new file mode 100644 index 0000000..5083b04 Binary files /dev/null and b/audio/bgm/2000_Fairy2.ogg differ diff --git a/audio/bgm/2000_Field4.m4a b/audio/bgm/2000_Field4.m4a new file mode 100644 index 0000000..5ff0e9c Binary files /dev/null and b/audio/bgm/2000_Field4.m4a differ diff --git a/audio/bgm/2000_Field4.ogg b/audio/bgm/2000_Field4.ogg new file mode 100644 index 0000000..702980d Binary files /dev/null and b/audio/bgm/2000_Field4.ogg differ diff --git a/audio/bgm/2000_Game over3.m4a b/audio/bgm/2000_Game over3.m4a new file mode 100644 index 0000000..53ce4ec Binary files /dev/null and b/audio/bgm/2000_Game over3.m4a differ diff --git a/audio/bgm/2000_Game over3.ogg b/audio/bgm/2000_Game over3.ogg new file mode 100644 index 0000000..acb73e7 Binary files /dev/null and b/audio/bgm/2000_Game over3.ogg differ diff --git a/audio/bgm/2000_Opening1.m4a b/audio/bgm/2000_Opening1.m4a new file mode 100644 index 0000000..788f0e1 Binary files /dev/null and b/audio/bgm/2000_Opening1.m4a differ diff --git a/audio/bgm/2000_Opening1.ogg b/audio/bgm/2000_Opening1.ogg new file mode 100644 index 0000000..2e75fbb Binary files /dev/null and b/audio/bgm/2000_Opening1.ogg differ diff --git a/audio/bgm/2000_Shop3.m4a b/audio/bgm/2000_Shop3.m4a new file mode 100644 index 0000000..adb06cf Binary files /dev/null and b/audio/bgm/2000_Shop3.m4a differ diff --git a/audio/bgm/2000_Shop3.ogg b/audio/bgm/2000_Shop3.ogg new file mode 100644 index 0000000..52847ec Binary files /dev/null and b/audio/bgm/2000_Shop3.ogg differ diff --git a/audio/bgm/2000_Town1.m4a b/audio/bgm/2000_Town1.m4a new file mode 100644 index 0000000..e8d8805 Binary files /dev/null and b/audio/bgm/2000_Town1.m4a differ diff --git a/audio/bgm/2000_Town1.ogg b/audio/bgm/2000_Town1.ogg new file mode 100644 index 0000000..83fe3a3 Binary files /dev/null and b/audio/bgm/2000_Town1.ogg differ diff --git a/audio/bgm/2000_Village1.m4a b/audio/bgm/2000_Village1.m4a new file mode 100644 index 0000000..f8de888 Binary files /dev/null and b/audio/bgm/2000_Village1.m4a differ diff --git a/audio/bgm/2000_Village1.ogg b/audio/bgm/2000_Village1.ogg new file mode 100644 index 0000000..de00bca Binary files /dev/null and b/audio/bgm/2000_Village1.ogg differ diff --git a/audio/bgm/2000_Village2.m4a b/audio/bgm/2000_Village2.m4a new file mode 100644 index 0000000..f720ed6 Binary files /dev/null and b/audio/bgm/2000_Village2.m4a differ diff --git a/audio/bgm/2000_Village2.ogg b/audio/bgm/2000_Village2.ogg new file mode 100644 index 0000000..a867b98 Binary files /dev/null and b/audio/bgm/2000_Village2.ogg differ diff --git a/audio/se/Battle4_A.m4a b/audio/se/Battle4_A.m4a new file mode 100644 index 0000000..0afc269 Binary files /dev/null and b/audio/se/Battle4_A.m4a differ diff --git a/audio/se/Battle4_A.ogg b/audio/se/Battle4_A.ogg new file mode 100644 index 0000000..9b90a7e Binary files /dev/null and b/audio/se/Battle4_A.ogg differ diff --git a/audio/se/Battle4_B.m4a b/audio/se/Battle4_B.m4a new file mode 100644 index 0000000..1bdc873 Binary files /dev/null and b/audio/se/Battle4_B.m4a differ diff --git a/audio/se/Battle4_B.ogg b/audio/se/Battle4_B.ogg new file mode 100644 index 0000000..f3dce26 Binary files /dev/null and b/audio/se/Battle4_B.ogg differ diff --git a/audio/se/Battle5_A.m4a b/audio/se/Battle5_A.m4a new file mode 100644 index 0000000..55b2099 Binary files /dev/null and b/audio/se/Battle5_A.m4a differ diff --git a/audio/se/Battle5_A.ogg b/audio/se/Battle5_A.ogg new file mode 100644 index 0000000..12f08c1 Binary files /dev/null and b/audio/se/Battle5_A.ogg differ diff --git a/audio/se/Battle5_B.m4a b/audio/se/Battle5_B.m4a new file mode 100644 index 0000000..6ff2cd0 Binary files /dev/null and b/audio/se/Battle5_B.m4a differ diff --git a/audio/se/Battle5_B.ogg b/audio/se/Battle5_B.ogg new file mode 100644 index 0000000..6ca4c27 Binary files /dev/null and b/audio/se/Battle5_B.ogg differ diff --git a/audio/se/Battle6_A.m4a b/audio/se/Battle6_A.m4a new file mode 100644 index 0000000..87a92da Binary files /dev/null and b/audio/se/Battle6_A.m4a differ diff --git a/audio/se/Battle6_A.ogg b/audio/se/Battle6_A.ogg new file mode 100644 index 0000000..426399d Binary files /dev/null and b/audio/se/Battle6_A.ogg differ diff --git a/audio/se/Battle6_B.m4a b/audio/se/Battle6_B.m4a new file mode 100644 index 0000000..0d11669 Binary files /dev/null and b/audio/se/Battle6_B.m4a differ diff --git a/audio/se/Battle6_B.ogg b/audio/se/Battle6_B.ogg new file mode 100644 index 0000000..5fcfd54 Binary files /dev/null and b/audio/se/Battle6_B.ogg differ diff --git a/audio/se/Chain_A.m4a b/audio/se/Chain_A.m4a new file mode 100644 index 0000000..416ff47 Binary files /dev/null and b/audio/se/Chain_A.m4a differ diff --git a/audio/se/Chain_A.ogg b/audio/se/Chain_A.ogg new file mode 100644 index 0000000..2f84650 Binary files /dev/null and b/audio/se/Chain_A.ogg differ diff --git a/audio/se/Chain_B.m4a b/audio/se/Chain_B.m4a new file mode 100644 index 0000000..fe1a61a Binary files /dev/null and b/audio/se/Chain_B.m4a differ diff --git a/audio/se/Chain_B.ogg b/audio/se/Chain_B.ogg new file mode 100644 index 0000000..463d96a Binary files /dev/null and b/audio/se/Chain_B.ogg differ diff --git a/audio/se/Explosion8_A.m4a b/audio/se/Explosion8_A.m4a new file mode 100644 index 0000000..9806f7b Binary files /dev/null and b/audio/se/Explosion8_A.m4a differ diff --git a/audio/se/Explosion8_A.ogg b/audio/se/Explosion8_A.ogg new file mode 100644 index 0000000..0936c27 Binary files /dev/null and b/audio/se/Explosion8_A.ogg differ diff --git a/audio/se/Explosion8_B.m4a b/audio/se/Explosion8_B.m4a new file mode 100644 index 0000000..1beb81a Binary files /dev/null and b/audio/se/Explosion8_B.m4a differ diff --git a/audio/se/Explosion8_B.ogg b/audio/se/Explosion8_B.ogg new file mode 100644 index 0000000..ac1e065 Binary files /dev/null and b/audio/se/Explosion8_B.ogg differ diff --git a/audio/se/Fire10_A.m4a b/audio/se/Fire10_A.m4a new file mode 100644 index 0000000..d2df333 Binary files /dev/null and b/audio/se/Fire10_A.m4a differ diff --git a/audio/se/Fire10_A.ogg b/audio/se/Fire10_A.ogg new file mode 100644 index 0000000..0ce4459 Binary files /dev/null and b/audio/se/Fire10_A.ogg differ diff --git a/audio/se/Fire10_B.m4a b/audio/se/Fire10_B.m4a new file mode 100644 index 0000000..07d3a62 Binary files /dev/null and b/audio/se/Fire10_B.m4a differ diff --git a/audio/se/Fire10_B.ogg b/audio/se/Fire10_B.ogg new file mode 100644 index 0000000..c038451 Binary files /dev/null and b/audio/se/Fire10_B.ogg differ diff --git a/audio/se/Heal8_A.m4a b/audio/se/Heal8_A.m4a new file mode 100644 index 0000000..67a6062 Binary files /dev/null and b/audio/se/Heal8_A.m4a differ diff --git a/audio/se/Heal8_A.ogg b/audio/se/Heal8_A.ogg new file mode 100644 index 0000000..eef48b5 Binary files /dev/null and b/audio/se/Heal8_A.ogg differ diff --git a/audio/se/Heal8_B.m4a b/audio/se/Heal8_B.m4a new file mode 100644 index 0000000..3c6e15f Binary files /dev/null and b/audio/se/Heal8_B.m4a differ diff --git a/audio/se/Heal8_B.ogg b/audio/se/Heal8_B.ogg new file mode 100644 index 0000000..6bdc535 Binary files /dev/null and b/audio/se/Heal8_B.ogg differ diff --git a/audio/se/Ice12_A.m4a b/audio/se/Ice12_A.m4a new file mode 100644 index 0000000..ff6d243 Binary files /dev/null and b/audio/se/Ice12_A.m4a differ diff --git a/audio/se/Ice12_A.ogg b/audio/se/Ice12_A.ogg new file mode 100644 index 0000000..2dfafcc Binary files /dev/null and b/audio/se/Ice12_A.ogg differ diff --git a/audio/se/Ice12_B.m4a b/audio/se/Ice12_B.m4a new file mode 100644 index 0000000..ccea04c Binary files /dev/null and b/audio/se/Ice12_B.m4a differ diff --git a/audio/se/Ice12_B.ogg b/audio/se/Ice12_B.ogg new file mode 100644 index 0000000..dc61d07 Binary files /dev/null and b/audio/se/Ice12_B.ogg differ diff --git a/audio/se/Magic10_A.m4a b/audio/se/Magic10_A.m4a new file mode 100644 index 0000000..ee95f14 Binary files /dev/null and b/audio/se/Magic10_A.m4a differ diff --git a/audio/se/Magic10_A.ogg b/audio/se/Magic10_A.ogg new file mode 100644 index 0000000..3fc3a64 Binary files /dev/null and b/audio/se/Magic10_A.ogg differ diff --git a/audio/se/Magic10_B.m4a b/audio/se/Magic10_B.m4a new file mode 100644 index 0000000..ab1f1a9 Binary files /dev/null and b/audio/se/Magic10_B.m4a differ diff --git a/audio/se/Magic10_B.ogg b/audio/se/Magic10_B.ogg new file mode 100644 index 0000000..adb48cd Binary files /dev/null and b/audio/se/Magic10_B.ogg differ diff --git a/audio/se/Magic11_A.m4a b/audio/se/Magic11_A.m4a new file mode 100644 index 0000000..d018134 Binary files /dev/null and b/audio/se/Magic11_A.m4a differ diff --git a/audio/se/Magic11_A.ogg b/audio/se/Magic11_A.ogg new file mode 100644 index 0000000..bf8eadf Binary files /dev/null and b/audio/se/Magic11_A.ogg differ diff --git a/audio/se/Magic11_B.m4a b/audio/se/Magic11_B.m4a new file mode 100644 index 0000000..a022115 Binary files /dev/null and b/audio/se/Magic11_B.m4a differ diff --git a/audio/se/Magic11_B.ogg b/audio/se/Magic11_B.ogg new file mode 100644 index 0000000..d22efba Binary files /dev/null and b/audio/se/Magic11_B.ogg differ diff --git a/audio/se/Magic12_A.m4a b/audio/se/Magic12_A.m4a new file mode 100644 index 0000000..0b3b87d Binary files /dev/null and b/audio/se/Magic12_A.m4a differ diff --git a/audio/se/Magic12_A.ogg b/audio/se/Magic12_A.ogg new file mode 100644 index 0000000..1f2cb87 Binary files /dev/null and b/audio/se/Magic12_A.ogg differ diff --git a/audio/se/Magic12_B.m4a b/audio/se/Magic12_B.m4a new file mode 100644 index 0000000..f610f69 Binary files /dev/null and b/audio/se/Magic12_B.m4a differ diff --git a/audio/se/Magic12_B.ogg b/audio/se/Magic12_B.ogg new file mode 100644 index 0000000..1def689 Binary files /dev/null and b/audio/se/Magic12_B.ogg differ diff --git a/audio/se/Magic13_A.m4a b/audio/se/Magic13_A.m4a new file mode 100644 index 0000000..6d25b96 Binary files /dev/null and b/audio/se/Magic13_A.m4a differ diff --git a/audio/se/Magic13_A.ogg b/audio/se/Magic13_A.ogg new file mode 100644 index 0000000..d157ed0 Binary files /dev/null and b/audio/se/Magic13_A.ogg differ diff --git a/audio/se/Magic13_B.m4a b/audio/se/Magic13_B.m4a new file mode 100644 index 0000000..23724a7 Binary files /dev/null and b/audio/se/Magic13_B.m4a differ diff --git a/audio/se/Magic13_B.ogg b/audio/se/Magic13_B.ogg new file mode 100644 index 0000000..0842f59 Binary files /dev/null and b/audio/se/Magic13_B.ogg differ diff --git a/audio/se/Magic8_A.m4a b/audio/se/Magic8_A.m4a new file mode 100644 index 0000000..ecf3501 Binary files /dev/null and b/audio/se/Magic8_A.m4a differ diff --git a/audio/se/Magic8_A.ogg b/audio/se/Magic8_A.ogg new file mode 100644 index 0000000..18dacb3 Binary files /dev/null and b/audio/se/Magic8_A.ogg differ diff --git a/audio/se/Magic8_B.m4a b/audio/se/Magic8_B.m4a new file mode 100644 index 0000000..8275324 Binary files /dev/null and b/audio/se/Magic8_B.m4a differ diff --git a/audio/se/Magic8_B.ogg b/audio/se/Magic8_B.ogg new file mode 100644 index 0000000..4dc4aa9 Binary files /dev/null and b/audio/se/Magic8_B.ogg differ diff --git a/audio/se/Magic9_A.m4a b/audio/se/Magic9_A.m4a new file mode 100644 index 0000000..b2e1242 Binary files /dev/null and b/audio/se/Magic9_A.m4a differ diff --git a/audio/se/Magic9_A.ogg b/audio/se/Magic9_A.ogg new file mode 100644 index 0000000..5de41f2 Binary files /dev/null and b/audio/se/Magic9_A.ogg differ diff --git a/audio/se/Magic9_B.m4a b/audio/se/Magic9_B.m4a new file mode 100644 index 0000000..dd8ac10 Binary files /dev/null and b/audio/se/Magic9_B.m4a differ diff --git a/audio/se/Magic9_B.ogg b/audio/se/Magic9_B.ogg new file mode 100644 index 0000000..7e6f9fb Binary files /dev/null and b/audio/se/Magic9_B.ogg differ diff --git a/audio/se/Monster10_A.m4a b/audio/se/Monster10_A.m4a new file mode 100644 index 0000000..f72cad7 Binary files /dev/null and b/audio/se/Monster10_A.m4a differ diff --git a/audio/se/Monster10_A.ogg b/audio/se/Monster10_A.ogg new file mode 100644 index 0000000..9cb73a2 Binary files /dev/null and b/audio/se/Monster10_A.ogg differ diff --git a/audio/se/Monster10_B.m4a b/audio/se/Monster10_B.m4a new file mode 100644 index 0000000..c887177 Binary files /dev/null and b/audio/se/Monster10_B.m4a differ diff --git a/audio/se/Monster10_B.ogg b/audio/se/Monster10_B.ogg new file mode 100644 index 0000000..f361595 Binary files /dev/null and b/audio/se/Monster10_B.ogg differ diff --git a/audio/se/Monster8_A.m4a b/audio/se/Monster8_A.m4a new file mode 100644 index 0000000..3181437 Binary files /dev/null and b/audio/se/Monster8_A.m4a differ diff --git a/audio/se/Monster8_A.ogg b/audio/se/Monster8_A.ogg new file mode 100644 index 0000000..dc7a1af Binary files /dev/null and b/audio/se/Monster8_A.ogg differ diff --git a/audio/se/Monster8_B.m4a b/audio/se/Monster8_B.m4a new file mode 100644 index 0000000..df29316 Binary files /dev/null and b/audio/se/Monster8_B.m4a differ diff --git a/audio/se/Monster8_B.ogg b/audio/se/Monster8_B.ogg new file mode 100644 index 0000000..0328126 Binary files /dev/null and b/audio/se/Monster8_B.ogg differ diff --git a/audio/se/Monster9_A.m4a b/audio/se/Monster9_A.m4a new file mode 100644 index 0000000..dc01cd5 Binary files /dev/null and b/audio/se/Monster9_A.m4a differ diff --git a/audio/se/Monster9_A.ogg b/audio/se/Monster9_A.ogg new file mode 100644 index 0000000..bfcb174 Binary files /dev/null and b/audio/se/Monster9_A.ogg differ diff --git a/audio/se/Monster9_B.m4a b/audio/se/Monster9_B.m4a new file mode 100644 index 0000000..59b18d5 Binary files /dev/null and b/audio/se/Monster9_B.m4a differ diff --git a/audio/se/Monster9_B.ogg b/audio/se/Monster9_B.ogg new file mode 100644 index 0000000..766189a Binary files /dev/null and b/audio/se/Monster9_B.ogg differ diff --git a/audio/se/Move7_A.m4a b/audio/se/Move7_A.m4a new file mode 100644 index 0000000..5503e4c Binary files /dev/null and b/audio/se/Move7_A.m4a differ diff --git a/audio/se/Move7_A.ogg b/audio/se/Move7_A.ogg new file mode 100644 index 0000000..6075fa2 Binary files /dev/null and b/audio/se/Move7_A.ogg differ diff --git a/audio/se/Move7_B.m4a b/audio/se/Move7_B.m4a new file mode 100644 index 0000000..acdb385 Binary files /dev/null and b/audio/se/Move7_B.m4a differ diff --git a/audio/se/Move7_B.ogg b/audio/se/Move7_B.ogg new file mode 100644 index 0000000..8174ddf Binary files /dev/null and b/audio/se/Move7_B.ogg differ diff --git a/audio/se/Sound4_A.m4a b/audio/se/Sound4_A.m4a new file mode 100644 index 0000000..9da18fa Binary files /dev/null and b/audio/se/Sound4_A.m4a differ diff --git a/audio/se/Sound4_A.ogg b/audio/se/Sound4_A.ogg new file mode 100644 index 0000000..903c5a9 Binary files /dev/null and b/audio/se/Sound4_A.ogg differ diff --git a/audio/se/Sound4_B.m4a b/audio/se/Sound4_B.m4a new file mode 100644 index 0000000..8b80b51 Binary files /dev/null and b/audio/se/Sound4_B.m4a differ diff --git a/audio/se/Sound4_B.ogg b/audio/se/Sound4_B.ogg new file mode 100644 index 0000000..29f7587 Binary files /dev/null and b/audio/se/Sound4_B.ogg differ diff --git a/audio/se/Summon_A.m4a b/audio/se/Summon_A.m4a new file mode 100644 index 0000000..61448cb Binary files /dev/null and b/audio/se/Summon_A.m4a differ diff --git a/audio/se/Summon_A.ogg b/audio/se/Summon_A.ogg new file mode 100644 index 0000000..a160f8a Binary files /dev/null and b/audio/se/Summon_A.ogg differ diff --git a/audio/se/Summon_B.m4a b/audio/se/Summon_B.m4a new file mode 100644 index 0000000..8ee181d Binary files /dev/null and b/audio/se/Summon_B.m4a differ diff --git a/audio/se/Summon_B.ogg b/audio/se/Summon_B.ogg new file mode 100644 index 0000000..6e32523 Binary files /dev/null and b/audio/se/Summon_B.ogg differ diff --git a/audio/se/Thunder13_A.m4a b/audio/se/Thunder13_A.m4a new file mode 100644 index 0000000..d4891f7 Binary files /dev/null and b/audio/se/Thunder13_A.m4a differ diff --git a/audio/se/Thunder13_A.ogg b/audio/se/Thunder13_A.ogg new file mode 100644 index 0000000..0fab0b2 Binary files /dev/null and b/audio/se/Thunder13_A.ogg differ diff --git a/audio/se/Thunder13_B.m4a b/audio/se/Thunder13_B.m4a new file mode 100644 index 0000000..113f30a Binary files /dev/null and b/audio/se/Thunder13_B.m4a differ diff --git a/audio/se/Thunder13_B.ogg b/audio/se/Thunder13_B.ogg new file mode 100644 index 0000000..2e63d3d Binary files /dev/null and b/audio/se/Thunder13_B.ogg differ diff --git a/audio/se/Wind12_A.m4a b/audio/se/Wind12_A.m4a new file mode 100644 index 0000000..2e50154 Binary files /dev/null and b/audio/se/Wind12_A.m4a differ diff --git a/audio/se/Wind12_A.ogg b/audio/se/Wind12_A.ogg new file mode 100644 index 0000000..dcdb64a Binary files /dev/null and b/audio/se/Wind12_A.ogg differ diff --git a/audio/se/Wind12_B.m4a b/audio/se/Wind12_B.m4a new file mode 100644 index 0000000..03b1649 Binary files /dev/null and b/audio/se/Wind12_B.m4a differ diff --git a/audio/se/Wind12_B.ogg b/audio/se/Wind12_B.ogg new file mode 100644 index 0000000..f36b6f2 Binary files /dev/null and b/audio/se/Wind12_B.ogg differ diff --git a/data/Armors.json b/data/Armors.json index 062c94f..95ce891 100644 --- a/data/Armors.json +++ b/data/Armors.json @@ -99,5 +99,205 @@ null, {"id":97,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, {"id":98,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, {"id":99,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, -{"id":100,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0} +{"id":100,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":101,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":102,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":103,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":104,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":105,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":106,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":107,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":108,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":109,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":110,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":111,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":112,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":113,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":114,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":115,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":116,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":117,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":118,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":119,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":120,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":121,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":122,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":123,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":124,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":125,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":126,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":127,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":128,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":129,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":130,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":131,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":132,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":133,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":134,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":135,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":136,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":137,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":138,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":139,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":140,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":141,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":142,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":143,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":144,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":145,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":146,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":147,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":148,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":149,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":150,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":151,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":152,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":153,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":154,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":155,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":156,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":157,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":158,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":159,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":160,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":161,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":162,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":163,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":164,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":165,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":166,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":167,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":168,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":169,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":170,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":171,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":172,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":173,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":174,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":175,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":176,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":177,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":178,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":179,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":180,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":181,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":182,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":183,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":184,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":185,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":186,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":187,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":188,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":189,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":190,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":191,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":192,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":193,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":194,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":195,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":196,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":197,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":198,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":199,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":200,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":201,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":202,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":203,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":204,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":205,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":206,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":207,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":208,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":209,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":210,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":211,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":212,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":213,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":214,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":215,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":216,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":217,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":218,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":219,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":220,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":221,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":222,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":223,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":224,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":225,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":226,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":227,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":228,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":229,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":230,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":231,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":232,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":233,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":234,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":235,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":236,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":237,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":238,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":239,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":240,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":241,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":242,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":243,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":244,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":245,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":246,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":247,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":248,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":249,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":250,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":251,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":252,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":253,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":254,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":255,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":256,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":257,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":258,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":259,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":260,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":261,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":262,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":263,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":264,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":265,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":266,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":267,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":268,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":269,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":270,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":271,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":272,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":273,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":274,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":275,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":276,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":277,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":278,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":279,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":280,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":281,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":282,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":283,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":284,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":285,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":286,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":287,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":288,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":289,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":290,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":291,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":292,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":293,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":294,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":295,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":296,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":297,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":298,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":299,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0}, +{"id":300,"atypeId":0,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0} ] \ No newline at end of file diff --git a/data/MapInfos.json b/data/MapInfos.json index 20637ca..ed810d2 100644 --- a/data/MapInfos.json +++ b/data/MapInfos.json @@ -1,7 +1,7 @@ [ null, {"id":1,"expanded":false,"name":"Dungeon3","order":5,"parentId":3,"scrollX":3393,"scrollY":3405}, -{"id":2,"expanded":true,"name":"Dungeon1","order":3,"parentId":4,"scrollX":3393,"scrollY":3405}, +{"id":2,"expanded":true,"name":"Dungeon1","order":3,"parentId":4,"scrollX":2840.727272727273,"scrollY":3709.0909090909095}, {"id":3,"expanded":true,"name":"Dungeon2","order":4,"parentId":2,"scrollX":3393,"scrollY":3405}, {"id":4,"expanded":true,"name":"House","order":2,"parentId":5,"scrollX":1518.6666666666667,"scrollY":854.6666666666666}, {"id":5,"expanded":true,"name":"Intro","order":1,"parentId":0,"scrollX":1139,"scrollY":641} diff --git a/data/Skills.json b/data/Skills.json index d7d7beb..e2e508f 100644 --- a/data/Skills.json +++ b/data/Skills.json @@ -49,5 +49,155 @@ null, {"id":47,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, {"id":48,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, {"id":49,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, -{"id":50,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0} +{"id":50,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":51,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":52,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":53,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":54,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":55,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":56,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":57,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":58,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":59,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":60,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":61,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":62,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":63,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":64,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":65,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":66,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":67,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":68,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":69,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":70,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":71,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":72,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":73,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":74,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":75,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":76,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":77,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":78,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":79,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":80,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":81,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":82,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":83,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":84,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":85,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":86,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":87,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":88,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":89,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":90,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":91,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":92,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":93,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":94,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":95,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":96,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":97,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":98,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":99,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":100,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":101,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":102,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":103,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":104,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":105,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":106,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":107,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":108,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":109,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":110,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":111,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":112,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":113,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":114,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":115,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":116,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":117,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":118,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":119,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":120,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":121,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":122,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":123,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":124,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":125,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":126,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":127,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":128,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":129,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":130,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":131,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":132,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":133,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":134,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":135,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":136,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":137,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":138,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":139,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":140,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":141,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":142,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":143,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":144,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":145,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":146,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":147,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":148,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":149,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":150,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":151,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":152,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":153,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":154,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":155,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":156,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":157,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":158,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":159,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":160,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":161,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":162,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":163,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":164,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":165,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":166,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":167,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":168,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":169,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":170,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":171,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":172,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":173,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":174,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":175,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":176,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":177,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":178,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":179,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":180,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":181,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":182,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":183,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":184,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":185,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":186,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":187,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":188,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":189,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":190,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":191,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":192,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":193,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":194,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":195,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":196,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":197,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":198,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":199,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":200,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0} ] \ No newline at end of file diff --git a/data/System.json b/data/System.json index 0ec396c..a005bdb 100644 --- a/data/System.json +++ b/data/System.json @@ -1 +1 @@ -{"airship":{"bgm":{"name":"Ship3","pan":0,"pitch":100,"volume":90},"characterIndex":3,"characterName":"Vehicle","startMapId":0,"startX":0,"startY":0},"armorTypes":["","General Armor","Magic Armor","Light Armor","Heavy Armor","Small Shield","Large Shield"],"attackMotions":[{"type":0,"weaponImageId":0},{"type":1,"weaponImageId":1},{"type":1,"weaponImageId":2},{"type":1,"weaponImageId":3},{"type":1,"weaponImageId":4},{"type":1,"weaponImageId":5},{"type":1,"weaponImageId":6},{"type":2,"weaponImageId":7},{"type":2,"weaponImageId":8},{"type":2,"weaponImageId":9},{"type":0,"weaponImageId":10},{"type":0,"weaponImageId":11},{"type":0,"weaponImageId":12}],"battleBgm":{"name":"Battle1","pan":0,"pitch":100,"volume":90},"battleback1Name":"Grassland","battleback2Name":"Grassland","battlerHue":0,"battlerName":"Dragon","boat":{"bgm":{"name":"Ship1","pan":0,"pitch":100,"volume":90},"characterIndex":0,"characterName":"Vehicle","startMapId":0,"startX":0,"startY":0},"currencyUnit":"G","defeatMe":{"name":"Defeat1","pan":0,"pitch":100,"volume":90},"editMapId":2,"elements":["","Physical","Fire","Ice","Thunder","Water","Earth","Wind","Light","Darkness"],"equipTypes":["","Weapon","Shield","Head","Body","Accessory"],"gameTitle":"Superproject1","gameoverMe":{"name":"Gameover1","pan":0,"pitch":100,"volume":90},"locale":"en_US","magicSkills":[1],"menuCommands":[true,true,true,true,true,true],"optDisplayTp":true,"optDrawTitle":true,"optExtraExp":false,"optFloorDeath":false,"optFollowers":true,"optSideView":true,"optSlipDeath":false,"optTransparent":false,"partyMembers":[1],"ship":{"bgm":{"name":"Ship2","pan":0,"pitch":100,"volume":90},"characterIndex":1,"characterName":"Vehicle","startMapId":0,"startX":0,"startY":0},"skillTypes":["","Magic","Special"],"sounds":[{"name":"Cursor2","pan":0,"pitch":100,"volume":90},{"name":"Decision1","pan":0,"pitch":100,"volume":90},{"name":"Cancel2","pan":0,"pitch":100,"volume":90},{"name":"Buzzer1","pan":0,"pitch":100,"volume":90},{"name":"Equip1","pan":0,"pitch":100,"volume":90},{"name":"Save","pan":0,"pitch":100,"volume":90},{"name":"Load","pan":0,"pitch":100,"volume":90},{"name":"Battle1","pan":0,"pitch":100,"volume":90},{"name":"Run","pan":0,"pitch":100,"volume":90},{"name":"Attack3","pan":0,"pitch":100,"volume":90},{"name":"Damage4","pan":0,"pitch":100,"volume":90},{"name":"Collapse1","pan":0,"pitch":100,"volume":90},{"name":"Collapse2","pan":0,"pitch":100,"volume":90},{"name":"Collapse3","pan":0,"pitch":100,"volume":90},{"name":"Damage5","pan":0,"pitch":100,"volume":90},{"name":"Collapse4","pan":0,"pitch":100,"volume":90},{"name":"Recovery","pan":0,"pitch":100,"volume":90},{"name":"Miss","pan":0,"pitch":100,"volume":90},{"name":"Evasion1","pan":0,"pitch":100,"volume":90},{"name":"Evasion2","pan":0,"pitch":100,"volume":90},{"name":"Reflection","pan":0,"pitch":100,"volume":90},{"name":"Shop1","pan":0,"pitch":100,"volume":90},{"name":"Item3","pan":0,"pitch":100,"volume":90},{"name":"Item3","pan":0,"pitch":100,"volume":90}],"startMapId":5,"startX":1,"startY":0,"switches":["","","","","","","","","","","","","","","","","","","","",""],"terms":{"basic":["Level","Lv","HP","HP","MP","MP","TP","TP","EXP","EXP"],"commands":["Fight","Escape","Attack","Guard","Item","Skill","Equip","Status","Formation","Save","Game End","Options","Weapon","Armor","Key Item","Equip","Optimize","Clear","New Game","Continue",null,"To Title","Cancel",null,"Buy","Sell"],"params":["Max HP","Max MP","Attack","Defense","M.Attack","M.Defense","Agility","Luck","Hit","Evasion"],"messages":{"actionFailure":"There was no effect on %1!","actorDamage":"%1 took %2 damage!","actorDrain":"%1 was drained of %2 %3!","actorGain":"%1 gained %2 %3!","actorLoss":"%1 lost %2 %3!","actorNoDamage":"%1 took no damage!","actorNoHit":"Miss! %1 took no damage!","actorRecovery":"%1 recovered %2 %3!","alwaysDash":"Always Dash","bgmVolume":"BGM Volume","bgsVolume":"BGS Volume","buffAdd":"%1's %2 went up!","buffRemove":"%1's %2 returned to normal!","commandRemember":"Command Remember","counterAttack":"%1 counterattacked!","criticalToActor":"A painful blow!!","criticalToEnemy":"An excellent hit!!","debuffAdd":"%1's %2 went down!","defeat":"%1 was defeated.","emerge":"%1 emerged!","enemyDamage":"%1 took %2 damage!","enemyDrain":"%1 was drained of %2 %3!","enemyGain":"%1 gained %2 %3!","enemyLoss":"%1 lost %2 %3!","enemyNoDamage":"%1 took no damage!","enemyNoHit":"Miss! %1 took no damage!","enemyRecovery":"%1 recovered %2 %3!","escapeFailure":"However, it was unable to escape!","escapeStart":"%1 has started to escape!","evasion":"%1 evaded the attack!","expNext":"To Next %1","expTotal":"Current %1","file":"File","levelUp":"%1 is now %2 %3!","loadMessage":"Load which file?","magicEvasion":"%1 nullified the magic!","magicReflection":"%1 reflected the magic!","meVolume":"ME Volume","obtainExp":"%1 %2 received!","obtainGold":"%1\\G found!","obtainItem":"%1 found!","obtainSkill":"%1 learned!","partyName":"%1's Party","possession":"Possession","preemptive":"%1 got the upper hand!","saveMessage":"Save to which file?","seVolume":"SE Volume","substitute":"%1 protected %2!","surprise":"%1 was surprised!","useItem":"%1 uses %2!","victory":"%1 was victorious!"}},"testBattlers":[{"actorId":1,"equips":[1,1,2,3,0],"level":1},{"actorId":2,"equips":[2,1,2,3,0],"level":1},{"actorId":3,"equips":[3,0,2,3,4],"level":1},{"actorId":4,"equips":[4,0,2,3,4],"level":1}],"testTroopId":4,"title1Name":"Gates","title2Name":"","titleBgm":{"name":"Theme6","pan":0,"pitch":100,"volume":90},"variables":["","","","","","","","","","","","","","","","","","","","",""],"versionId":98342844,"victoryMe":{"name":"Victory1","pan":0,"pitch":100,"volume":90},"weaponTypes":["","Dagger","Sword","Flail","Axe","Whip","Cane","Bow","Crossbow","Gun","Claw","Glove","Spear"],"windowTone":[-255,-102,187,0]} \ No newline at end of file +{"airship":{"bgm":{"name":"Ship3","pan":0,"pitch":100,"volume":90},"characterIndex":3,"characterName":"Vehicle","startMapId":0,"startX":0,"startY":0},"armorTypes":["","General Armor","Magic Armor","Light Armor","Heavy Armor","Small Shield","Large Shield"],"attackMotions":[{"type":0,"weaponImageId":0},{"type":1,"weaponImageId":1},{"type":1,"weaponImageId":2},{"type":1,"weaponImageId":3},{"type":1,"weaponImageId":4},{"type":1,"weaponImageId":5},{"type":1,"weaponImageId":6},{"type":2,"weaponImageId":7},{"type":2,"weaponImageId":8},{"type":2,"weaponImageId":9},{"type":0,"weaponImageId":10},{"type":0,"weaponImageId":11},{"type":0,"weaponImageId":12}],"battleBgm":{"name":"Battle1","pan":0,"pitch":100,"volume":90},"battleback1Name":"Grassland","battleback2Name":"Grassland","battlerHue":0,"battlerName":"Dragon","boat":{"bgm":{"name":"Ship1","pan":0,"pitch":100,"volume":90},"characterIndex":0,"characterName":"Vehicle","startMapId":0,"startX":0,"startY":0},"currencyUnit":"G","defeatMe":{"name":"Defeat1","pan":0,"pitch":100,"volume":90},"editMapId":2,"elements":["","Physical","Fire","Ice","Thunder","Water","Earth","Wind","Light","Darkness"],"equipTypes":["","Weapon","Shield","Head","Body","Accessory"],"gameTitle":"Superproject1","gameoverMe":{"name":"Gameover1","pan":0,"pitch":100,"volume":90},"locale":"en_US","magicSkills":[1],"menuCommands":[true,true,true,true,true,true],"optDisplayTp":true,"optDrawTitle":true,"optExtraExp":false,"optFloorDeath":false,"optFollowers":true,"optSideView":true,"optSlipDeath":false,"optTransparent":false,"partyMembers":[1],"ship":{"bgm":{"name":"Ship2","pan":0,"pitch":100,"volume":90},"characterIndex":1,"characterName":"Vehicle","startMapId":0,"startX":0,"startY":0},"skillTypes":["","Magic","Special"],"sounds":[{"name":"Cursor2","pan":0,"pitch":100,"volume":90},{"name":"Decision1","pan":0,"pitch":100,"volume":90},{"name":"Cancel2","pan":0,"pitch":100,"volume":90},{"name":"Buzzer1","pan":0,"pitch":100,"volume":90},{"name":"Equip1","pan":0,"pitch":100,"volume":90},{"name":"Save","pan":0,"pitch":100,"volume":90},{"name":"Load","pan":0,"pitch":100,"volume":90},{"name":"Battle1","pan":0,"pitch":100,"volume":90},{"name":"Run","pan":0,"pitch":100,"volume":90},{"name":"Attack3","pan":0,"pitch":100,"volume":90},{"name":"Damage4","pan":0,"pitch":100,"volume":90},{"name":"Collapse1","pan":0,"pitch":100,"volume":90},{"name":"Collapse2","pan":0,"pitch":100,"volume":90},{"name":"Collapse3","pan":0,"pitch":100,"volume":90},{"name":"Damage5","pan":0,"pitch":100,"volume":90},{"name":"Collapse4","pan":0,"pitch":100,"volume":90},{"name":"Recovery","pan":0,"pitch":100,"volume":90},{"name":"Miss","pan":0,"pitch":100,"volume":90},{"name":"Evasion1","pan":0,"pitch":100,"volume":90},{"name":"Evasion2","pan":0,"pitch":100,"volume":90},{"name":"Reflection","pan":0,"pitch":100,"volume":90},{"name":"Shop1","pan":0,"pitch":100,"volume":90},{"name":"Item3","pan":0,"pitch":100,"volume":90},{"name":"Item3","pan":0,"pitch":100,"volume":90}],"startMapId":5,"startX":1,"startY":0,"switches":["","","","","","","","","","","","","","","","","","","","",""],"terms":{"basic":["Level","Lv","HP","HP","MP","MP","TP","TP","EXP","EXP"],"commands":["Fight","Escape","Attack","Guard","Item","Skill","Equip","Status","Formation","Save","Game End","Options","Weapon","Armor","Key Item","Equip","Optimize","Clear","New Game","Continue",null,"To Title","Cancel",null,"Buy","Sell"],"params":["Max HP","Max MP","Attack","Defense","M.Attack","M.Defense","Agility","Luck","Hit","Evasion"],"messages":{"actionFailure":"There was no effect on %1!","actorDamage":"%1 took %2 damage!","actorDrain":"%1 was drained of %2 %3!","actorGain":"%1 gained %2 %3!","actorLoss":"%1 lost %2 %3!","actorNoDamage":"%1 took no damage!","actorNoHit":"Miss! %1 took no damage!","actorRecovery":"%1 recovered %2 %3!","alwaysDash":"Always Dash","bgmVolume":"BGM Volume","bgsVolume":"BGS Volume","buffAdd":"%1's %2 went up!","buffRemove":"%1's %2 returned to normal!","commandRemember":"Command Remember","counterAttack":"%1 counterattacked!","criticalToActor":"A painful blow!!","criticalToEnemy":"An excellent hit!!","debuffAdd":"%1's %2 went down!","defeat":"%1 was defeated.","emerge":"%1 emerged!","enemyDamage":"%1 took %2 damage!","enemyDrain":"%1 was drained of %2 %3!","enemyGain":"%1 gained %2 %3!","enemyLoss":"%1 lost %2 %3!","enemyNoDamage":"%1 took no damage!","enemyNoHit":"Miss! %1 took no damage!","enemyRecovery":"%1 recovered %2 %3!","escapeFailure":"However, it was unable to escape!","escapeStart":"%1 has started to escape!","evasion":"%1 evaded the attack!","expNext":"To Next %1","expTotal":"Current %1","file":"File","levelUp":"%1 is now %2 %3!","loadMessage":"Load which file?","magicEvasion":"%1 nullified the magic!","magicReflection":"%1 reflected the magic!","meVolume":"ME Volume","obtainExp":"%1 %2 received!","obtainGold":"%1\\G found!","obtainItem":"%1 found!","obtainSkill":"%1 learned!","partyName":"%1's Party","possession":"Possession","preemptive":"%1 got the upper hand!","saveMessage":"Save to which file?","seVolume":"SE Volume","substitute":"%1 protected %2!","surprise":"%1 was surprised!","useItem":"%1 uses %2!","victory":"%1 was victorious!"}},"testBattlers":[{"actorId":1,"equips":[1,1,2,3,0],"level":1},{"actorId":2,"equips":[2,1,2,3,0],"level":1},{"actorId":3,"equips":[3,0,2,3,4],"level":1},{"actorId":4,"equips":[4,0,2,3,4],"level":1}],"testTroopId":4,"title1Name":"Gates","title2Name":"","titleBgm":{"name":"Theme6","pan":0,"pitch":100,"volume":90},"variables":["","","","","","","","","","","","","","","","","","","","",""],"versionId":50312814,"victoryMe":{"name":"Victory1","pan":0,"pitch":100,"volume":90},"weaponTypes":["","Dagger","Sword","Flail","Axe","Whip","Cane","Bow","Crossbow","Gun","Claw","Glove","Spear"],"windowTone":[-255,-102,187,0]} \ No newline at end of file diff --git a/data/Weapons.json b/data/Weapons.json index cebdbe6..90ea718 100644 --- a/data/Weapons.json +++ b/data/Weapons.json @@ -99,5 +99,205 @@ null, {"id":97,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, {"id":98,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, {"id":99,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, -{"id":100,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0} +{"id":100,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":101,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":102,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":103,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":104,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":105,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":106,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":107,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":108,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":109,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":110,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":111,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":112,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":113,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":114,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":115,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":116,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":117,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":118,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":119,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":120,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":121,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":122,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":123,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":124,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":125,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":126,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":127,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":128,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":129,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":130,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":131,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":132,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":133,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":134,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":135,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":136,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":137,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":138,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":139,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":140,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":141,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":142,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":143,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":144,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":145,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":146,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":147,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":148,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":149,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":150,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":151,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":152,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":153,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":154,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":155,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":156,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":157,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":158,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":159,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":160,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":161,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":162,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":163,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":164,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":165,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":166,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":167,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":168,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":169,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":170,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":171,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":172,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":173,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":174,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":175,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":176,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":177,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":178,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":179,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":180,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":181,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":182,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":183,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":184,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":185,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":186,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":187,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":188,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":189,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":190,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":191,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":192,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":193,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":194,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":195,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":196,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":197,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":198,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":199,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":200,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":201,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":202,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":203,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":204,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":205,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":206,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":207,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":208,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":209,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":210,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":211,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":212,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":213,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":214,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":215,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":216,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":217,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":218,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":219,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":220,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":221,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":222,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":223,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":224,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":225,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":226,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":227,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":228,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":229,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":230,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":231,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":232,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":233,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":234,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":235,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":236,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":237,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":238,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":239,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":240,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":241,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":242,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":243,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":244,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":245,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":246,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":247,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":248,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":249,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":250,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":251,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":252,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":253,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":254,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":255,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":256,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":257,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":258,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":259,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":260,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":261,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":262,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":263,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":264,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":265,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":266,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":267,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":268,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":269,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":270,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":271,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":272,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":273,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":274,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":275,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":276,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":277,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":278,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":279,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":280,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":281,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":282,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":283,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":284,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":285,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":286,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":287,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":288,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":289,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":290,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":291,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":292,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":293,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":294,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":295,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":296,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":297,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":298,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":299,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0}, +{"id":300,"animationId":0,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":0,"name":"","note":"","params":[0,0,0,0,0,0,0,0],"price":0,"wtypeId":0} ] \ No newline at end of file diff --git a/img/animations/20160210_XHeartHeal by hadecynn.png b/img/animations/20160210_XHeartHeal by hadecynn.png new file mode 100644 index 0000000..375f520 Binary files /dev/null and b/img/animations/20160210_XHeartHeal by hadecynn.png differ diff --git a/img/characters/$MV_AnimalDown.png b/img/characters/$MV_AnimalDown.png new file mode 100644 index 0000000..9a1fde4 Binary files /dev/null and b/img/characters/$MV_AnimalDown.png differ diff --git a/img/characters/$dogebark.png b/img/characters/$dogebark.png new file mode 100644 index 0000000..e072bd8 Binary files /dev/null and b/img/characters/$dogebark.png differ diff --git a/img/characters/Actor_sangoku01.png b/img/characters/Actor_sangoku01.png new file mode 100644 index 0000000..2689e47 Binary files /dev/null and b/img/characters/Actor_sangoku01.png differ diff --git a/img/characters/Actor_sangoku02.png b/img/characters/Actor_sangoku02.png new file mode 100644 index 0000000..6e698a3 Binary files /dev/null and b/img/characters/Actor_sangoku02.png differ diff --git a/img/characters/Damage95.png b/img/characters/Damage95.png new file mode 100644 index 0000000..cb9ae9d Binary files /dev/null and b/img/characters/Damage95.png differ diff --git a/img/characters/DamageAce.png b/img/characters/DamageAce.png new file mode 100644 index 0000000..69a6c80 Binary files /dev/null and b/img/characters/DamageAce.png differ diff --git a/img/characters/DamageXP.png b/img/characters/DamageXP.png new file mode 100644 index 0000000..76ba9a7 Binary files /dev/null and b/img/characters/DamageXP.png differ diff --git a/img/characters/Damage_2k3.png b/img/characters/Damage_2k3.png new file mode 100644 index 0000000..6d703a7 Binary files /dev/null and b/img/characters/Damage_2k3.png differ diff --git a/img/characters/Damage_sangoku.png b/img/characters/Damage_sangoku.png new file mode 100644 index 0000000..5ee8c20 Binary files /dev/null and b/img/characters/Damage_sangoku.png differ diff --git a/img/characters/ExpandedSet.png b/img/characters/ExpandedSet.png new file mode 100644 index 0000000..03a3a36 Binary files /dev/null and b/img/characters/ExpandedSet.png differ diff --git a/img/characters/OriginalDesign.png b/img/characters/OriginalDesign.png new file mode 100644 index 0000000..641b545 Binary files /dev/null and b/img/characters/OriginalDesign.png differ diff --git a/img/characters/RTPRecreation_2k3.png b/img/characters/RTPRecreation_2k3.png new file mode 100644 index 0000000..89c9e24 Binary files /dev/null and b/img/characters/RTPRecreation_2k3.png differ diff --git a/img/characters/RTPRecreation_95.png b/img/characters/RTPRecreation_95.png new file mode 100644 index 0000000..5a8d680 Binary files /dev/null and b/img/characters/RTPRecreation_95.png differ diff --git a/img/characters/RTPRecreation_Ace.png b/img/characters/RTPRecreation_Ace.png new file mode 100644 index 0000000..e620e5c Binary files /dev/null and b/img/characters/RTPRecreation_Ace.png differ diff --git a/img/characters/RTPRecreation_VX2.png b/img/characters/RTPRecreation_VX2.png new file mode 100644 index 0000000..75252d8 Binary files /dev/null and b/img/characters/RTPRecreation_VX2.png differ diff --git a/img/characters/RTPRecreation_XP ver 3.png b/img/characters/RTPRecreation_XP ver 3.png new file mode 100644 index 0000000..8ed80d0 Binary files /dev/null and b/img/characters/RTPRecreation_XP ver 3.png differ diff --git a/img/characters/RTPRecreation_XP.png b/img/characters/RTPRecreation_XP.png new file mode 100644 index 0000000..7f5bb1a Binary files /dev/null and b/img/characters/RTPRecreation_XP.png differ diff --git a/img/characters/RTPRecreation_XP2.png b/img/characters/RTPRecreation_XP2.png new file mode 100644 index 0000000..2ab4802 Binary files /dev/null and b/img/characters/RTPRecreation_XP2.png differ diff --git a/img/characters/TF2_MV_BLU.png b/img/characters/TF2_MV_BLU.png new file mode 100644 index 0000000..f338cf3 Binary files /dev/null and b/img/characters/TF2_MV_BLU.png differ diff --git a/img/characters/TF2_MV_BLU_FEM.png b/img/characters/TF2_MV_BLU_FEM.png new file mode 100644 index 0000000..5f624ee Binary files /dev/null and b/img/characters/TF2_MV_BLU_FEM.png differ diff --git a/img/characters/TF2_MV_BLU_HAT.png b/img/characters/TF2_MV_BLU_HAT.png new file mode 100644 index 0000000..9ad6579 Binary files /dev/null and b/img/characters/TF2_MV_BLU_HAT.png differ diff --git a/img/characters/TF2_MV_HEAVY.png b/img/characters/TF2_MV_HEAVY.png new file mode 100644 index 0000000..13af73d Binary files /dev/null and b/img/characters/TF2_MV_HEAVY.png differ diff --git a/img/characters/TF2_MV_RED.png b/img/characters/TF2_MV_RED.png new file mode 100644 index 0000000..c586101 Binary files /dev/null and b/img/characters/TF2_MV_RED.png differ diff --git a/img/characters/TF2_MV_RED_FEM.png b/img/characters/TF2_MV_RED_FEM.png new file mode 100644 index 0000000..14a224f Binary files /dev/null and b/img/characters/TF2_MV_RED_FEM.png differ diff --git a/img/characters/TF2_MV_RED_HAT.png b/img/characters/TF2_MV_RED_HAT.png new file mode 100644 index 0000000..0370208 Binary files /dev/null and b/img/characters/TF2_MV_RED_HAT.png differ diff --git a/img/characters/Terms of Use.txt b/img/characters/Terms of Use.txt new file mode 100644 index 0000000..4d3e822 --- /dev/null +++ b/img/characters/Terms of Use.txt @@ -0,0 +1,11 @@ + _____________________________________________________________________ +|---------------------------------------------------------------------| +| Free for use in commercial and non commercial games with credits | +| to the following: Archeia, Caz, KADOKAWA, Degica | +|---------------------------------------------------------------------| +| Editing: Color adjustments or adding extra details are okay, | +| frankensteining and tracing are okay. | +|---------------------------------------------------------------------| +| Do not resell, repost out of RMW, or claim as your own work. | +|_____________________________________________________________________| + diff --git a/img/enemies/DrumAngel.png b/img/enemies/DrumAngel.png new file mode 100644 index 0000000..2fb52ed Binary files /dev/null and b/img/enemies/DrumAngel.png differ diff --git a/img/enemies/Marimo Terms of Use.txt b/img/enemies/Marimo Terms of Use.txt new file mode 100644 index 0000000..5f168c1 --- /dev/null +++ b/img/enemies/Marimo Terms of Use.txt @@ -0,0 +1,16 @@ + _____________________________________________________________________ +| TERMS OF USE FOR MARIMO'S PUBLIC RESOURCES: | +|---------------------------------------------------------------------| +| Free for use in commercial and non commercial games with credit. | +|---------------------------------------------------------------------| +| Editing: Color adjustments or adding extra details are okay, | +| frankensteining and tracing are not okay. | +|---------------------------------------------------------------------| +| Do not resell, repost out of RMW, or claim as your own work. | +|_____________________________________________________________________| + + Q u e s t i o n s / C o m m e n t s / C o n c e r n s ? : + pm Marimo @ rpgmakerweb + or email: adad.wifey (@) gmail.com + + Have fun Game Making!!! \ No newline at end of file diff --git a/img/enemies/ViolinAngel.png b/img/enemies/ViolinAngel.png new file mode 100644 index 0000000..2d381dc Binary files /dev/null and b/img/enemies/ViolinAngel.png differ diff --git a/img/enemies/akamanto.png b/img/enemies/akamanto.png new file mode 100644 index 0000000..cd113bf Binary files /dev/null and b/img/enemies/akamanto.png differ diff --git a/img/enemies/aluxes.png b/img/enemies/aluxes.png new file mode 100644 index 0000000..38e2d16 Binary files /dev/null and b/img/enemies/aluxes.png differ diff --git a/img/enemies/common_archer.png b/img/enemies/common_archer.png new file mode 100644 index 0000000..6a34a55 Binary files /dev/null and b/img/enemies/common_archer.png differ diff --git a/img/enemies/common_spearsman.png b/img/enemies/common_spearsman.png new file mode 100644 index 0000000..38f030c Binary files /dev/null and b/img/enemies/common_spearsman.png differ diff --git a/img/enemies/common_swordsman.png b/img/enemies/common_swordsman.png new file mode 100644 index 0000000..a71c4e7 Binary files /dev/null and b/img/enemies/common_swordsman.png differ diff --git a/img/enemies/common_wizkid.png b/img/enemies/common_wizkid.png new file mode 100644 index 0000000..3110284 Binary files /dev/null and b/img/enemies/common_wizkid.png differ diff --git a/img/enemies/guitarangel.png b/img/enemies/guitarangel.png new file mode 100644 index 0000000..fb3a2df Binary files /dev/null and b/img/enemies/guitarangel.png differ diff --git a/img/enemies/jorogumo.png b/img/enemies/jorogumo.png new file mode 100644 index 0000000..3da3ff1 Binary files /dev/null and b/img/enemies/jorogumo.png differ diff --git a/img/enemies/kamaitachi_01.png b/img/enemies/kamaitachi_01.png new file mode 100644 index 0000000..e20cbd3 Binary files /dev/null and b/img/enemies/kamaitachi_01.png differ diff --git a/img/enemies/kamaitachi_02.png b/img/enemies/kamaitachi_02.png new file mode 100644 index 0000000..10f98c5 Binary files /dev/null and b/img/enemies/kamaitachi_02.png differ diff --git a/img/enemies/kamaitachi_03.png b/img/enemies/kamaitachi_03.png new file mode 100644 index 0000000..0d401cb Binary files /dev/null and b/img/enemies/kamaitachi_03.png differ diff --git a/img/enemies/katakirauwa.png b/img/enemies/katakirauwa.png new file mode 100644 index 0000000..6f14ad5 Binary files /dev/null and b/img/enemies/katakirauwa.png differ diff --git a/img/enemies/kekkai.png b/img/enemies/kekkai.png new file mode 100644 index 0000000..38df970 Binary files /dev/null and b/img/enemies/kekkai.png differ diff --git a/img/enemies/termsofuse.txt b/img/enemies/termsofuse.txt new file mode 100644 index 0000000..5f168c1 --- /dev/null +++ b/img/enemies/termsofuse.txt @@ -0,0 +1,16 @@ + _____________________________________________________________________ +| TERMS OF USE FOR MARIMO'S PUBLIC RESOURCES: | +|---------------------------------------------------------------------| +| Free for use in commercial and non commercial games with credit. | +|---------------------------------------------------------------------| +| Editing: Color adjustments or adding extra details are okay, | +| frankensteining and tracing are not okay. | +|---------------------------------------------------------------------| +| Do not resell, repost out of RMW, or claim as your own work. | +|_____________________________________________________________________| + + Q u e s t i o n s / C o m m e n t s / C o n c e r n s ? : + pm Marimo @ rpgmakerweb + or email: adad.wifey (@) gmail.com + + Have fun Game Making!!! \ No newline at end of file diff --git a/img/enemies/trumpetangel.png b/img/enemies/trumpetangel.png new file mode 100644 index 0000000..0afa659 Binary files /dev/null and b/img/enemies/trumpetangel.png differ diff --git a/img/enemies/tsuchigumo.png b/img/enemies/tsuchigumo.png new file mode 100644 index 0000000..117a60c Binary files /dev/null and b/img/enemies/tsuchigumo.png differ diff --git a/img/faces/Harold-Emotes.png b/img/faces/Harold-Emotes.png new file mode 100644 index 0000000..963091e Binary files /dev/null and b/img/faces/Harold-Emotes.png differ diff --git a/img/faces/Sangokushi1.png b/img/faces/Sangokushi1.png new file mode 100644 index 0000000..1b992c9 Binary files /dev/null and b/img/faces/Sangokushi1.png differ diff --git a/img/faces/Sangokushi2.png b/img/faces/Sangokushi2.png new file mode 100644 index 0000000..45e617a Binary files /dev/null and b/img/faces/Sangokushi2.png differ diff --git a/img/pictures/Sangokushi_01ryubi_a.png b/img/pictures/Sangokushi_01ryubi_a.png new file mode 100644 index 0000000..8e59fd2 Binary files /dev/null and b/img/pictures/Sangokushi_01ryubi_a.png differ diff --git a/img/pictures/Sangokushi_01ryubi_b.png b/img/pictures/Sangokushi_01ryubi_b.png new file mode 100644 index 0000000..f238955 Binary files /dev/null and b/img/pictures/Sangokushi_01ryubi_b.png differ diff --git a/img/pictures/Sangokushi_02kanu_a.png b/img/pictures/Sangokushi_02kanu_a.png new file mode 100644 index 0000000..f3bbe93 Binary files /dev/null and b/img/pictures/Sangokushi_02kanu_a.png differ diff --git a/img/pictures/Sangokushi_02kanu_b.png b/img/pictures/Sangokushi_02kanu_b.png new file mode 100644 index 0000000..169e8a8 Binary files /dev/null and b/img/pictures/Sangokushi_02kanu_b.png differ diff --git a/img/pictures/Sangokushi_03chouhi_a.png b/img/pictures/Sangokushi_03chouhi_a.png new file mode 100644 index 0000000..1760a1b Binary files /dev/null and b/img/pictures/Sangokushi_03chouhi_a.png differ diff --git a/img/pictures/Sangokushi_03chouhi_b.png b/img/pictures/Sangokushi_03chouhi_b.png new file mode 100644 index 0000000..1ceeb7c Binary files /dev/null and b/img/pictures/Sangokushi_03chouhi_b.png differ diff --git a/img/pictures/Sangokushi_04chouun_a.png b/img/pictures/Sangokushi_04chouun_a.png new file mode 100644 index 0000000..b4935ae Binary files /dev/null and b/img/pictures/Sangokushi_04chouun_a.png differ diff --git a/img/pictures/Sangokushi_04chouun_b.png b/img/pictures/Sangokushi_04chouun_b.png new file mode 100644 index 0000000..5450da0 Binary files /dev/null and b/img/pictures/Sangokushi_04chouun_b.png differ diff --git a/img/pictures/Sangokushi_05shokatsuryo_a.png b/img/pictures/Sangokushi_05shokatsuryo_a.png new file mode 100644 index 0000000..0e72dd1 Binary files /dev/null and b/img/pictures/Sangokushi_05shokatsuryo_a.png differ diff --git a/img/pictures/Sangokushi_05shokatsuryo_b.png b/img/pictures/Sangokushi_05shokatsuryo_b.png new file mode 100644 index 0000000..b8250dd Binary files /dev/null and b/img/pictures/Sangokushi_05shokatsuryo_b.png differ diff --git a/img/pictures/Sangokushi_06kouchu_a.png b/img/pictures/Sangokushi_06kouchu_a.png new file mode 100644 index 0000000..c6d02ac Binary files /dev/null and b/img/pictures/Sangokushi_06kouchu_a.png differ diff --git a/img/pictures/Sangokushi_06kouchu_b.png b/img/pictures/Sangokushi_06kouchu_b.png new file mode 100644 index 0000000..25d776d Binary files /dev/null and b/img/pictures/Sangokushi_06kouchu_b.png differ diff --git a/img/pictures/Sangokushi_07bachou_a.png b/img/pictures/Sangokushi_07bachou_a.png new file mode 100644 index 0000000..9dec2ac Binary files /dev/null and b/img/pictures/Sangokushi_07bachou_a.png differ diff --git a/img/pictures/Sangokushi_07bachou_b.png b/img/pictures/Sangokushi_07bachou_b.png new file mode 100644 index 0000000..a03f4b0 Binary files /dev/null and b/img/pictures/Sangokushi_07bachou_b.png differ diff --git a/img/pictures/Sangokushi_08sousou_a.png b/img/pictures/Sangokushi_08sousou_a.png new file mode 100644 index 0000000..f6fb7b2 Binary files /dev/null and b/img/pictures/Sangokushi_08sousou_a.png differ diff --git a/img/pictures/Sangokushi_08sousou_b.png b/img/pictures/Sangokushi_08sousou_b.png new file mode 100644 index 0000000..2740260 Binary files /dev/null and b/img/pictures/Sangokushi_08sousou_b.png differ diff --git a/img/pictures/Sangokushi_09sonken_a.png b/img/pictures/Sangokushi_09sonken_a.png new file mode 100644 index 0000000..8403dfc Binary files /dev/null and b/img/pictures/Sangokushi_09sonken_a.png differ diff --git a/img/pictures/Sangokushi_09sonken_b].png b/img/pictures/Sangokushi_09sonken_b].png new file mode 100644 index 0000000..7b113ed Binary files /dev/null and b/img/pictures/Sangokushi_09sonken_b].png differ diff --git a/img/pictures/Sangokushi_10ryofu_a.png b/img/pictures/Sangokushi_10ryofu_a.png new file mode 100644 index 0000000..0fde064 Binary files /dev/null and b/img/pictures/Sangokushi_10ryofu_a.png differ diff --git a/img/pictures/Sangokushi_10ryofu_b.png b/img/pictures/Sangokushi_10ryofu_b.png new file mode 100644 index 0000000..358c323 Binary files /dev/null and b/img/pictures/Sangokushi_10ryofu_b.png differ diff --git a/img/sv_actors/001-Fighter01.png b/img/sv_actors/001-Fighter01.png new file mode 100644 index 0000000..bc59543 Binary files /dev/null and b/img/sv_actors/001-Fighter01.png differ diff --git a/img/sv_actors/001-Fighter02.png b/img/sv_actors/001-Fighter02.png new file mode 100644 index 0000000..0aaee0d Binary files /dev/null and b/img/sv_actors/001-Fighter02.png differ diff --git a/img/sv_actors/010-Lancer02.png b/img/sv_actors/010-Lancer02.png new file mode 100644 index 0000000..31d02d8 Binary files /dev/null and b/img/sv_actors/010-Lancer02.png differ diff --git a/img/sv_actors/Estelle.png b/img/sv_actors/Estelle.png new file mode 100644 index 0000000..30a4aef Binary files /dev/null and b/img/sv_actors/Estelle.png differ diff --git a/img/sv_actors/SV_KarateGuy.png b/img/sv_actors/SV_KarateGuy.png new file mode 100644 index 0000000..34735d2 Binary files /dev/null and b/img/sv_actors/SV_KarateGuy.png differ diff --git a/img/sv_actors/Sangokushi01.png b/img/sv_actors/Sangokushi01.png new file mode 100644 index 0000000..0d7ac31 Binary files /dev/null and b/img/sv_actors/Sangokushi01.png differ diff --git a/img/sv_actors/Sangokushi02.png b/img/sv_actors/Sangokushi02.png new file mode 100644 index 0000000..0138440 Binary files /dev/null and b/img/sv_actors/Sangokushi02.png differ diff --git a/img/sv_actors/Sangokushi03.png b/img/sv_actors/Sangokushi03.png new file mode 100644 index 0000000..736dd41 Binary files /dev/null and b/img/sv_actors/Sangokushi03.png differ diff --git a/img/sv_actors/Sangokushi04.png b/img/sv_actors/Sangokushi04.png new file mode 100644 index 0000000..ba88398 Binary files /dev/null and b/img/sv_actors/Sangokushi04.png differ diff --git a/img/sv_actors/Sangokushi05.png b/img/sv_actors/Sangokushi05.png new file mode 100644 index 0000000..0b22b62 Binary files /dev/null and b/img/sv_actors/Sangokushi05.png differ diff --git a/img/sv_actors/Sangokushi06.png b/img/sv_actors/Sangokushi06.png new file mode 100644 index 0000000..d784ed9 Binary files /dev/null and b/img/sv_actors/Sangokushi06.png differ diff --git a/img/sv_actors/Sangokushi07.png b/img/sv_actors/Sangokushi07.png new file mode 100644 index 0000000..ad40049 Binary files /dev/null and b/img/sv_actors/Sangokushi07.png differ diff --git a/img/sv_actors/Sangokushi08.png b/img/sv_actors/Sangokushi08.png new file mode 100644 index 0000000..6e10cb1 Binary files /dev/null and b/img/sv_actors/Sangokushi08.png differ diff --git a/img/sv_actors/Sangokushi09.png b/img/sv_actors/Sangokushi09.png new file mode 100644 index 0000000..812eeca Binary files /dev/null and b/img/sv_actors/Sangokushi09.png differ diff --git a/img/sv_actors/Sangokushi10.png b/img/sv_actors/Sangokushi10.png new file mode 100644 index 0000000..bd9f430 Binary files /dev/null and b/img/sv_actors/Sangokushi10.png differ diff --git a/img/system/Icons.png b/img/system/Icons.png new file mode 100644 index 0000000..e7f6aec Binary files /dev/null and b/img/system/Icons.png differ diff --git a/img/tilesets/Magic_Inside_D.png b/img/tilesets/Magic_Inside_D.png new file mode 100644 index 0000000..67866a6 Binary files /dev/null and b/img/tilesets/Magic_Inside_D.png differ diff --git a/img/tilesets/Magic_Inside_D.txt b/img/tilesets/Magic_Inside_D.txt new file mode 100644 index 0000000..27296a6 --- /dev/null +++ b/img/tilesets/Magic_Inside_D.txt @@ -0,0 +1,256 @@ + +Tapestry E|タペストリーE +Tapestry E(ruins)|タペストリーE(廃墟) +Tapestry F|タペストリーF +Tapestry F(ruins)|タペストリーF(廃墟) +Anatomical chart|解剖図 +Large window E(noon)|大型窓E(昼) +Large window F(night)|大型窓F(夜) +Paperboard (magic team)|張り紙(魔法陣) +Tapestry E|タペストリーE +Tapestry E(ruins)|タペストリーE(廃墟) +Tapestry F|タペストリーF +Tapestry F(ruins)|タペストリーF(廃墟) +Anatomical chart|解剖図 +Large window E(noon)|大型窓E(昼) +Large window F(night)|大型窓F(夜) +Spiderweb(upper right)|蜘蛛の巣(右上) +Portrait C|肖像画C +Dream Catcher|ドリームキャッチャー +Cane|杖 +Witch's clothes (wall hanging)|魔女の服(壁掛け) +Medium size window E|中型窓E +Medium size window F|中型窓F +Medium size window G(ruis)|中型窓G(廃墟) +Spider web (upper left)|蜘蛛の巣(左上) +Portrait D|肖像画D +Dream Catcher|ドリームキャッチャー +lizard|トカゲ +White coat(wall hanging)|白衣(壁掛け) +Medium size window E|中型窓E +Medium size window F|中型窓F +Medium size window G(ruis)|中型窓G(廃墟) +Simple shelf F (black cat)|簡易棚F(黒猫) +Simple shelf G (chemical A)|簡易棚G(薬品A) +Simple shelf H (chemical B)|簡易棚H(薬品B) +Simple shelf I (ointment)|簡易棚I(軟膏) +spider|蜘蛛 +Ornament A (bat)|オーナメントA(コウモリ) +Ornament B (Jack O Lantern)|オーナメントB(ジャック・オー・ランタン) +Ornament B (Jack O Lantern)|オーナメントB(ジャック・オー・ランタン) +Magical plant A|魔法植物A +Magical plant B|魔法植物B +Magical plant C|魔法植物C +Magical plant D|魔法植物D +Attribute object A (fire)|属性オブジェクトA(炎) +Attribute object B (ice)|属性オブジェクトB(氷) +Attribute object C (thunder)|属性オブジェクトC(雷) +Attribute object D (water)|属性オブジェクトD(水) +Magical plant A|魔法植物A +Magical plant B|魔法植物B +Magical plant C|魔法植物C +Magical plant D|魔法植物D +Attribute object A (fire)|属性オブジェクトA(炎) +Attribute object B (ice)|属性オブジェクトB(氷) +Attribute object C (thunder)|属性オブジェクトC(雷) +Attribute object D (water)|属性オブジェクトD(水) +Dissection table|解剖台 +Trash can (garbage)|ゴミ箱(生ゴミ) +Birdcage A|鳥カゴA +Pickled formalin A (table)|ホルマリン漬けA(テーブル) +Attribute object E (Sat)|属性オブジェクトE(土) +Attribute object F (wind)|属性オブジェクトF(風) +Attribute object G (light)|属性オブジェクトG(光) +Attribute object H (dark)|属性オブジェクトH(闇) +Dissection table|解剖台 +Surgical instrument|手術器具 +Birdcage A|鳥カゴA +Pickled formalin A (table)|ホルマリン漬けA(テーブル) +Attribute object E (Sat)|属性オブジェクトE(土) +Attribute object F (wind)|属性オブジェクトF(風) +Attribute object G (light)|属性オブジェクトG(光) +Attribute object H (dark)|属性オブジェクトH(闇) +Crystal A (noon)|水晶A(昼) +Crystal B (evening)|水晶B(夕方) +Crystal C (night)|水晶C(夜) +Crystal D (sea)|水晶D(海) +Crystal E (chaotic)|水晶E(混沌) +Basket E (herbal)|バスケットE(薬草) +Basket E (poisonous)|バスケットE(毒草) +Wooden box H (crystal)|木箱H(クリスタル) +Crushed crystal A (red)|砕けたクリスタルA(赤) +Broken Crystal B (Yellow)|砕けたクリスタルB(黄) +Crushed crystal C (green)|砕けたクリスタルC(緑) +Crushed crystal D (blue)|砕けたクリスタルD(青) +Crushed crystal E (purple)|砕けたクリスタルE(紫) +Crushed crystal F (white)|砕けたクリスタルF(白) +Broken Crystal G (Blue Green)|砕けたクリスタルG(青緑) +Crushed crystal H (rainbow)|砕けたクリスタルH(虹) +Stand Crystal A (Red)|スタンドクリスタルA(赤) +Stand Crystal B (Yellow)|スタンドクリスタルB(黄) +Stand Crystal C (Green)|スタンドクリスタルC(緑) +Stand Crystal D (Blue)|スタンドクリスタルD(青) +Stand Crystal E (purple)|スタンドクリスタルE(紫) +Stand Crystal F (White)|スタンドクリスタルF(白) +Stand Crystal G (Blue Green)|スタンドクリスタルG(青緑) +Stand Crystal H (Rainbow)|スタンドクリスタルH(虹) +Stand Crystal A (Red)|スタンドクリスタルA(赤) +Stand Crystal B (Yellow)|スタンドクリスタルB(黄) +Stand Crystal C (Green)|スタンドクリスタルC(緑) +Stand Crystal D (Blue)|スタンドクリスタルD(青) +Stand Crystal E (purple)|スタンドクリスタルE(紫) +Stand Crystal F (White)|スタンドクリスタルF(白) +Stand Crystal G (Blue Green)|スタンドクリスタルG(青緑) +Stand Crystal H (Rainbow)|スタンドクリスタルH(虹) +Magic team A (blue)|魔法陣A(青) +Magic team A (blue)|魔法陣A(青) +Magic team A (blue)|魔法陣A(青) +Magic team B (red)|魔法陣B(赤) +Magic team B (red)|魔法陣B(赤) +Magic team B (red)|魔法陣B(赤) +Spell pillar A (blue)|呪文の柱A(青) +Spell pillar B (red)|呪文の柱B(赤) +Magic team A (blue)|魔法陣A(青) +Magic team A (blue)|魔法陣A(青) +Magic team A (blue)|魔法陣A(青) +Magic team B (red)|魔法陣B(赤) +Magic team B (red)|魔法陣B(赤) +Magic team B (red)|魔法陣B(赤) +Spell pillar A (blue)|呪文の柱A(青) +Spell pillar B (red)|呪文の柱B(赤) +Magic team A (blue)|魔法陣A(青) +Magic team A (blue)|魔法陣A(青) +Magic team A (blue)|魔法陣A(青) +Magic team B (red)|魔法陣B(赤) +Magic team B (red)|魔法陣B(赤) +Magic team B (red)|魔法陣B(赤) +Broken spell pillar A (blue)|折れた呪文の柱A(青) +Column B (red) broken spell|折れた呪文の柱B(赤) +Fireplace D|暖炉D +Large pan A|大きな鍋A +Large pan A|大きな鍋A +Large pan A|大きな鍋A +Medicine ・ Medicinal herb shelf A|薬品・薬草棚A +Medicine ・ Medicinal herb shelf A|薬品・薬草棚A +Bookcase C|本棚C +Bookcase C|本棚C +Fireplace D|暖炉D +Large pan A|大きな鍋A +Large pan A|大きな鍋A +Large pan A|大きな鍋A +Medicine ・ Medicinal herb shelf A|薬品・薬草棚A +Medicine ・ Medicinal herb shelf A|薬品・薬草棚A +Bookcase C|本棚C +Bookcase C|本棚C +Stone mill|石臼 +Alanvic|アランビック +Mortar|すり鉢 +Powder medicine|粉末薬 +Medicine ・ Medicinal herb shelf B (ruins)|薬品・薬草棚B(廃墟) +Medicine ・ Medicinal herb shelf B (ruins)|薬品・薬草棚B(廃墟) +Bookcase D (ruins)|本棚D(廃墟) +Bookcase D (ruins)|本棚D(廃墟) +Closed magic book A (lower)|閉じた魔導書A(下) +Closed magic book B (top)|閉じた魔導書B(上) +Closed magic book C (left)|閉じた魔導書C(左) +Closed magic book D (right)|閉じた魔導書D(右) +Medicine ・ Medicinal herb shelf B (ruins)|薬品・薬草棚B(廃墟) +Medicine ・ Medicinal herb shelf B (ruins)|薬品・薬草棚B(廃墟) +Bookcase D (ruins)|本棚D(廃墟) +Bookcase D (ruins)|本棚D(廃墟) +Open magic book A (lower)|開いた魔導書A(下) +Open magic book B (top)|開いた魔導書B(上) +Open magic book C (left)|開いた魔導書C(左) +Open magic book D (right)|開いた魔導書D(右) +Rune stone A|ルーン文字の石A +Rune stone B|ルーン文字の石B +A broom|ほうき +Alcohol lamp|アルコールランプ +Laboratory instrument (large)|実験器具(大) +Microscope|顕微鏡 +Liquid filled bottle C|液体入り瓶C +Formalin pickled B (contents of a mystery)|ホルマリン漬けB(謎の中身) +Formalin pickled B (empty)|ホルマリン漬けB(空っぽ) +Upper balance|上皿天秤 +Jack O Lantern A|ジャック・オー・ランタンA +Jack O Lantern B|ジャック・オー・ランタンB +Table D|テーブルD +Drafting table A (blue print)|製図台A(ブループリント) +Drafting table B (design drawing)|製図台B(設計図) +Hat rack|帽子掛け +Chair D (upper)|椅子D(上) +Chair D (right)|椅子D(右) +Chair D (left)|椅子D(左) +Chair D (lower)|椅子D(下) +Table D (leg)|テーブルD(脚) +Drafting base (leg)|製図台(脚) +Memo and pen (spell)|メモとペン(呪文) +Hat rack|帽子掛け +Witch gloves|魔女の手袋 +Witch's shoes|魔女の靴 +Glasses|眼鏡 +Chair D (lower)|椅子D(下) +Skeleton C|骸骨C +A skeleton mountain|骸骨の山 +Tarot card back (3)|タロットカード裏(3枚) +Tarot card back (5)|タロットカード裏(5枚) +Horoscope|ホロスコープ +Horoscope|ホロスコープ +Celestial sphere|天球儀 +Celestial sphere|天球儀 +Page of scattered magical books|散らばった魔導書のページ +Skewered newt|串刺しイモリ +Tarot Card Table (3)|タロットカード表(3枚) +Tarot Card Table (5)|タロットカード表(5枚) +Horoscope|ホロスコープ +Horoscope|ホロスコープ +Celestial sphere|天球儀 +Celestial sphere|天球儀 +Large light ball|大きな光の玉 +Large light ball|大きな光の玉 +Large light ball|大きな光の玉 +Spots A (brown)|シミA(茶) +Carpet G (upper left)|じゅうたんG(左上) +Carpet G (top)|じゅうたんG(上) +Carpet G (upper right)|じゅうたんG(右上) +Carpet G (left)|じゅうたんG(左) +Large light ball|大きな光の玉 +Large light ball|大きな光の玉 +Large light ball|大きな光の玉 +Spot B (red)|シミB(赤) +Carpet G (lower left)|じゅうたんG(左下) +Carpet G (lower)|じゅうたんG(下) +Carpet G (lower right)|じゅうたんG(右下) +Carpet G (right)|じゅうたんG(右) +Bed A (upper)|ベッドA(上) +Bed A (lower)|ベッドA(下) +Bed quilt A (top)|ベッドの掛け布団A(上) +Bed quilt A (lower)|ベッドの掛け布団A(下) +Carpet G (lower right corner)|じゅうたんG(右下角) +Carpet G (lower left corner)|じゅうたんG(左下角) +Carpet G (small ・ left)|じゅうたんG(小・左) +Carpet G (small ・ right)|じゅうたんG(小・右) +Bed A (upper)|ベッドA(上) +Bed A (lower)|ベッドA(下) +Bed quilt A (top)|ベッドの掛け布団A(上) +Bed quilt A (lower)|ベッドの掛け布団A(下) +Carpet G (upper right corner)|じゅうたんG(右上角) +Carpet G (upper left corner)|じゅうたんG(左上角) +Carpet G (Medium)|じゅうたんG(中) +Carpet G (small)|じゅうたんG(小) +Bed A (left)|ベッドA(左) +Bed A (left)|ベッドA(左) +Bed quilt A (left)|ベッドの掛け布団A(左) +Bed quilt A (left)|ベッドの掛け布団A(左) +Carpet E (pattern)|じゅうたんE(模様) +Carpet E (pattern)|じゅうたんE(模様) +Carpet G (pattern)|じゅうたんG(模様) +Carpet G (pattern)|じゅうたんG(模様) +Bed A (right)|ベッドA(右) +Bed A (right)|ベッドA(右) +Bed quilt A (right)|ベッドの掛け布団A(右) +Bed quilt A (right)|ベッドの掛け布団A(右) +Carpet E (pattern)|じゅうたんE(模様) +Carpet E (pattern)|じゅうたんE(模様) +Carpet G (pattern)|じゅうたんG(模様) +Carpet G (pattern)|じゅうたんG(模様) diff --git a/img/tilesets/Magic_Inside_D2.png b/img/tilesets/Magic_Inside_D2.png new file mode 100644 index 0000000..fdc0608 Binary files /dev/null and b/img/tilesets/Magic_Inside_D2.png differ diff --git a/img/tilesets/Magic_Inside_D2.txt b/img/tilesets/Magic_Inside_D2.txt new file mode 100644 index 0000000..883bf0d --- /dev/null +++ b/img/tilesets/Magic_Inside_D2.txt @@ -0,0 +1,256 @@ +Mysterious piano|神秘的なピアノ +Mysterious piano|神秘的なピアノ +Mysterious piano|神秘的なピアノ +Telescope|望遠鏡 +Telescope|望遠鏡 +Bird B (brown bird)|鳥カゴB(茶色い鳥) +Birdcage C (no contents)|鳥カゴC(中身なし) +High table|高めのテーブル +Mysterious piano|神秘的なピアノ +Mysterious piano|神秘的なピアノ +Mysterious piano|神秘的なピアノ +Telescope|望遠鏡 +Telescope|望遠鏡 +Bird B (brown bird)|鳥カゴB(茶色い鳥) +Birdcage C (no contents)|鳥カゴC(中身なし) +High table|高めのテーブル +Magic team C (red)|魔法陣C(赤) +Magic team C (red)|魔法陣C(赤) +Magic team C (red)|魔法陣C(赤) +Magic team D (Yellow)|魔法陣D(黄) +Magic team D (Yellow)|魔法陣D(黄) +Magic team D (Yellow)|魔法陣D(黄) +Attribute object I (flame)|属性オブジェクトI(炎) +Attribute object J (ice)|属性オブジェクトJ(氷) +Magic team C (red)|魔法陣C(赤) +Magic team C (red)|魔法陣C(赤) +Magic team C (red)|魔法陣C(赤) +Magic team D (Yellow)|魔法陣D(黄) +Magic team D (Yellow)|魔法陣D(黄) +Magic team D (Yellow)|魔法陣D(黄) +Attribute object I (flame)|属性オブジェクトI(炎) +Attribute object J (ice)|属性オブジェクトJ(氷) +Magic team C (red)|魔法陣C(赤) +Magic team C (red)|魔法陣C(赤) +Magic team C (red)|魔法陣C(赤) +Magic team D (Yellow)|魔法陣D(黄) +Magic team D (Yellow)|魔法陣D(黄) +Magic team D (Yellow)|魔法陣D(黄) +Attribute object K (thunder)|属性オブジェクトK(雷) +Attribute object L (water)|属性オブジェクトL(水) +Magic team E (green)|魔法陣E(緑) +Magic team E (green)|魔法陣E(緑) +Magic team E (green)|魔法陣E(緑) +Magic team F (blue)|魔法陣F(青) +Magic team F (blue)|魔法陣F(青) +Magic team F (blue)|魔法陣F(青) +Attribute object K (thunder)|属性オブジェクトK(雷) +Attribute object L (water)|属性オブジェクトL(水) +Magic team E (green)|魔法陣E(緑) +Magic team E (green)|魔法陣E(緑) +Magic team E (green)|魔法陣E(緑) +Magic team F (blue)|魔法陣F(青) +Magic team F (blue)|魔法陣F(青) +Magic team F (blue)|魔法陣F(青) +Attribute object M (Sat)|属性オブジェクトM(土) +Attribute object N (wind)|属性オブジェクトN(風) +Magic team E (green)|魔法陣E(緑) +Magic team E (green)|魔法陣E(緑) +Magic team E (green)|魔法陣E(緑) +Magic team F (blue)|魔法陣F(青) +Magic team F (blue)|魔法陣F(青) +Magic team F (blue)|魔法陣F(青) +Attribute object M (Sat)|属性オブジェクトM(土) +Attribute object N (wind)|属性オブジェクトN(風) +Magic team G (purple)|魔法陣G(紫) +Magic team G (purple)|魔法陣G(紫) +Magic team G (purple)|魔法陣G(紫) +Magic team H (white)|魔法陣H(白) +Magic team H (white)|魔法陣H(白) +Magic team H (white)|魔法陣H(白) +Attribute object O (light)|属性オブジェクトO(光) +Attribute object P (dark)|属性オブジェクトP(闇) +Magic team G (purple)|魔法陣G(紫) +Magic team G (purple)|魔法陣G(紫) +Magic team G (purple)|魔法陣G(紫) +Magic team H (white)|魔法陣H(白) +Magic team H (white)|魔法陣H(白) +Magic team H (white)|魔法陣H(白) +Attribute object O (light)|属性オブジェクトO(光) +Attribute object P (dark)|属性オブジェクトP(闇) +Magic team G (purple)|魔法陣G(紫) +Magic team G (purple)|魔法陣G(紫) +Magic team G (purple)|魔法陣G(紫) +Magic team H (white)|魔法陣H(白) +Magic team H (white)|魔法陣H(白) +Magic team H (white)|魔法陣H(白) +Spell pillar C (green)|呪文の柱C(緑) +Spell pillar D (white)|呪文の柱D(白) +Magic team I (blue green)|魔法陣I(青緑) +Magic team I (blue green)|魔法陣I(青緑) +Magic team I (blue green)|魔法陣I(青緑) +Magic team J (rainbow)|魔法陣J(虹) +Magic team J (rainbow)|魔法陣J(虹) +Magic team J (rainbow)|魔法陣J(虹) +Spell pillar C (green)|呪文の柱C(緑) +Spell pillar D (white)|呪文の柱D(白) +Magic team I (blue green)|魔法陣I(青緑) +Magic team I (blue green)|魔法陣I(青緑) +Magic team I (blue green)|魔法陣I(青緑) +Magic team J (rainbow)|魔法陣J(虹) +Magic team J (rainbow)|魔法陣J(虹) +Magic team J (rainbow)|魔法陣J(虹) +Spell pillar C (green)|呪文の柱C(緑) +Spell pillar D (white)|呪文の柱D(白) +Magic team I (blue green)|魔法陣I(青緑) +Magic team I (blue green)|魔法陣I(青緑) +Magic team I (blue green)|魔法陣I(青緑) +Magic team J (rainbow)|魔法陣J(虹) +Magic team J (rainbow)|魔法陣J(虹) +Magic team J (rainbow)|魔法陣J(虹) +Portrait C (Horror)|肖像画C(ホラー) +Portrait D (Horror)|肖像画D(ホラー) +Small magic team A (red)|小さい魔法陣A(赤) +Small magic team B (Yellow)|小さい魔法陣B(黄) +Small magic team C (green)|小さい魔法陣C(緑) +Small magic team D (blue)|小さい魔法陣D(青) +Small magic team E (purple)|小さい魔法陣E(紫) +Small magic team F (white)|小さい魔法陣F(白) +Small magic team G (blue green)|小さい魔法陣G(青緑) +Small magic team H (rainbow)|小さい魔法陣H(虹) +Closed magic book E (bottom)|閉じた魔導書E(下) +Closed magic book F (top)|閉じた魔導書F(上) +Closed magic book G (left)|閉じた魔導書G(左) +Closed magic book H (right)|閉じた魔導書H(右) +Open magic book E (bottom)|開いた魔導書E(下) +Open magic book F (top)|開いた魔導書F(上) +Open magic book G (left)|開いた魔導書G(左) +Open magic book H (right)|開いた魔導書H(右) +Chair E (top)|椅子E(上) +Chair E (right)|椅子E(右) +Chair E (left)|椅子E(左) +Chair E (lower)|椅子E(下) +Chair F (top)|椅子F(上) +Chair F (right)|椅子F(右) +Chair F (left)|椅子F(左) +Chair F (bottom)|椅子F(下) +Chair G (top)|椅子G(上) +Chair G (right)|椅子G(右) +Chair G (left)|椅子G(左) +Chair E (lower)|椅子E(下) +Chair H (upper)|椅子H(上) +Chair H (right)|椅子H(右) +Chair H (left)|椅子H(左) +Chair F (bottom)|椅子F(下) +Large pan B|大きな鍋B +Large pan B|大きな鍋B +Large pan B|大きな鍋B +Chair G (lower)|椅子G(下) +A big dark ball|大きな闇の玉 +A big dark ball|大きな闇の玉 +A big dark ball|大きな闇の玉 +Chair H (lower)|椅子H(下) +Large pan B|大きな鍋B +Large pan B|大きな鍋B +Large pan B|大きな鍋B +Chair G (lower)|椅子G(下) +A big dark ball|大きな闇の玉 +A big dark ball|大きな闇の玉 +A big dark ball|大きな闇の玉 +Chair H (lower)|椅子H(下) +Medicine ・ Medicinal herb shelf C|薬品・薬草棚C +Medicine ・ Medicinal herb shelf C|薬品・薬草棚C +Bookshelf E|本棚E +Bookshelf E|本棚E +Medicine ・ Medicinal herb shelf D|薬品・薬草棚D +Medicine ・ Medicinal herb shelf D|薬品・薬草棚D +Bookcase F|本棚F +Bookcase F|本棚F +Medicine ・ Medicinal herb shelf C|薬品・薬草棚C +Medicine ・ Medicinal herb shelf C|薬品・薬草棚C +Bookshelf E|本棚E +Bookshelf E|本棚E +Medicine ・ Medicinal herb shelf D|薬品・薬草棚D +Medicine ・ Medicinal herb shelf D|薬品・薬草棚D +Bookcase F|本棚F +Bookcase F|本棚F +Medicine ・ Medicinal herb shelf E (ruins)|薬品・薬草棚E(廃墟) +Medicine ・ Medicinal herb shelf E (ruins)|薬品・薬草棚E(廃墟) +Bookcase G (ruins)|本棚G(廃墟) +Bookcase G (ruins)|本棚G(廃墟) +Medicine ・ Medicinal herb shelf F (ruins)|薬品・薬草棚F(廃墟) +Medicine ・ Medicinal herb shelf F (ruins)|薬品・薬草棚F(廃墟) +Bookshelf H (ruins)|本棚H(廃墟) +Bookshelf H (ruins)|本棚H(廃墟) +Medicine ・ Medicinal herb shelf E (ruins)|薬品・薬草棚E(廃墟) +Medicine ・ Medicinal herb shelf E (ruins)|薬品・薬草棚E(廃墟) +Bookcase G (ruins)|本棚G(廃墟) +Bookcase G (ruins)|本棚G(廃墟) +Medicine ・ Medicinal herb shelf F (ruins)|薬品・薬草棚F(廃墟) +Medicine ・ Medicinal herb shelf F (ruins)|薬品・薬草棚F(廃墟) +Bookshelf H (ruins)|本棚H(廃墟) +Bookshelf H (ruins)|本棚H(廃墟) +Bed B (upper)|ベッドB(上) +Bed B (bottom)|ベッドB(下) +Bed quilt B (top)|ベッドの掛け布団B(上) +Bed quilt B (lower)|ベッドの掛け布団B(下) +Bed C (upper)|ベッドC(上) +Bed C (lower)|ベッドC(下) +Bed quilt C (top)|ベッドの掛け布団C(上) +Bed quilt C (lower)|ベッドの掛け布団C(下) +Bed B (upper)|ベッドB(上) +Bed B (bottom)|ベッドB(下) +Bed quilt B (top)|ベッドの掛け布団B(上) +Bed quilt B (lower)|ベッドの掛け布団B(下) +Bed C (upper)|ベッドC(上) +Bed C (lower)|ベッドC(下) +Bed quilt C (top)|ベッドの掛け布団C(上) +Bed quilt C (lower)|ベッドの掛け布団C(下) +Bed B (left)|ベッドB(左) +Bed B (left)|ベッドB(左) +Bed quilt B (left)|ベッドの掛け布団B(左) +Bed quilt B (left)|ベッドの掛け布団B(左) +Bed C (left)|ベッドC(左) +Bed C (left)|ベッドC(左) +Bed quilt C (left)|ベッドの掛け布団C(左) +Bed quilt C (left)|ベッドの掛け布団C(左) +Bed B (right)|ベッドB(右) +Bed B (right)|ベッドB(右) +Bed quilt B (right)|ベッドの掛け布団B(右) +Bed quilt B (right)|ベッドの掛け布団B(右) +Bed C (right)|ベッドC(右) +Bed C (right)|ベッドC(右) +Bed quilt C (right)|ベッドの掛け布団C(右) +Bed quilt C (right)|ベッドの掛け布団C(右) +Carpet H (upper left)|じゅうたんH(左上) +Carpet H (top)|じゅうたんH(上) +Carpet H (upper right)|じゅうたんH(右上) +Carpet H (left)|じゅうたんH(左) +Carpet I (upper left)|じゅうたんI(左上) +Carpet I (top)|じゅうたんI(上) +Carpet I (upper right)|じゅうたんI(右上) +Carpet I (left)|じゅうたんI(左) +Carpet H (bottom left)|じゅうたんH(左下) +Carpet H (bottom)|じゅうたんH(下) +Carpet H (lower right)|じゅうたんH(右下) +Carpet H (right)|じゅうたんH(右) +Carpet I (lower left)|じゅうたんI(左下) +Carpet I (Bottom)|じゅうたんI(下) +Carpet I (lower right)|じゅうたんI(右下) +Carpet I (right)|じゅうたんI(右) +Carpet H (lower right corner)|じゅうたんH(右下角) +Carpet H (lower left corner)|じゅうたんH(左下角) +Carpet H (small left)|じゅうたんH(小・左) +Carpet H (small right)|じゅうたんH(小・右) +Carpet I (lower right corner)|じゅうたんI(右下角) +Carpet I (lower left corner)|じゅうたんI(左下角) +Carpet I (small left)|じゅうたんI(小・左) +Carpet I (small right)|じゅうたんI(小・右) +Carpet H (upper right corner)|じゅうたんH(右上角) +Carpet H (upper left corner)|じゅうたんH(左上角) +Carpet H (Medium)|じゅうたんH(中) +Carpet H (Small)|じゅうたんH(小) +Carpet I (upper right corner)|じゅうたんI(右上角) +Carpet I (upper left corner)|じゅうたんI(左上角) +Carpet I (Medium)|じゅうたんI(中) +Carpet I (Small)|じゅうたんI(小) diff --git a/img/tilesets/Magic_Outside_D.png b/img/tilesets/Magic_Outside_D.png new file mode 100644 index 0000000..dfaeecc Binary files /dev/null and b/img/tilesets/Magic_Outside_D.png differ diff --git a/img/tilesets/Magic_Outside_D.txt b/img/tilesets/Magic_Outside_D.txt new file mode 100644 index 0000000..520b1ec --- /dev/null +++ b/img/tilesets/Magic_Outside_D.txt @@ -0,0 +1,264 @@ +Rail (stone)|柵(石) +Rail (stone)|柵(石) +Rail (stone)|柵(石) +Rail (wood)|柵(木材) +Rail (wood)|柵(木材) +Rail (wood)|柵(木材) +Fence decoration (wood)|柵の飾り(木材) +Fence decoration (wood)|柵の飾り(木材) +Rail (stone)|柵(石) +Rail (stone)|柵(石) +Rail (stone)|柵(石) +Rail (wood)|柵(木材) +Rail (wood)|柵(木材) +Rail (wood)|柵(木材) +Fence decoration (wood)|柵の飾り(木材) +Fence decoration (wood)|柵の飾り(木材) +Rail (stone)|柵(石) +Rail (stone)|柵(石) +Rail (stone)|柵(石) +Rail (wood)|柵(木材) +Rail (wood)|柵(木材) +Rail (wood)|柵(木材) +Fence decoration (wood)|柵の飾り(木材) +Fence decoration (wood)|柵の飾り(木材) +Fence decoration (stone)|柵の飾り(石) +Fence decoration (stone)|柵の飾り(石) +Stairs (wood)|階段(木材) +Stairs (wood)|階段(木材) +Stairs (wood)|階段(木材) +Stairs (wood)|階段(木材) +Fence decoration (wood)|柵の飾り(木材) +Fence decoration (wood)|柵の飾り(木材) +Fence decoration (stone)|柵の飾り(石) +Fence decoration (stone)|柵の飾り(石) +| +| +Distorted lattice window|歪んだ格子窓 +Distorted window|歪んだ窓 +Distorted door (open)|歪んだ扉(開) +Distorted door (closed)|歪んだ扉(閉) +Fence decoration (stone)|柵の飾り(石) +Fence decoration (stone)|柵の飾り(石) +| +| +Distorted lattice window|歪んだ格子窓 +Distorted window|歪んだ窓 +Distorted door (open)|歪んだ扉(開) +Distorted door (closed)|歪んだ扉(閉) +Fence decoration (stone)|柵の飾り(石) +Fence decoration (stone)|柵の飾り(石) +| +Distorted roof (navy)|歪んだ屋根(紺) +Distorted roof (navy)|歪んだ屋根(紺) +Distorted roof (navy)|歪んだ屋根(紺) +| +| +| +Distorted pillars|歪んだ柱 +Distorted pillars|歪んだ柱 +Distorted roof (navy)|歪んだ屋根(紺) +Distorted roof (navy)|歪んだ屋根(紺) +Distorted roof (navy)|歪んだ屋根(紺) +Distorted pillars|歪んだ柱 +Distorted pillars|歪んだ柱 +| +Distorted pillars|歪んだ柱 +Distorted pillars|歪んだ柱 +Distorted roof (navy)|歪んだ屋根(紺) +Distorted roof (navy)|歪んだ屋根(紺) +Distorted roof (navy)|歪んだ屋根(紺) +Distorted pillars|歪んだ柱 +Distorted pillars|歪んだ柱 +| +| +Chimney|煙突 +Distorted roof (navy)|歪んだ屋根(紺) +Distorted roof (navy)|歪んだ屋根(紺) +Distorted roof (navy)|歪んだ屋根(紺) +Chimney|煙突 +| +| +| +Chimney|煙突 +Distorted roof (navy)|歪んだ屋根(紺) +Distorted roof (navy)|歪んだ屋根(紺) +Distorted roof (navy)|歪んだ屋根(紺) +Chimney|煙突 +| +| +| +Distorted roof (navy)|歪んだ屋根(紺) +Distorted roof (navy)|歪んだ屋根(紺) +Distorted roof (navy)|歪んだ屋根(紺) +Distorted roof (navy)|歪んだ屋根(紺) +Distorted roof (navy)|歪んだ屋根(紺) +| +| +| +Distorted roof (navy)|歪んだ屋根(紺) +Distorted roof (navy)|歪んだ屋根(紺) +Distorted roof (navy)|歪んだ屋根(紺) +Distorted roof (navy)|歪んだ屋根(紺) +Distorted roof (navy)|歪んだ屋根(紺) +| +| +| +Distorted roof (navy)|歪んだ屋根(紺) +Distorted roof (navy)|歪んだ屋根(紺) +Distorted roof (navy)|歪んだ屋根(紺) +Distorted roof (navy)|歪んだ屋根(紺) +Distorted roof (navy)|歪んだ屋根(紺) +| +| +| +Distorted roof (navy)|歪んだ屋根(紺) +Distorted roof (navy)|歪んだ屋根(紺) +| +Distorted roof (navy)|歪んだ屋根(紺) +Distorted roof (navy)|歪んだ屋根(紺) +| +| +| +Distorted roof (navy)|歪んだ屋根(紺) +| +| +| +Distorted roof (navy)|歪んだ屋根(紺) +| +Sign of vine with entanglement|蔦絡みの看板 +Signboard of vine with entanglement (sword)|蔦絡みの看板(剣) +Vine entwined sign (sword and shield)|蔦絡みの看板(剣と盾) +| +| +| +| +| +Signboard of ivy tangle (dining room)|蔦絡みの看板(食堂) +Signboard of ivy tangle (magic team)|蔦絡みの看板(魔法陣) +Signboard of ivy tangle (cane)|蔦絡みの看板(杖) +Distorted roof (blue)|歪んだ屋根(青) +Distorted roof (blue)|歪んだ屋根(青) +Distorted roof (blue)|歪んだ屋根(青) +| +| +Signboard of vine (armor)|蔦絡みの看板(鎧) +Signboard of ivy tangle (bag)|蔦絡みの看板(袋) +Signboard of ivy tangle (pot)|蔦絡みの看板(ポット) +Distorted roof (blue)|歪んだ屋根(青) +Distorted roof (blue)|歪んだ屋根(青) +Distorted roof (blue)|歪んだ屋根(青) +| +| +Signboard of ivy tangle (coin)|蔦絡みの看板(コイン) +Viva entangled sign (necklace)|蔦絡みの看板(ネックレス) +Signboard of ivy tangle (hammer)|蔦絡みの看板(ハンマー) +Distorted roof (blue)|歪んだ屋根(青) +Distorted roof (blue)|歪んだ屋根(青) +Distorted roof (blue)|歪んだ屋根(青) +| +| +Signboard of ivy entanglement (inn)|蔦絡みの看板(宿屋) +Signboard of vine (pub)|蔦絡みの看板(酒場) +Vine entwined sign (coat of arms)|蔦絡みの看板(紋章) +Distorted roof (blue)|歪んだ屋根(青) +Distorted roof (blue)|歪んだ屋根(青) +Distorted roof (blue)|歪んだ屋根(青) +| +| +Container of wooden box (plant)|木箱の容器(植物) +Containers of wooden boxes (suspicious plants)|木箱の容器(怪しい植物) +Container of wooden box (skull)|木箱の容器(ドクロ) +Distorted roof (blue)|歪んだ屋根(青) +Distorted roof (blue)|歪んだ屋根(青) +Distorted roof (blue)|歪んだ屋根(青) +| +| +| +Distorted roof (blue)|歪んだ屋根(青) +Distorted roof (blue)|歪んだ屋根(青) +Distorted roof (blue)|歪んだ屋根(青) +Distorted roof (blue)|歪んだ屋根(青) +Distorted roof (blue)|歪んだ屋根(青) +| +| +| +| +Distorted roof (blue)|歪んだ屋根(青) +Distorted roof (blue)|歪んだ屋根(青) +Distorted roof (blue)|歪んだ屋根(青) +Distorted roof (blue)|歪んだ屋根(青) +Distorted roof (blue)|歪んだ屋根(青) +| +| +| +Distorted roof (blue)|歪んだ屋根(青) +Distorted roof (blue)|歪んだ屋根(青) +Distorted roof (blue)|歪んだ屋根(青) +Distorted roof (blue)|歪んだ屋根(青) +Distorted roof (blue)|歪んだ屋根(青) +| +| +| +Distorted roof (blue)|歪んだ屋根(青) +Distorted roof (blue)|歪んだ屋根(青) +| +Distorted roof (blue)|歪んだ屋根(青) +Distorted roof (blue)|歪んだ屋根(青) +| +Skull mountain|ドクロの山 +Skull mountain|ドクロの山 +Distorted roof (blue)|歪んだ屋根(青) +| +| +| +Distorted roof (blue)|歪んだ屋根(青) +| +Skull mountain|ドクロの山 +Skull mountain|ドクロの山 +Ivy|ツタ +Ivy|ツタ +Ivy|ツタ +Ivy|ツタ +Ivy|ツタ +| +Skull mountain|ドクロの山 +Skull mountain|ドクロの山 +Ivy|ツタ +Ivy|ツタ +Ivy|ツタ +Ivy|ツタ +Ivy|ツタ +| +A mountain of stone|石の山 +A mountain of stone|石の山 +Ivy|ツタ +Ivy|ツタ +Ivy|ツタ +Ivy|ツタ +Ivy|ツタ +| +A mountain of stone|石の山 +A mountain of stone|石の山 +| +| +| +| +| +| +A mountain of stone|石の山 +A mountain of stone|石の山 +| +| +| +| +| +| +A mountain of stone|石の山 +A mountain of stone|石の山 +| +| +| +| +| +| \ No newline at end of file diff --git a/img/tilesets/Sifi_Inside_D.png b/img/tilesets/Sifi_Inside_D.png new file mode 100644 index 0000000..0997a5a Binary files /dev/null and b/img/tilesets/Sifi_Inside_D.png differ diff --git a/img/tilesets/Sifi_Inside_D.txt b/img/tilesets/Sifi_Inside_D.txt new file mode 100644 index 0000000..f51427b --- /dev/null +++ b/img/tilesets/Sifi_Inside_D.txt @@ -0,0 +1,256 @@ +Transparent|透明 +The sun|太陽 +Mercury|水星 +Venus|金星 +The earth|地球 +Moon|月 +Mars|火星 +Jupiter|木星 +Saturn|土星 +Saturn|土星 +Saturn|土星 +Uranus|天王星 +Neptune|海王星 +Pluto|冥王星 +Light of the sun|太陽の光 +Asteroid|小惑星 +Imaginary planet|架空の惑星 +Imaginary planet|架空の惑星 +Imaginary planet|架空の惑星 +Imaginary planet|架空の惑星 +Artificial planet|人工惑星 +Comet|彗星 +Comet|彗星 +Aircraft station (vertical)|航宙機発着場(縦) +Space Station|宇宙ステーション +Space Station|宇宙ステーション +Space Station|宇宙ステーション +Satellite|人工衛星 +A ship|航宙艦 +A ship|航宙艦 +Crater|クレーター +Aircraft station (vertical)|航宙機発着場(縦) +Debris|デブリ +Asteroids|小惑星群 +Induction light (sideways)|誘導灯(横) +Induction light (vertical)|誘導灯(縦) +Aircraft departure and arrival landing (sideways)|航宙機発着場(横) +Aircraft departure and arrival landing (sideways)|航宙機発着場(横) +Aircraft departure and arrival landing (sideways)|航宙機発着場(横) +Aircraft station (vertical)|航宙機発着場(縦) +Capsule type bed (sideways) case|カプセル型ベッド(横)ケース +Capsule type bed (sideways) case|カプセル型ベッド(横)ケース +Capsule type bed (sideways) case|カプセル型ベッド(横)ケース +Capsule type bed (vertical) case|カプセル型ベッド(縦)ケース +Capsule type bed (vertical) |カプセル型ベッド(縦) +Hatch Door|ハッチドア +Hatch|ハッチ +Hatch Door|ハッチドア +Capsule type bed (sideways)|カプセル型ベッド(横) +Capsule type bed (sideways)|カプセル型ベッド(横) +Capsule type bed (sideways)|カプセル型ベッド(横) +Capsule type bed (vertical) case|カプセル型ベッド(縦)ケース +Capsule type bed (vertical)|カプセル型ベッド(縦) +Hatch|ハッチ +Hatch|ハッチ +Hatch|ハッチ +Capsule type bed (sideways)|カプセル型ベッド(横) +Capsule type bed (sideways)|カプセル型ベッド(横) +Capsule type bed (sideways)|カプセル型ベッド(横) +Capsule type bed (vertical) case|カプセル型ベッド(縦)ケース +Capsule type bed (vertical)|カプセル型ベッド(縦) +| +Hatch|ハッチ +| +Aerial projection type imaging device|空中投影型映像装置 +Aerial projection type imaging device|空中投影型映像装置 +Aerial projection type imaging device|空中投影型映像装置 +Imaging device|映像装置 +Imaging device|映像装置 +Imaging device|映像装置 +Monitor display|モニタ表示 +Monitor display|モニタ表示 +Aerial projection type imaging device|空中投影型映像装置 +Aerial projection type imaging device|空中投影型映像装置 +Aerial projection type imaging device|空中投影型映像装置 +Imaging device|映像装置 +Imaging device|映像装置 +Imaging device|映像装置 +Monitor display|モニタ表示 +Monitor display|モニタ表示 +Aerial projection type imaging device|空中投影型映像装置 +Aerial projection type imaging device|空中投影型映像装置 +Aerial projection type imaging device|空中投影型映像装置 +Imaging device|映像装置 +Imaging device|映像装置 +Imaging device|映像装置 +Monitor display|モニタ表示 +Monitor display|モニタ表示 +Space display|宙域表示装置 +Space display|宙域表示装置 +Space display|宙域表示装置 +Monitor display|モニタ表示 +Monitor display|モニタ表示 +Monitor display|モニタ表示 +Monitor display|モニタ表示 +Monitor display|モニタ表示 +Space display|宙域表示装置 +Space display|宙域表示装置 +Space display|宙域表示装置 +Monitor display|モニタ表示 +Monitor display|モニタ表示 +Monitor display|モニタ表示 +Monitor display|モニタ表示 +Vending machine|自動販売機 +Space display|宙域表示装置 +Space display|宙域表示装置 +Space display|宙域表示装置 +Monitor display|モニタ表示 +Monitor display|モニタ表示 +Monitor display|モニタ表示 +Monitor display|モニタ表示 +Vending machine|自動販売機 +Small picture device|小型映像装置 +Small picture device|小型映像装置 +Small picture device|小型映像装置 +Small picture device|小型映像装置 +Small picture device|小型映像装置 +Small picture device|小型映像装置 +Personal computer (sideways)|パソコン(横) +Personal computer (sideways)|パソコン(横) +Personal computer (front)|パソコン(前) +Personal computer (front)|パソコン(前) +Personal computer (front)|パソコン(前) +Personal computer (front)|パソコン(前) +Personal computer (back)|パソコン(後) +Personal computer (back)|パソコン(後) +Personal computer (sideways)|パソコン(横) +Personal computer (sideways)|パソコン(横) +Desk|デスク +Desk|デスク +Desk|デスク +Desk|デスク +Desk|デスク +Desk|デスク +Small aerial projection type imaging device|小型空中投影型映像装置 +Small aerial projection type imaging device|小型空中投影型映像装置 +Radar|レーダー +Emergency button|緊急用ボタン +Emergency button|緊急用ボタン +Emergency button|緊急用ボタン +| +Chair (horizontal) for display adjustment|椅子(横)表示調整用 +Chair (horizontal) for display adjustment|椅子(横)表示調整用 +| +Curved desk|曲線デスク +Curved desk|曲線デスク +Large desk|大型デスク +Curved desk|曲線デスク +Curved desk|曲線デスク +Chair (sideways)|椅子(横) +Chair (sideways)|椅子(横) +Chair (back)|椅子(後) +Curved desk|曲線デスク +Curved desk|曲線デスク +Aerial projection type keyboard (after)|空中投影型キーボード(後) +Curved desk|曲線デスク +Curved desk|曲線デスク +Chair (sideways)|椅子(横) +Chair (sideways)|椅子(横) +Chair (back)|椅子(後) +Desk (Vertical)|デスク(縦) +Captain device|艦長用デバイス +Captain's chair (after)|艦長用椅子(後) +Captain device|艦長用デバイス +Desk (vertical) end|デスク(縦)端 +Captain device|艦長用デバイス +Captain's chair (front)|艦長用椅子(前) +Captain device|艦長用デバイス +Small space display|小型宙域表示装置 +Captain device|艦長用デバイス +Captain's chair (after)|艦長用椅子(後) +Captain device|艦長用デバイス +Desk (vertical) end|デスク(縦)端 +Captain device|艦長用デバイス +Captain's chair (front)|艦長用椅子(前) +Captain device|艦長用デバイス +Curved desk|曲線デスク +Curved desk|曲線デスク +Aerial projection type keyboard (front)|空中投影型キーボード(前) +Curved desk|曲線デスク +Curved desk|曲線デスク +Standalone imaging equipment (sideways)|スタンドアロン映像装置(横) +Stand-alone imaging equipment (front)|スタンドアロン映像装置(前) +Standalone imaging equipment (sideways)|スタンドアロン映像装置(横) +Curved desk|曲線デスク +Curved desk|曲線デスク +Large desk|大型デスク +Curved desk|曲線デスク +Curved desk|曲線デスク +Standalone imaging equipment (sideways)|スタンドアロン映像装置(横) +Stand-alone imaging equipment (front)|スタンドアロン映像装置(前) +Standalone imaging equipment (sideways)|スタンドアロン映像装置(横) +Transfer device (back)|転送装置(後) +Transfer device (back)|転送装置(後) +Transfer device (back)|転送装置(後) +Transfer device (front)|転送装置(前) +Transfer device (front)|転送装置(前) +Transfer device (front)|転送装置(前) +Large computer (sideways)|大型コンピューター(横) +Large computer (sideways)|大型コンピューター(横) +Transfer device (back)|転送装置(後) +Transfer device (back)|転送装置(後) +Transfer device (back)|転送装置(後) +Transfer device (front)|転送装置(前) +Transfer device (front)|転送装置(前) +Transfer device (front)|転送装置(前) +Large computer (sideways)|大型コンピューター(横) +Large computer (sideways)|大型コンピューター(横) +Transfer device (back)|転送装置(後) +Transfer device (back)|転送装置(後) +Transfer device (back)|転送装置(後) +Transfer device (front)|転送装置(前) +Transfer device (front)|転送装置(前) +Transfer device (front)|転送装置(前) +Treasure Chest|宝箱 +Large computer (front)|大型コンピューター(前) +Transfer device (back)|転送装置(後) +Transfer device (back)|転送装置(後) +Transfer device (back)|転送装置(後) +Transfer device (front)|転送装置(前) +Transfer device (front)|転送装置(前) +Transfer device (front)|転送装置(前) +Treasure Chest|宝箱 +Large computer (front)|大型コンピューター(前) +Ring type transfer device|リング型転送装置 +Ring type transfer device|リング型転送装置 +Ring type transfer device|リング型転送装置 +Large culture layer|大型培養層 +Large culture layer|大型培養層 +Large culture layer|大型培養層 +Commercial culture layer|汎用培養層 +Broken floor|壊れた床 +Ring type transfer device|リング型転送装置 +Ring type transfer device|リング型転送装置 +Ring type transfer device|リング型転送装置 +Large culture layer|大型培養層 +Large culture layer|大型培養層 +Large culture layer|大型培養層 +Commercial culture layer|汎用培養層 +Broken floor|壊れた床 +Ring type transfer device|リング型転送装置 +Ring type transfer device|リング型転送装置 +Ring type transfer device|リング型転送装置 +Large culture layer|大型培養層 +Large culture layer|大型培養層 +Large culture layer|大型培養層 +Commercial culture layer|汎用培養層 +Broken floor|壊れた床 +Floor Joint|床面ジョイント +Floor Joint|床面ジョイント +Floor Joint|床面ジョイント +Large culture layer|大型培養層 +Large culture layer|大型培養層 +Large culture layer|大型培養層 +Broken floor|壊れた床 +Broken floor|壊れた床 diff --git a/img/tilesets/Sifi_Outside_D.png b/img/tilesets/Sifi_Outside_D.png new file mode 100644 index 0000000..524ae26 Binary files /dev/null and b/img/tilesets/Sifi_Outside_D.png differ diff --git a/img/tilesets/Sifi_Outside_D.txt b/img/tilesets/Sifi_Outside_D.txt new file mode 100644 index 0000000..8a31d13 --- /dev/null +++ b/img/tilesets/Sifi_Outside_D.txt @@ -0,0 +1,256 @@ +Transparent|透明 +| +Rocket: Satellite fairing|ロケット:衛星フェアリング +Rocket: Satellite fairing|ロケット:衛星フェアリング +Rocket: Satellite fairing|ロケット:衛星フェアリング +| +| +| +Flag sticker (green yellow)|旗ステッカー(緑・黄) +Flag sticker (striped white)|旗ステッカー(縞・白) +Rocket: Satellite fairing|ロケット:衛星フェアリング +Rocket: Satellite fairing|ロケット:衛星フェアリング +Rocket: Satellite fairing|ロケット:衛星フェアリング +| +| +| +Flag sticker (white red)|旗ステッカー(白・赤) +Flag sticker (red yellow)|旗ステッカー(赤・黄) +Rocket: Satellite fairing|ロケット:衛星フェアリング +Rocket: Satellite fairing|ロケット:衛星フェアリング +Rocket: Satellite fairing|ロケット:衛星フェアリング +Hose (Orange)|ホース(橙) +Hose (Orange)|ホース(橙) +Hose (Orange)|ホース(橙) +Flag sticker (red white)|旗ステッカー(赤・白) +Flag sticker (blue red white)|旗ステッカー(青赤・白) +Rocket: Satellite fairing separation surface|ロケット:衛星フェアリング分離面 +Rocket: Satellite fairing separation surface|ロケット:衛星フェアリング分離面 +Rocket: Satellite fairing separation surface|ロケット:衛星フェアリング分離面 +Hose (blue)|ホース(青) +Hose (blue)|ホース(青) +Hose (blue)|ホース(青) +Logotype sticker|ロゴタイプステッカー +| +Rocket: second stage|ロケット:第2段 +Rocket: second stage|ロケット:第2段 +Rocket: second stage|ロケット:第2段 +Power cable|電源ケーブル +Power cable|電源ケーブル +Power cable|電源ケーブル +Aircraft name sticker|機体名ステッカー +| +Rocket: First stage|ロケット:第1段 +Rocket: First stage|ロケット:第1段 +Rocket: First stage|ロケット:第1段 +Power cable|電源ケーブル +Power cable|電源ケーブル +Power cable|電源ケーブル +Aircraft name sticker|機体名ステッカー +| +Rocket: First stage|ロケット:第1段 +Rocket: First stage|ロケット:第1段 +Rocket: First stage|ロケット:第1段 +| +| +| +Logo Mark Sticker|ロゴマークステッカー +Rocket Booster (left)|ロケットブースター(左) +Rocket: First stage|ロケット:第1段 +Rocket: First stage|ロケット:第1段 +Rocket: First stage|ロケット:第1段 +Rocket Booster (Right)|ロケットブースター(右) +Rocket Booster|ロケットブースター +| +| +Rocket Booster (left)|ロケットブースター(左) +Rocket: First stage Booster strut|ロケット:第1段・ブースター支柱 +Rocket Booster (front)|ロケットブースター(手前) +Rocket: First stage Booster strut|ロケット:第1段・ブースター支柱 +Rocket Booster (Right)|ロケットブースター(右) +Rocket Booster|ロケットブースター +| +| +Rocket Booster (left)|ロケットブースター(左) +Rocket: First stage Booster strut|ロケット:第1段・ブースター支柱 +Rocket Booster (front)|ロケットブースター(手前) +Rocket: First stage Booster strut|ロケット:第1段・ブースター支柱 +Rocket Booster (Right)|ロケットブースター(右) +Rocket Booster|ロケットブースター +| +| +| +Rocket: First stage engine|ロケット:第1段エンジン +Rocket Booster (front)|ロケットブースター(手前) +Rocket: First stage engine|ロケット:第1段エンジン +Rocket: Shadow|ロケット:影 +| +| +Lightning rod: tip|避雷針:先端 +Lightning rod: tip|避雷針:先端 +Lightning rod: tip|避雷針:先端 +Lightning rod: tip|避雷針:先端 +| +| +| +| +Lightning rod: tip|避雷針:先端 +Lightning rod: tip|避雷針:先端 +Lightning rod: tip|避雷針:先端 +Lightning rod: tip|避雷針:先端 +Move launching pad (wall)|移動発射台(壁) +Move launching pad (floor)|移動発射台(床) +Move launching pad (wall)|移動発射台(壁) +| +Lightning rod|避雷針 +Lightning rod|避雷針 +Lightning rod|避雷針 +Lightning rod|避雷針 +Move launching pad (wall)|移動発射台(壁) +Move launching pad (wall)|移動発射台(壁) +Move launching pad (wall)|移動発射台(壁) +| +Lightning rod (lower part)|避雷針(下部) +Lightning rod (lower part)|避雷針(下部) +Lightning rod (lower part)|避雷針(下部) +Lightning rod (lower part)|避雷針(下部) +Move launch table (lower part)|移動発射台(下部) +Move launching pad (wall / window)|移動発射台(壁・窓) +Move launch table (lower part)|移動発射台(下部) +| +Lightning rod (lower part)|避雷針(下部) +Lightning rod (lower part)|避雷針(下部) +Lightning rod (lower part)|避雷針(下部) +Lightning rod (lower part)|避雷針(下部) +Move launch table (lower part)|移動発射台(下部) +Move launch table (lower part)|移動発射台(下部) +Move launch table (lower part)|移動発射台(下部) +| +| +| + +| +Yellow line (left)|黄ライン(左) +Yellow line (right)|黄ライン(右) +Yellow line (cross)|黄ライン(十字) +| +| +| +| +| +Yellow line (bottom)|黄ライン(下) +Huang line (top)|黄ライン(上) +Yellow line (rectangle)|黄ライン(矩形) +| +| +| +| +| +Move launcher deck side door (yellow)|移動発射台デッキ側面ドア(黄) +Move launcher deck side|移動発射台デッキ側面 +Move launcher deck side door (blue)|移動発射台デッキ側面ドア(青) +| +| +| +| +| +Dolly (left)|ドーリー(左) +Move launcher stand Deck side lower part|移動発射台デッキ側面下部 +Dolly (right)|ドーリー(右) +| +| +| +| +| +| +| +| +| +Antenna|アンテナ +Antenna|アンテナ +Antenna|アンテナ +Radar|レーダー +Radar|レーダー +Radar|レーダー +Missile|ミサイル +| +Antenna|アンテナ +Antenna|アンテナ +Antenna|アンテナ +Radar|レーダー +Radar|レーダー +Radar|レーダー +Missile|ミサイル +| +Antenna|アンテナ +Antenna|アンテナ +Antenna|アンテナ +Radar|レーダー +Radar|レーダー +Radar|レーダー +Missile|ミサイル +| +Antenna|アンテナ +Antenna|アンテナ +Antenna|アンテナ +Radar|レーダー +Radar|レーダー +Radar|レーダー +Missile|ミサイル +| +Missile launch vehicle|ミサイル発射車両 +Missile launch vehicle|ミサイル発射車両 +Missile launch vehicle|ミサイル発射車両 +| +| +| +Missile|ミサイル +| +Missile launch vehicle|ミサイル発射車両 +Missile launch vehicle|ミサイル発射車両 +Missile launch vehicle|ミサイル発射車両 +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| \ No newline at end of file diff --git a/js/plugins/AltMenuScreen2.js b/js/plugins/AltMenuScreen2.js new file mode 100644 index 0000000..960461f --- /dev/null +++ b/js/plugins/AltMenuScreen2.js @@ -0,0 +1,192 @@ +//============================================================================= +// AltMenuScreen2.js +//============================================================================= + +/*: + * @plugindesc Alternative menu screen layout. + * @author Yoji Ojima, Sasuke KANNAZUKI + * + * @param backGroundBitmap + * @desc background bitmap file at img/pictures. + * @default + * + * @param maxColsMenu + * @desc max column at menu window + * @default 4 + * + * @param commandRows + * @desc number of visible rows at command window + * @default 2 + * + * @param isDisplayStatus + * @desc whether display status or not. (1 = yes, 0 = no) + * @default 0 + * + * @help This plugin does not provide plugin commands. + * The differences with AltMenuscreen are follows: + * - windows are transparent + * - it can set the menu's background bitmap. + * - picture is actors' original + * + * Actor' note: + * set actor's standing picture at menu. + * put file at img/pictures. + * + * preferred size of actor's picture: + * width: 174px(maxColsMenu=4), 240px(maxColsMenu=3) + * height: 408px(commandRows=2), 444px(commandRows=1) + */ + +/*:ja + * @plugindesc レイアウトの異なるメニュー画面 + * @author Yoji Ojima, 神無月サスケ + * + * @param backGroundBitmap + * @desc 背景にするビットマップファイルです。 + * img/pictures に置いてください。 + * @default + * + * @param maxColsMenu + * @desc アクターを表示するウィンドウの1画面の登録最大数です。 + * @default 4 + * + * @param commandRows + * @desc コマンドウィンドウの行数です。 + * @default 2 + * + * @param isDisplayStatus + * @desc ステータスを表示するかしないかを選びます。(1 = yes, 0 = no) + * @default 0 + * + * @help このプラグインには、プラグインコマンドはありません。 + * + * AltMenuscreen との違いは以下です: + * - ウィンドウが透明です + * - 背景ビットマップを付けることが出来ます。 + * - アクターに立ち絵を利用します。 + * + * アクターのメモに以下のように書いてください: + * ファイル名が、そのアクターの立ち絵になります。 + * ファイルは img/pictures に置いてください。 + * + * 望ましいアクター立ち絵のサイズ: + * 幅:3列:240px, 4列:174px + * 高さ: コマンドウィンドウ 1行:444px 2行:408px + * + */ + +(function() { + + // set parameters + var parameters = PluginManager.parameters('AltMenuScreen2'); + var backGroundBitmap = parameters['backGroundBitmap'] || ''; + var maxColsMenuWnd = Number(parameters['maxColsMenu'] || 4); + var rowsCommandWnd = Number(parameters['commandRows'] || 2); + var isDisplayStatus = !!Number(parameters['isDisplayStatus']); + + var _Scene_Menu_create = Scene_Menu.prototype.create; + Scene_Menu.prototype.create = function() { + _Scene_Menu_create.call(this); + this._statusWindow.x = 0; + this._statusWindow.y = this._commandWindow.height; + this._goldWindow.x = Graphics.boxWidth - this._goldWindow.width; + // make transparent for all windows at menu scene. + this._statusWindow.opacity = 0; + this._goldWindow.opacity = 0; + this._commandWindow.opacity = 0; + }; + + // load bitmap that set in plugin parameter + var _Scene_Menu_createBackground = Scene_Menu.prototype.createBackground; + Scene_Menu.prototype.createBackground = function(){ + if(backGroundBitmap){ + this._backgroundSprite = new Sprite(); + this._backgroundSprite.bitmap = + ImageManager.loadPicture(backGroundBitmap); + this.addChild(this._backgroundSprite); + return; + } + // if background file is invalid, it does original process. + _Scene_Menu_createBackground.call(this); + }; + + Window_MenuCommand.prototype.windowWidth = function() { + return Graphics.boxWidth; + }; + + Window_MenuCommand.prototype.maxCols = function() { + return 4; + }; + + Window_MenuCommand.prototype.numVisibleRows = function() { + return rowsCommandWnd; + }; + + Window_MenuStatus.prototype.windowWidth = function() { + return Graphics.boxWidth; + }; + + Window_MenuStatus.prototype.windowHeight = function() { + var h1 = this.fittingHeight(1); + var h2 = this.fittingHeight(rowsCommandWnd); + return Graphics.boxHeight - h1 - h2; + }; + + Window_MenuStatus.prototype.maxCols = function() { + return maxColsMenuWnd; + }; + + Window_MenuStatus.prototype.numVisibleRows = function() { + return 1; + }; + + Window_MenuStatus.prototype.drawItemImage = function(index) { + var actor = $gameParty.members()[index]; + var rect = this.itemRectForText(index); + // load stand_picture + var bitmapName = $dataActors[actor.actorId()].meta.stand_picture; + var bitmap = bitmapName ? ImageManager.loadPicture(bitmapName) : null; + var w = Math.min(rect.width, (bitmapName ? bitmap.width : 144)); + var h = Math.min(rect.height, (bitmapName ? bitmap.height : 144)); + var lineHeight = this.lineHeight(); + this.changePaintOpacity(actor.isBattleMember()); + if(bitmap){ + var sx = (bitmap.width > w) ? (bitmap.width - w) / 2 : 0; + var sy = (bitmap.height > h) ? (bitmap.height - h) / 2 : 0; + var dx = (bitmap.width > rect.width) ? rect.x : + rect.x + (rect.width - bitmap.width) / 2; + var dy = (bitmap.height > rect.height) ? rect.y : + rect.y + (rect.height - bitmap.height) / 2; + this.contents.blt(bitmap, sx, sy, w, h, dx, dy); + } else { // when bitmap is not set, do the original process. + this.drawActorFace(actor, rect.x, rect.y + lineHeight * 2.5, w, h); + } + this.changePaintOpacity(true); + }; + + Window_MenuStatus.prototype.drawItemStatus = function(index) { + if(!isDisplayStatus){ + return; + } + var actor = $gameParty.members()[index]; + var rect = this.itemRectForText(index); + var x = rect.x; + var y = rect.y; + var width = rect.width; + var bottom = y + rect.height; + var lineHeight = this.lineHeight(); + this.drawActorName(actor, x, y + lineHeight * 0, width); + this.drawActorLevel(actor, x, y + lineHeight * 1, width); + this.drawActorClass(actor, x, bottom - lineHeight * 4, width); + this.drawActorHp(actor, x, bottom - lineHeight * 3, width); + this.drawActorMp(actor, x, bottom - lineHeight * 2, width); + this.drawActorIcons(actor, x, bottom - lineHeight * 1, width); + }; + + var _Window_MenuActor_initialize = Window_MenuActor.prototype.initialize; + Window_MenuActor.prototype.initialize = function() { + _Window_MenuActor_initialize.call(this); + this.y = this.fittingHeight(2); + }; + +})(); diff --git a/js/plugins/AltMenuScreen3.js b/js/plugins/AltMenuScreen3.js new file mode 100644 index 0000000..5293c84 --- /dev/null +++ b/js/plugins/AltMenuScreen3.js @@ -0,0 +1,547 @@ +//============================================================================= +// AltMenuScreen3.js (ver1.0.1) +//============================================================================= +// [History] +// 2015.Nov.23 1.0.0 First Release +// 2018.Sep.19 1.0.1 add function to display current mapname. + +/*: + * @plugindesc Yet Another menu screen layout (ver1.0.1) + * @author Sasuke KANNAZUKI, Yoji Ojima + * + * @default + * @param bgBitmapMenu + * @desc background bitmap file at menu scene. put at img/pictures. + * @default + * @require 1 + * @dir img/pictures/ + * @type file + * * + * @param bgBitmapItem + * @desc background bitmap file at item scene. put at img/pictures. + * @default + * @require 1 + * @dir img/pictures/ + * @type file + * + * @param bgBitmapSkill + * @desc background bitmap file at skill scene. put at img/pictures. + * @default + * @require 1 + * @dir img/pictures/ + * @type file + * + * @param bgBitmapEquip + * @desc background bitmap file at equip scene. put at img/pictures. + * @default + * @require 1 + * @dir img/pictures/ + * @type file + * + * @param bgBitmapStatus + * @desc background bitmap file at status scene. put at img/pictures. + * @default + * @require 1 + * @dir img/pictures/ + * @type file + * + * @param bgBitmapOptions + * @desc background bitmap file at option scene. put at img/pictures. + * @default + * @require 1 + * @dir img/pictures/ + * @type file + * + * @param bgBitmapFile + * @desc background bitmap file at save/load scene. put at img/pictures. + * @default + * @require 1 + * @dir img/pictures/ + * @type file + * + * @param bgBitmapGameEnd + * @desc background bitmap file at gameEnd scene. put at img/pictures. + * @default + * @require 1 + * @dir img/pictures/ + * @type file + * + * @param maxColsMenu + * @desc max column at menu window + * @default 4 + * + * @param commandRows + * @desc number of visible rows at command window + * @default 2 + * + * @param isDisplayStatus + * @desc whether display status or not. (1 = yes, 0 = no) + * @default 1 + * + * @param display map name + * @desc whether to display map name. (1 = yes, 0 = no) + * @default 1 + * + * @param location string + * @desc prefix of map name. drawn system color. + * @default Location: + * + * @help This plugin does not provide plugin commands. + * The differences with AltMenuscreen are follows: + * - windows are transparent at all menu scene. + * - it can set the background bitmap for each scenes at menu. + * - picture is actors' original + * + * Actor' note: + * set actor's standing picture at menu. + * put file at img/pictures. + * + * preferred size of actor's picture: + * width: 174px(maxColsMenu=4), 240px(maxColsMenu=3) + * height: 408px(commandRows=2), 444px(commandRows=1) + */ + +/*:ja + * @plugindesc レイアウトの異なるメニュー画面(ver1.0.1) + * @author 神無月サスケ, Yoji Ojima + * + * @param bgBitmapMenu + * @desc メニュー背景にするビットマップファイルです。 + * img/pictures に置いてください。 + * @default + * @require 1 + * @dir img/pictures/ + * @type file + * + * @param bgBitmapItem + * @desc アイテム画面背景にするビットマップファイルです。 + * img/pictures に置いてください。 + * @default + * @require 1 + * @dir img/pictures/ + * @type file + * + * @param bgBitmapSkill + * @desc スキル画面背景にするビットマップファイルです。 + * img/pictures に置いてください。 + * @default + * @require 1 + * @dir img/pictures/ + * @type file + * + * @param bgBitmapEquip + * @desc 装備画面背景にするビットマップファイルです。 + * img/pictures に置いてください。 + * @default + * @require 1 + * @dir img/pictures/ + * @type file + * + * @param bgBitmapStatus + * @desc ステータス画面背景にするビットマップファイルです。 + * img/pictures に置いてください。 + * @default + * @require 1 + * @dir img/pictures/ + * @type file + * + * @param bgBitmapOptions + * @desc オプション画面背景にするビットマップファイルです。 + * img/pictures に置いてください。 + * @default + * @require 1 + * @dir img/pictures/ + * @type file + * + * @param bgBitmapFile + * @desc セーブ/ロード画面背景にするビットマップファイルです。 + * img/pictures に置いてください。 + * @default + * @require 1 + * @dir img/pictures/ + * @type file + * + * @param bgBitmapGameEnd + * @desc ゲーム終了画面背景にするビットマップファイルです。 + * img/pictures に置いてください。 + * @default + * + * @param maxColsMenu + * @desc アクターを表示するウィンドウの1画面の登録最大数です。 + * @default 4 + * + * @param commandRows + * @desc コマンドウィンドウの行数です。 + * @default 2 + * + * @param isDisplayStatus + * @desc ステータスを表示するかしないかを選びます。(1 = yes, 0 = no) + * @default 1 + * + * @param display map name + * @desc 画面左下にマップ名を表示するか (1 = する, 0 = しない) + * @default 1 + * + * @param location string + * @desc マップ名の前に付ける文字。システムカラーで描画されます。 + * @default 現在地: + * + * @help このプラグインには、プラグインコマンドはありません。 + * + * AltMenuscreen との違いは以下です: + * - メニュー画面すべてのウィンドウが透明です + * - メニューそれぞれのシーンに背景ビットマップを付けることが出来ます。 + * - アクターに立ち絵を利用します。 + * + * アクターのメモに以下のように書いてください: + * ファイル名が、そのアクターの立ち絵になります。 + * ファイルは img/pictures に置いてください。 + * + * 望ましいアクター立ち絵のサイズ: + * 幅:3列:240px, 4列:174px + * 高さ: コマンドウィンドウ 1行:444px 2行:408px + * + */ + +(function() { + + // set parameters + var parameters = PluginManager.parameters('AltMenuScreen3'); + var bgBitmapMenu = parameters['bgBitmapMenu'] || ''; + var bgBitmapItem = parameters['bgBitmapItem'] || ''; + var bgBitmapSkill = parameters['bgBitmapSkill'] || ''; + var bgBitmapEquip = parameters['bgBitmapEquip'] || ''; + var bgBitmapStatus = parameters['bgBitmapStatus'] || ''; + var bgBitmapOptions = parameters['bgBitmapOptions'] || ''; + var bgBitmapFile = parameters['bgBitmapFile'] || ''; + var bgBitmapGameEnd = parameters['bgBitmapGameEnd'] || ''; + var maxColsMenuWnd = Number(parameters['maxColsMenu'] || 4); + var rowsCommandWnd = Number(parameters['commandRows'] || 2); + var isDisplayStatus = !!Number(parameters['isDisplayStatus']); + var isDisplayMapName = !!Number(parameters['display map name']); + var locationString = parameters['location string'] || ''; + + // + // make transparent windows for each scene in menu. + // + var _Scene_Menu_create = Scene_Menu.prototype.create; + Scene_Menu.prototype.create = function() { + _Scene_Menu_create.call(this); + this._statusWindow.x = 0; + this._statusWindow.y = this._commandWindow.height; + this._goldWindow.x = Graphics.boxWidth - this._goldWindow.width; + // make transparent for all windows at menu scene. + this._statusWindow.opacity = 0; + this._goldWindow.opacity = 0; + this._commandWindow.opacity = 0; + this.createMapNameWindow(); + }; + + var _Scene_Item_create = Scene_Item.prototype.create; + Scene_Item.prototype.create = function() { + _Scene_Item_create.call(this); + this._helpWindow.opacity = 0; + this._categoryWindow.opacity = 0; + this._itemWindow.opacity = 0; + this._actorWindow.opacity = 0; + }; + + var _Scene_Skill_create = Scene_Skill.prototype.create; + Scene_Skill.prototype.create = function() { + _Scene_Skill_create.call(this); + this._helpWindow.opacity = 0; + this._skillTypeWindow.opacity = 0; + this._statusWindow.opacity = 0; + this._itemWindow.opacity = 0; + this._actorWindow.opacity = 0; + }; + + var _Scene_Equip_create = Scene_Equip.prototype.create; + Scene_Equip.prototype.create = function() { + _Scene_Equip_create.call(this); + this._helpWindow.opacity = 0; + this._statusWindow.opacity = 0; + this._commandWindow.opacity = 0; + this._slotWindow.opacity = 0; + this._itemWindow.opacity = 0; + }; + + var _Scene_Status_create = Scene_Status.prototype.create; + Scene_Status.prototype.create = function() { + _Scene_Status_create.call(this); + this._statusWindow.opacity = 0; + }; + + var _Scene_Options_create = Scene_Options.prototype.create; + Scene_Options.prototype.create = function() { + _Scene_Options_create.call(this); + this._optionsWindow.opacity = 0; + }; + + var _Scene_File_create = Scene_File.prototype.create; + Scene_File.prototype.create = function() { + _Scene_File_create.call(this); + this._helpWindow.opacity = 0; + this._listWindow.opacity = 0; + }; + + var _Scene_GameEnd_create = Scene_GameEnd.prototype.create; + Scene_GameEnd.prototype.create = function() { + _Scene_GameEnd_create.call(this); + this._commandWindow.opacity = 0; + }; + + // + // display current map name + // + function Window_MapNameAlt3() { + this.initialize.apply(this, arguments); + } + + Window_MapNameAlt3.prototype = Object.create(Window_MapName.prototype); + Window_MapNameAlt3.prototype.constructor = Window_MapNameAlt3; + + Window_MapNameAlt3.prototype.initialize = function () { + Window_MapName.prototype.initialize.call(this); + }; + + Window_MapNameAlt3.prototype.windowWidth = function() { + return 600; + }; + + Window_MapNameAlt3.prototype.update = function () { + // do nothing + }; + + var mapName = function () { + var name = $gameMap.displayName(); + return name ? name : $dataMapInfos[$gameMap.mapId()].name; + }; + + Window_MapNameAlt3.prototype.refresh = function () { + this.contents.clear(); + this.x = 0; + this.y = Graphics.boxHeight - this.height; + if (mapName()) { + this.changeTextColor(this.systemColor()); + var textWidth = this.textWidth(locationString) + 8; + var contentsWidth = this.contentsWidth(); + if (textWidth) { + this.drawText(locationString, 4, 0, contentsWidth - 4, 'left'); + } + this.resetTextColor(); + var orgX = 4 + textWidth; + this.drawText(mapName(), orgX, 0, contentsWidth - orgX, 'left'); + this.contentsOpacity = 255; + } + }; + + Scene_Menu.prototype.createMapNameWindow = function() { + if (isDisplayMapName) { + this._mapNameWindow = new Window_MapNameAlt3(); + this.addChild(this._mapNameWindow); + this._mapNameWindow.opacity = 0; + } + }; + + var _Scene_Menu_terminate = Scene_Menu.prototype.terminate; + Scene_Menu.prototype.terminate = function () { + _Scene_Menu_terminate.call(this); + if (isDisplayMapName) { + this.removeChild(this._mapNameWindow); + } + }; + + // + // load bitmap that set in plugin parameter + // + var _Scene_Menu_createBackground = Scene_Menu.prototype.createBackground; + Scene_Menu.prototype.createBackground = function(){ + if(bgBitmapMenu){ + this._backgroundSprite = new Sprite(); + this._backgroundSprite.bitmap = + ImageManager.loadPicture(bgBitmapMenu); + this.addChild(this._backgroundSprite); + return; + } + // if background file is invalid, it does original process. + _Scene_Menu_createBackground.call(this); + }; + + var _Scene_Item_createBackground = Scene_Item.prototype.createBackground; + Scene_Item.prototype.createBackground = function(){ + if(bgBitmapItem){ + this._backgroundSprite = new Sprite(); + this._backgroundSprite.bitmap = + ImageManager.loadPicture(bgBitmapItem); + this.addChild(this._backgroundSprite); + return; + } + // if background file is invalid, it does original process. + _Scene_Item_createBackground.call(this); + }; + + var _Scene_Skill_createBackground = Scene_Skill.prototype.createBackground; + Scene_Skill.prototype.createBackground = function(){ + if(bgBitmapSkill){ + this._backgroundSprite = new Sprite(); + this._backgroundSprite.bitmap = + ImageManager.loadPicture(bgBitmapSkill); + this.addChild(this._backgroundSprite); + return; + } + // if background file is invalid, it does original process. + _Scene_Skill_createBackground.call(this); + }; + + var _Scene_Equip_createBackground = Scene_Equip.prototype.createBackground; + Scene_Equip.prototype.createBackground = function(){ + if(bgBitmapEquip){ + this._backgroundSprite = new Sprite(); + this._backgroundSprite.bitmap = + ImageManager.loadPicture(bgBitmapEquip); + this.addChild(this._backgroundSprite); + return; + } + // if background file is invalid, it does original process. + _Scene_Equip_createBackground.call(this); + }; + + var _Scene_Status_createBackground = + Scene_Status.prototype.createBackground; + Scene_Status.prototype.createBackground = function(){ + if(bgBitmapStatus){ + this._backgroundSprite = new Sprite(); + this._backgroundSprite.bitmap = + ImageManager.loadPicture(bgBitmapStatus); + this.addChild(this._backgroundSprite); + return; + } + // if background file is invalid, it does original process. + _Scene_Status_createBackground.call(this); + }; + + var _Scene_Options_createBackground = + Scene_Options.prototype.createBackground; + Scene_Options.prototype.createBackground = function(){ + if(bgBitmapOptions){ + this._backgroundSprite = new Sprite(); + this._backgroundSprite.bitmap = + ImageManager.loadPicture(bgBitmapOptions); + this.addChild(this._backgroundSprite); + return; + } + // if background file is invalid, it does original process. + _Scene_Options_createBackground.call(this); + }; + + var _Scene_File_createBackground = Scene_File.prototype.createBackground; + Scene_File.prototype.createBackground = function(){ + if(bgBitmapFile){ + this._backgroundSprite = new Sprite(); + this._backgroundSprite.bitmap = + ImageManager.loadPicture(bgBitmapFile); + this.addChild(this._backgroundSprite); + return; + } + // if background file is invalid, it does original process. + _Scene_File_createBackground.call(this); + }; + + var _Scene_GameEnd_createBackground = + Scene_GameEnd.prototype.createBackground; + Scene_GameEnd.prototype.createBackground = function(){ + if(bgBitmapGameEnd){ + this._backgroundSprite = new Sprite(); + this._backgroundSprite.bitmap = + ImageManager.loadPicture(bgBitmapGameEnd); + this.addChild(this._backgroundSprite); + return; + } + // if background file is invalid, it does original process. + _Scene_GameEnd_createBackground.call(this); + }; + + // + // alt menu screen processes + // + Window_MenuCommand.prototype.windowWidth = function() { + return Graphics.boxWidth; + }; + + Window_MenuCommand.prototype.maxCols = function() { + return 4; + }; + + Window_MenuCommand.prototype.numVisibleRows = function() { + return rowsCommandWnd; + }; + + Window_MenuStatus.prototype.windowWidth = function() { + return Graphics.boxWidth; + }; + + Window_MenuStatus.prototype.windowHeight = function() { + var h1 = this.fittingHeight(1); + var h2 = this.fittingHeight(rowsCommandWnd); + return Graphics.boxHeight - h1 - h2; + }; + + Window_MenuStatus.prototype.maxCols = function() { + return maxColsMenuWnd; + }; + + Window_MenuStatus.prototype.numVisibleRows = function() { + return 1; + }; + + Window_MenuStatus.prototype.drawItemImage = function(index) { + var actor = $gameParty.members()[index]; + var rect = this.itemRectForText(index); + // load stand_picture + var bitmapName = $dataActors[actor.actorId()].meta.stand_picture; + var bitmap = bitmapName ? ImageManager.loadPicture(bitmapName) : null; + var w = Math.min(rect.width, (bitmapName ? bitmap.width : 144)); + var h = Math.min(rect.height, (bitmapName ? bitmap.height : 144)); + var lineHeight = this.lineHeight(); + this.changePaintOpacity(actor.isBattleMember()); + if(bitmap){ + var sx = (bitmap.width > w) ? (bitmap.width - w) / 2 : 0; + var sy = (bitmap.height > h) ? (bitmap.height - h) / 2 : 0; + var dx = (bitmap.width > rect.width) ? rect.x : + rect.x + (rect.width - bitmap.width) / 2; + var dy = (bitmap.height > rect.height) ? rect.y : + rect.y + (rect.height - bitmap.height) / 2; + this.contents.blt(bitmap, sx, sy, w, h, dx, dy); + } else { // when bitmap is not set, do the original process. + this.drawActorFace(actor, rect.x, rect.y + lineHeight * 2.5, w, h); + } + this.changePaintOpacity(true); + }; + + Window_MenuStatus.prototype.drawItemStatus = function(index) { + if(!isDisplayStatus){ + return; + } + var actor = $gameParty.members()[index]; + var rect = this.itemRectForText(index); + var x = rect.x; + var y = rect.y; + var width = rect.width; + var bottom = y + rect.height; + var lineHeight = this.lineHeight(); + this.drawActorName(actor, x, y + lineHeight * 0, width); + this.drawActorLevel(actor, x, y + lineHeight * 1, width); + this.drawActorClass(actor, x, bottom - lineHeight * 4, width); + this.drawActorHp(actor, x, bottom - lineHeight * 3, width); + this.drawActorMp(actor, x, bottom - lineHeight * 2, width); + this.drawActorIcons(actor, x, bottom - lineHeight * 1, width); + }; + + var _Window_MenuActor_initialize = Window_MenuActor.prototype.initialize; + Window_MenuActor.prototype.initialize = function() { + _Window_MenuActor_initialize.call(this); + this.y = this.fittingHeight(2); + }; + +})(); diff --git a/js/plugins/Archeia_Steamworks.js b/js/plugins/Archeia_Steamworks.js new file mode 100644 index 0000000..e790513 --- /dev/null +++ b/js/plugins/Archeia_Steamworks.js @@ -0,0 +1,1207 @@ +/*============================================================================= + * Archeia/Liquidize - Steamworks + * By Liquidize & Archeia - htp://anima.mintkit.lol / http://archeia.moe + * Archeia_Steamworks.js + * Version: 1.00 + * + * Copyright (C) 2016 Dan "Liqudize" Deptula & Archeia + * + * This plugin is licensed to you, the user under the terms that you credit + * Liquidize and Archeia in your game (commercial or free). The terms also include you leaving all + * copyrights intact, you are however free to modify this file to add additional + * functionality or fix bugs. + * + * TLDR WHY PLUGIN IS CALLED "ARCHEIA_STEAMWORKS": I, Liquidize, was asked to create + * this at the request of Archeia. I name my plugins with a prefix, that prefix is + * the name of the person whom asked me to make it, or the game name. She gave moral + * support though and therefore is credited ;-;. + * + *=============================================================================*/ +/*: + * @plugindesc Plugin Description + * @author Liquidize & Archeia + * + * @param Steamworks Debug + * @desc Enable or disable debug messages + * @default false + * + * @param Cloud Saving + * @desc Maybe one day this will be a thing. + * @default NOT IMPLEMENTED + * + * @help + * --------------------------------------------------------------------------- + * This plugin allows Steamworks integration into your RPG Maker Game via a + * modified Greenworks node module. This plugin will only function on Windows + * (and Mac ONE DAY MAYBE I HOPE) builds. Due to this plugin being built upon + * a modified Greenworks module, you must credit the creators of Greenworks + * and since Greenworks is Licensed under the MIT license, you must also include + * that license in your game package. + * + * Greenworks: https://github.com/greenheartgames/greenworks + * + * ---------------------------------------------------------------------------- + * HOW-TO (INSTALL) + * ---------------------------------------------------------------------------- + * + * In order to use this plugin, you must first have the Steamworks SDK found + * here: https://partner.steamgames.com/?goto=%2Fhome + * + * Once you have the Steamworks SDK downloaded and extracted copy the binaries + * from the redistributable folder to "yourProject\js\libs" directory. The files + * you will want to copy are: + * + * WINDOWS: steam_api.dll + * (FOR THE FUTURE: MAC: libsteam_api.dylib) + * + * Then copy the contents of this package to your plugin folder, keeping the + * file structure intact. The end result of this should be: + * + * yourProjectMainFolder + * - js + * -- libs + * --- steamworks-win32.node + * --- steamworks.js + * -- plugins + * --- Archeia_Steamworks.js + * - data + * - img + * - audio + * - fonts + * - icon + * + * Then simply add the plugin to the plugin manager, and it is installed. + * + * (NOTE FOR PLAY TESTING) + * Steam needs to know the app-id for your game, it can only knows this + * automatically when you launch the game via steam. So when play testing, you + * need to place a text file called steam_appid.txt with a single line containing + * your games steam app id, inside the nwjs-win (FOR FUTURE: nwjs-osx for Mac's) + * folder of your RPG Maker MV install. On steam that is the following: + * + * (WINDOWS) + * STEAM_INSTALL_LOCATION\steamapps\common\RPG Maker MV\nwjs-win + * (FOR FUTURE WHEN MACS BECOME A THING) + * STEAM_INSTALL_LOCATION\steamapps\common\RPG Maker MV\nwjs-osx + * + * ============================================================================ + * HOW-TO (USAGE) + * ============================================================================ + * + * The plugin is meant to be easily usable for non-developers via plugin commands. + * Some things however require a "Callback" function, as they have to connect to + * steams servers to get information, or do things (e.g: unlocking achievements) + * these things may take some time, and therefore when using plugin commands that + * require a callback, you should apply a wait before executing more logic. + * The plugin is a wrapper for my modified Greenworks module, meaning that + * the functions used by the plugin commands are usable by developers in their + * own plugins. + * + * + * ---------------------------------------------------------------------------- + * PLUGIN COMMANDS + * ---------------------------------------------------------------------------- + * + * Plugin commands are case insensitive so any case is usable. + * All plugins have the initial command prefix as "steamworks" followed by the + * action name, and then the arguments for the action. + * + * All plugins that return a value, will return -1 if an error occurs. This + * is so you can check if something bad happens with events. + * + * ---------------------------------------------------------------------------- + * GETTING THE USERS STEAM NAME + * ---------------------------------------------------------------------------- + * + * Action Name(s): steamname, screenname, or name + * + * Arguments: the variable id (a number) to place the name in. + * + * Callback(s): No. + * + * Usage Example(s): + * + * steamworks steamname 1 + * steamworks screenname 999 + * StEaMwOrKs NAME 626 + * + * Usage Explanation: + * + * First we use the command steamworks, this lets the plugin command interpreter + * know that we want to do a steamworks command, then we specify the action as + * getting the steam name, we then use the variable provided (in the examples: + * 1, 999 and 626) to store the steam name once we obtain it. + * + * ---------------------------------------------------------------------------- + * GETTING THE USERS STEAM ID/ACCOUNT ID + * ---------------------------------------------------------------------------- + * + * Action Name(s): steamid, accountid, or id + * + * Arguments: the variable id (a number) to place the steam id in. + * + * Callback(s): No. + * + * Usage Example(s): + * + * steamworks steamid 1 + * steamworks accountid 1333 + * StEaMwOrKs Id 909 + * + * Usage Explanation: + * + * First we use the command steamworks, this lets the plugin command interpreter + * know that we want to do a steamworks command, then we specify the action as + * getting the steam id, we then use the variable provided (in the examples: + * 1, 1333 and 909) to store the steam id once we obtain it. + * + * ---------------------------------------------------------------------------- + * GETTING THE USERS STATIC STEAM ID/STATIC ACCOUNT ID + * ---------------------------------------------------------------------------- + * + * Action Name(s): staticsteamid, staticid, or staticaccountid + * + * Arguments: the variable id (a number) to place the static id in. + * + * Callback(s): No. + * + * Usage Example(s): + * + * steamworks staticsteamid 2 + * steamworks staticid 2000 + * StEaMwOrKs staticaccountid 109 + * + * Usage Explanation: + * + * First we use the command steamworks, this lets the plugin command interpreter + * know that we want to do a steamworks command, then we specify the action as + * getting the static steam id, we then use the variable provided (in the examples: + * 2, 2000 and 109) to store the static steam id once we obtain it. + * + * + * ---------------------------------------------------------------------------- + * GETTING THE USERS STEAM LEVEL + * ---------------------------------------------------------------------------- + * + * Action Name(s): level or steamlevel + * + * Arguments: the variable id (a number) to place the level in. + * + * Callback(s): No. + * + * Usage Example(s): + * + * steamworks level 2 + * steamworks steamlevel 987 + * StEaMWORKs STEAMLEVEL 1100 + * + * Usage Explanation: + * + * First we use the command steamworks, this lets the plugin command interpreter + * know that we want to do a steamworks command, then we specify the action as + * getting the users steam level, we then use the variable provided (in the examples: + * 2, 987 and 1100) to store the users steam level once we obtain it. + * + * + * ---------------------------------------------------------------------------- + * GETTING THE NUMBER OF PLAYERS IN GAME NOW + * ---------------------------------------------------------------------------- + * + * Action Name(s): numofplayers or playercount + * + * Arguments: the variable id (a number) to place the amount of players in. + * + * Callback(s): Yes, so use a wait event. + * + * Usage Example(s): + * + * steamworks numofplayers 1 + * steamworks playercount 200 + * StEaMwOrKs NUMOFPLAYERS 10 + * + * Usage Explanation: + * + * First we use the command steamworks, this lets the plugin command interpreter + * know that we want to do a steamworks command, then we specify the action as + * getting the amount of players in game, we then use the variable provided (in the examples: + * 1, 200 and 10) to store the amount of players once it is obtained. This + * is an action that requires a callback, and must connect to steams server. It + * is advised to use a wait event to wait a few frames for this to occur. + * + * ---------------------------------------------------------------------------- + * GETTING THE NUMBER OF ACHIEVEMENTS IN YOUR GAME + * ---------------------------------------------------------------------------- + * + * Action Name(s): numofachievements or achievementcount + * + * Arguments: the variable id (a number) to place the returned value in. + * + * Callback(s): No. + * + * Usage Example(s): + * + * steamworks numofachievements 7 + * steamworks numofachievements 8 + * StEaMwOrKs achievementcount 9 + * + * Usage Explanation: + * + * First we use the command steamworks, this lets the plugin command interpreter + * know that we want to do a steamworks command, then we specify the action as + * getting the amount of achievements the game as, we then use the variable + * provided (in the examples: 7, 8 and 9) to store the amount of achievements + * the game has. + * + * ---------------------------------------------------------------------------- + * GETTING IF THE USER HAS STEAM OVERLAY ENABLED + * ---------------------------------------------------------------------------- + * + * Action Name(s): overlayenabled, gameoverlayenabled or steamoverlayenabled + * + * Arguments: the variable id (a number) to place the returned value in. + * + * Callback(s): No. + * + * Usage Example(s): + * + * steamworks overlayenabled 10 + * steamworks gameoverlayenabled 11 + * StEaMwOrKs steamoverlayenabled 12 + * + * Usage Explanation: + * + * First we use the command steamworks, this lets the plugin command interpreter + * know that we want to do a steamworks command, then we specify the action as + * getting whether the user has overlay enabled or not, we then use the variable + * provided (in the examples: 10, 11 and 12) to store if they have the overlay + * enabled or not in it. + * + * NOTE: The return values for this differ since this returns a boolean. + * If an error occurs (such as Steamworks not being initialized) it returns -1 + * if the value is false it return 0, if the value is true it returns 1. + * + * ---------------------------------------------------------------------------- + * OPENING THE STEAM OVERLAY + * ---------------------------------------------------------------------------- + * + * Action Name(s): openoverlay, opensteamoverlay or opengameoverlay + * + * Arguments: the location to open to. The following are valid options: + * Friends, Community, Players, Settings, OfficialGameGroup, Stats and Achievements + * + * Callback(s): No. + * + * Usage Example(s): + * + * steamworks openoverlay Friends + * steamworks opensteamoverlay Settings + * StEaMwOrKs opengameoverlay Achievements + * + * Usage Explanation: + * + * First we use the command steamworks, this lets the plugin command interpreter + * know that we want to do a steamworks command, then we specify the action is to + * open the game overlay to the Friends list, the Settings, and the Achievements + * page. + * + * ---------------------------------------------------------------------------- + * OPENING THE STEAM OVERLAY TO A URL + * ---------------------------------------------------------------------------- + * + * Action Name(s): openoverlaytourl, opengameoverlayurl or opensteamovertourl + * + * Arguments: the url to open to. + * + * Callback(s): No. + * + * Usage Example(s): + * + * steamworks openoverlay http://anima.mintkit.lol + * steamworks opensteamoverlay http://archeia.moe + * StEaMwOrKs opengameoverlay http://rpgmakerweb.com + * + * Usage Explanation: + * + * First we use the command steamworks, this lets the plugin command interpreter + * know that we want to do a steamworks command, then we specify the action is to + * open the game overlay to the specified url. The urls given in the examples + * are urls to Liquidize's and Archeia's websites, as well as the website to + * RPGMaker Web. + * + * ---------------------------------------------------------------------------- + * UNLOCKING AN ACHIEVEMENT + * ---------------------------------------------------------------------------- + * + * Action Name(s): activateachievement, giveachivement or grantachievement + * + * Arguments: the achievement name to unlock. + * + * Callback(s): Yes, this function requires a callback and therefore must + * take some time, it is recommended to do a wait message if you want to do things + * such as notify the player in game. + * + * Usage Example(s): + * + * steamworks activateachievement THE_BEST_ACHIEVEMENT_EVER + * steamworks giveachivement WHAT_IS_MOE_BABY_DONT_MOE_ME_NO_MOE + * StEaMwOrKs grantachievement BY_THE_POWER_OF_MEMES + * + * Usage Explanation: + * + * First we use the command steamworks, this lets the plugin command interpreter + * know that we want to do a steamworks command, then we specify the action is to + * unlock the specified achievement. + * + * Special Notes: The plugin command for this, uses a special call back that + * executes the function to give, or take items and skills when an achievement + * is acquired. For more information about this, see the notetag section. + * + * + * ---------------------------------------------------------------------------- + * REMOVING/CLEARING/LOCKING AN ACHIEVEMENT + * ---------------------------------------------------------------------------- + * + * Action Name(s): deactivateachievement, clearachievement or getrekted + * + * Arguments: the achievement name to lock/remove. + * + * Callback(s): Yes, this function requires a callback and therefore must + * take some time, it is recommended to do a wait message if you want to do things + * such as notify the player in game. + * + * Usage Example(s): + * + * steamworks activateachievement THE_BEST_ACHIEVEMENT_EVER + * steamworks giveachivement WHAT_IS_MOE_BABY_DONT_MOE_ME_NO_MOE + * StEaMwOrKs grantachievement BEST_PLUGIN_2016 + * + * Usage Explanation: + * + * First we use the command steamworks, this lets the plugin command interpreter + * know that we want to do a steamworks command, then we specify the action is to + * lock the specified achievement. + * + * Special Notes: The plugin command for this, uses a special call back that + * executes the function to give, or take items and skills when an achievement + * is removed/locked. For more information about this, see the notetag section. + * + * ============================================================================ + * NOTE TAGS + * ============================================================================ + * + * This plugin makes it easy for non-scripters to grant their users some rewards + * for obtaining, or losing achievements. You do this by using note tags on the + * specified objects. + * + * Note tags are case insensitive, so any casing will work. + * + * ----------------------------------------------------------------------------- + * ITEM,WEAPON, and ARMOR Note tags + * ----------------------------------------------------------------------------- + * The below are note tags usable in Item, Weapon, or Armor objects. + * ----------------------------------------------------------------------------- + * WHEN AN ACHIEVEMENT IS UNLOCKED + * ----------------------------------------------------------------------------- + * + * Notetag: + * + * Aliases: + * + * + * Usage Example(s): + * + * + * + * + * Usage Explanation: + * + * The first example above will give the player 1 of the item,weapon,or armor + * when the achievement called "MY_LOVELY_ACHIEVEMENT" is unlocked. + * + * The second example will take 10 of the item,weapon,or armor from the user if + * the achievement "MY_LOVELY_ACHIEVEMENT_SUPERMODE" is unlocked. + * + * ----------------------------------------------------------------------------- + * WHEN AN ACHIEVEMENT IS REMOVED/LOCKED + * ----------------------------------------------------------------------------- + * + * Notetag: + * + * Aliases: + * + * + * + * Usage Example(s): + * + * + * + * + * Usage Explanation: + * + * The first example above will give the player 1 of the item,weapon,or armor + * when the achievement called "MY_LOVELY_ACHIEVEMENT" is removed or locked. + * + * The second example will take 10 of the item,weapon,or armor from the user if + * the achievement "MY_LOVELY_ACHIEVEMENT_SUPERMODE" is removed or locked. + * + * ----------------------------------------------------------------------------- + * Class Note tags + * ----------------------------------------------------------------------------- + * The below are note tags usable in the Class object. + * + * ----------------------------------------------------------------------------- + * WHEN AN ACHIEVEMENT IS UNLOCKED + * ----------------------------------------------------------------------------- + * + * Notetag: + * + * Aliases: + * + * + * Usage Example(s): + * + * + * + * + * Usage Explanation: + * + * The first example above will give any party member, whose class has this tag, + * the skill with ID 1, when this achievement is unlocked. + * + * The second example will take skill 99 from any party member, whose class has + * this tag when this achievement (MY_LOVELY_ACHIEVEMENT_SUPERMODE) is unlocked. + * + * ----------------------------------------------------------------------------- + * WHEN AN ACHIEVEMENT IS REMOVED/LOCKED + * ----------------------------------------------------------------------------- + * + * Notetag: + * + * Aliases: + * + * + * + * Usage Example(s): + * + * + * + * + * Usage Explanation: + * + * The first example above will give any party member, whose class has this tag, + * the skill with ID 1, when this achievement is removed/locked. + * + * The second example will take skill 99 from any party member, whose class has + * this tag. + * + * + * ============================================================================ + * WHY NO MAC!? + * ============================================================================ + * Neither I nor does Archeia own a Mac, and therefore we can't compile the + * required libraries for Mac easily. A Mac version will be available soon. + * Please be patient. + * + * ============================================================================ + * Coming soon, to a plugin near you. + * ============================================================================ + * + * - Steam Cloud Syncing (We're working on it) + * - Workshop Support (I don't know why, but we're working on it) + * - Find a way to make steam overlay function + * - Mac and Linux Support + * + * ============================================================================ + * Change Log + * ============================================================================ + * + * Version 1.0: + * - Finished Script! + * + *=============================================================================*/ + + +var Imported = Imported || {}; +var Archeia = Archeia || {}; +Archeia.Steamworks = Archeia.Steamworks || {}; +Archeia.Utils = Archeia.Utils || {}; + +(function ($) { + "use strict"; + + var parameters = $plugins.filter(function (plugin) { + return plugin.description.contains(''); + }); + if (parameters.length === 0) { + throw new Error("Couldn't find the parameters of Archeia_Steamworks."); + } + + $.Parameters = parameters[0].parameters; + $.Param = {}; + + $.Param.debugMode = eval($.Parameters['Steamworks Debug']); + $.Param.cloudSaving = eval($.Parameters['Cloud Saving']); + + var steamworks = require("./js/libs/steamworks"); + + // Store a copy of the user. + $.CachedUser = null; + + + + //================================================================================ + // DataManager + //================================================================================ + + + Archeia.Steamworks.DataManager_isDatabaseLoaded = DataManager.isDatabaseLoaded; + DataManager.isDatabaseLoaded = function() { + if (!Archeia.Steamworks.DataManager_isDatabaseLoaded.call(this)) return false; + this.processSteamworksItemNotetags($dataItems); + this.processSteamworksItemNotetags($dataWeapons); + this.processSteamworksItemNotetags($dataArmors); + this.processSteamworksClassNotetags($dataClasses); + return true; + }; + + DataManager.processSteamworksItemNotetags = function(group) { + var note1 = /<(?:ACHIEVEMENT GRANT|achievement unlocked|achieved):[ ](.*),([+-]\d+)\/>/i; + var note2 = /<(?:ACHIEVEMENT CLEAR|achievement taken|achievement rekted|unachieved):[ ](.*),([-+]\d+)\/>/i; + for (var n = 1; n < group.length; n++) { + var obj = group[n]; + var notedata = obj.note.split(/[\r\n]+/); + + obj.steamworks = {}; + obj.steamworks.achievementGrants = {}; + obj.steamworks.achievementClears = {}; + + for (var i = 0; i < notedata.length; i++) { + var line = notedata[i]; + if (line.match(note1)) { + var achievement = RegExp.$1; + var given = parseInt(RegExp.$2); + if (!obj.steamworks.achievementGrants[achievement]) { + obj.steamworks.achievementGrants[achievement] = given; + } + } else if (line.match(note2)) { + var achievement = RegExp.$1; + var given = parseInt(RegExp.$2); + if (!obj.steamworks.achievementClears[achievement]) { + obj.steamworks.achievementClears[achievement] = given; + } + } + } + } + }; + + DataManager.processSteamworksClassNotetags = function(group) { + var note1 = /<(?:ACHIEVEMENT GRANT|achievement unlocked|achieved):[ ](.*),(LEARN|UNLEARN),(\d+)\/>/i; + var note2 = /<(?:ACHIEVEMENT CLEAR|achievement taken|achievement rekted|unachieved):[ ](.*),(LEARN|UNLEARN),(\d+)\/>/i; + for (var n = 1; n < group.length; n++) { + var obj = group[n]; + var notedata = obj.note.split(/[\r\n]+/); + + obj.steamworks = {}; + obj.steamworks.achievementGrants = {}; + obj.steamworks.achievementClears = {}; + + for (var i = 0; i < notedata.length; i++) { + var line = notedata[i]; + if (line.match(note1)) { + obj.steamworks.achievementGrants[RegExp.$1] = obj.steamworks.achievementGrants[RegExp.$1] || {}; + obj.steamworks.achievementGrants[RegExp.$1].learn = obj.steamworks.achievementGrants[RegExp.$1].learn || []; + obj.steamworks.achievementGrants[RegExp.$1].unlearn = obj.steamworks.achievementGrants[RegExp.$1].unlearn || []; + var type = RegExp.$2.toLowerCase(); + switch (type) + { + case "learn": + obj.steamworks.achievementGrants[RegExp.$1].learn.push(parseInt(RegExp.$3)); + break; + case "unlearn": + obj.steamworks.achievementGrants[RegExp.$1].unlearn.push(parseInt(RegExp.$3)); + break; + } + } else if (line.match(note2)) { + obj.steamworks.achievementClears[RegExp.$1] = obj.steamworks.achievementClears[RegExp.$1] || {}; + obj.steamworks.achievementClears[RegExp.$1].learn = obj.steamworks.achievementClears[RegExp.$1].learn || []; + obj.steamworks.achievementClears[RegExp.$1].unlearn = obj.steamworks.achievementClears[RegExp.$1].unlearn || []; + var type = RegExp.$2.toLowerCase(); + switch (type) + { + case "learn": + obj.steamworks.achievementClears[RegExp.$1].learn.push(parseInt(RegExp.$3)); + break; + case "unlearn": + obj.steamworks.achievementClears[RegExp.$1].unlearn.push(parseInt(RegExp.$3)); + break; + } + } + } + } + }; + + //================================================================================ + // SceneManager - initializes the API. + //================================================================================ + + Archeia.Steamworks.SceneManager_initialize = SceneManager.initialize; + SceneManager.initialize = function() { + Archeia.Steamworks.SceneManager_initialize.call(this); + this.initSteamworks(); + }; + + SceneManager.initSteamworks = function() { + this._steamInitialized = steamworks.initAPI(); + if (this.steamworksInitialized() == true) { + console.warn("Initialized Steamworks API"); + } else { + console.warn("Steamworks failed to initialize."); + } + }; + + SceneManager.steamworksInitialized = function() { + return this._steamInitialized; + }; + + + //================================================================================ + // Game_System + //================================================================================ + + Game_System.prototype.getSteamUserObject = function() { + if (SceneManager.steamworksInitialized()) { + return steamworks.getSteamId(); + } else { + if ($.Param.debugMode) console.warn("[ARCHEIA STEAMWORKS] Steamworks is not Initialized."); + return null; + } + }; + + Game_System.prototype.getSteamName = function() { + if (this.getCachedSteamUser()) { + return this.getCachedSteamUser().screenName; + } else { + if ($.Param.debugMode) console.warn("[ARCHEIA STEAMWORKS] Unable to obtain Steam Name. Is Steamworks Initialized?"); + return null; + } + }; + + Game_System.prototype.getSteamLevel = function() { + if (this.getCachedSteamUser()) { + return this.getCachedSteamUser().level; + } else { + if ($.Param.debugMode) console.warn("[ARCHEIA STEAMWORKS] Unable to obtain Steam Level. Is Steamworks Initialized?"); + return null; + } + }; + + Game_System.prototype.getSteamAccountId = function() { + if (this.getCachedSteamUser()) { + return this.getCachedSteamUser().accountId; + } else { + if ($.Param.debugMode) console.warn("[ARCHEIA STEAMWORKS] Unable to obtain Account Id. Is Steamworks Initialized?"); + return null; + } + }; + + Game_System.prototype.getSteamStaticAccountId = function() { + if (this.getCachedSteamUser()) { + return this.getCachedSteamUser().staticAccountId; + } else { + if ($.Param.debugMode) console.warn("[ARCHEIA STEAMWORKS] Unable to obtain Static Account Id. Is Steamworks Initialized?"); + return null; + } + }; + + Game_System.prototype.getCachedSteamUser = function() { + if ($.CachedUser) { + return $.CachedUser; + } else { + return $.CachedUser = this.getSteamUserObject(); + } + }; + + + Game_System.prototype.unlockAchievement = function(achievement,callback,errorcallback) { + if (SceneManager.steamworksInitialized()) { + steamworks.activateAchievement(achievement,function() { + if (callback) { + callback(achievement); + } + }, function(err) { + if (errorcallback) { + errorcallback(err); + } else { + if ($.Param.debugMode) { + console.error(Archeia.Utils.sformat("[ARCHEIA STEAMWORKS] Error when trying to unlock achievement '{0}' OUTPUT: '{1}'", achievement, err)); + } + } + }); + } else { + if ($.Param.debugMode) { + console.warn("[ARCHEIA STEAMWORKS] Unable to grant achievement. Is Steamworks Initialized?"); + } + } + }; + + Game_System.prototype.getAchievements = function(){ + if (SceneManager.steamworksInitialized()) { + return steamworks.getAchievementNames(); + } else { + if ($.Param.debugMode) { + console.warn("[ARCHEIA STEAMWORKS] Unable to retrieve achievements. Is Steamworks Initialized?"); + } + return null; + } + }; + + Game_System.prototype.getNumberOfAchievements = function() { + if (SceneManager.steamworksInitialized()) { + return steamworks.getNumberOfAchievements(); + } else { + if ($.Param.debugMode) { + console.warn("[ARCHEIA STEAMWORKS] Unable to retrieve achievement count. Is Steamworks Initialized?"); + } + return null; + } + }; + + Game_System.prototype.clearAchievement = function(achievement,callback,errorcallback) { + if (SceneManager.steamworksInitialized()) { + steamworks.clearAchievement(achievement,function() { + if (callback) { + callback(achievement); + } + }, function(err) { + if (errorcallback) { + errorcallback(err); + } else { + if ($.Param.debugMode) { + console.error(Archeia.Utils.sformat("[ARCHEIA STEAMWORKS] Error when trying to clear achievement '{0}' OUTPUT: '{1}'", achievement, err)); + } + } + }); + } else { + if ($.Param.debugMode) { + console.warn("[ARCHEIA STEAMWORKS] Unable to clear achievement. Is Steamworks Initialized?"); + } + } + }; + + Game_System.prototype.getAchievement = function(achievement,callback,errorcallback) { + if (SceneManager.steamworksInitialized()) { + steamworks.getAchievement(achievement,function(achieved) { + if (callback) { + callback(achieved,achievement); + } + }, function(err) { + if (errorcallback) { + errorcallback(err); + } else { + if ($.Param.debugMode) { + console.error(Archeia.Utils.sformat("[ARCHEIA STEAMWORKS] Error when trying to get achievement '{0}' OUTPUT: '{1}'", achievement, err)); + } + } + }); + } else { + if ($.Param.debugMode) { + console.warn("[ARCHEIA STEAMWORKS] Unable to get achievement. Is Steamworks Initialized?"); + } + } + }; + + Game_System.prototype.getCurrentGameLanguage = function() { + if (SceneManager.steamworksInitialized()) { + return steamworks.getCurrentGameLanguage(); + } else { + if ($.Param.debugMode){ + console.warn("[ARCHEIA STEAMWORKS] Unable to get game language. Is Steamworks Initialized?"); + } + return null; + } + }; + + Game_System.prototype.getNumberOfPlayers = function(callback,errorcallback) { + if (SceneManager.steamworksInitialized()) { + steamworks.getNumberOfPlayers(function(numofplayers){ + if (callback) { + callback(numofplayers); + } + },function(err){ + if (errorcallback) { + errorcallback(err); + } else { + if ($.Param.debugMode) { + console.error(Archeia.Utils.sformat("[ARCHEIA STEAMWORKS] Error when trying to get number of players. OUTPUT: '{0}'", err)); + } + } + }); + } else { + if ($.Param.debugMode){ + console.warn("[ARCHEIA STEAMWORKS] Unable to get number of players. Is Steamworks Initialized?"); + } + return null; + } + }; + + Game_System.prototype.activateGameOverlay = function(option) { + if (SceneManager.steamworksInitialized()) { + if (!option) { + option = "Community"; + } + steamworks.activateGameOverlay(option); + } else { + if ($.Param.debugMode){ + console.warn("[ARCHEIA STEAMWORKS] Unable to open steam overlay. Is Steamworks Initialized? Does the player have game overlay enabled?"); + } + } + }; + + Game_System.prototype.isGameOverlayEnabled = function() { + if (SceneManager.steamworksInitialized()) { + return steamworks.isGameOverlayEnabled(); + } else { + if ($.Param.debugMode){ + console.warn("[ARCHEIA STEAMWORKS] Unable to get if steam overlay is enabled. Is Steamworks Initialized?"); + } + return null; + } + }; + + Game_System.prototype.activateGameOverlayToWebpage = function(url) { + if (SceneManager.steamworksInitialized()) { + steamworks.activateGameOverlayToWebPage(url); + } else { + if ($.Param.debugMode){ + console.warn("[ARCHEIA STEAMWORKS] Unable to get open game overlay to specified url. Is Steamworks Initialized? Does the player have Game overlay Enabled?"); + } + return null; + } + }; + + Game_System.prototype.saveTextToCloud = function(file,contents,callback,errorcallback) { + if (SceneManager.steamworksInitialized()) { + steamworks.saveTextToFile(file,contents,function() { + if (callback) { + callback(); + } + }, function(err) { + if (errorcallback) { + errorcallback(err); + } else { + if ($.Param.debugMode) { + console.error(Archeia.Utils.sformat("[ARCHEIA STEAMWORKS] Error when trying to save file to cloud. OUTPUT: '{0}'", err)); + } + } + }); + } else { + if ($.Param.debugMode){ + console.warn("[ARCHEIA STEAMWORKS] Unable to get save file to cloud. Is Steamworks Initialized? Does the player have cloud sync enabled?"); + } + } + }; + + Game_System.prototype.readTextFromCloud = function(file,callback,errorcallback) { + if (SceneManager.steamworksInitialized()) { + steamworks.readTextFromFile(file,function(contents) { + if (callback) { + callback(contents); + } + }, function(err) { + if (errorcallback) { + errorcallback(err); + } else { + if ($.Param.debugMode) { + console.error(Archeia.Utils.sformat("[ARCHEIA STEAMWORKS] Error when trying to read file from cloud. OUTPUT: '{0}'", err)); + } + } + }); + } else { + if ($.Param.debugMode){ + console.warn("[ARCHEIA STEAMWORKS] Unable to get red file from cloud. Is Steamworks Initialized? Does the player have cloud sync enabled?"); + } + } + }; + + Game_System.prototype.isCloudSyncEnabledForUser = function() { + if (SceneManager.steamworksInitialized()) { + return steamworks.isCloudEnabledForUser(); + } else { + if ($.Param.debugMode){ + console.warn("[ARCHEIA STEAMWORKS] Unable to get if cloud sync is enabled for user. Is Steamworks Initialized?"); + } + return null; + } + }; + + Game_System.prototype.isCloudEnabled = function() { + if (SceneManager.steamworksInitialized()) { + return steamworks.isCloudEnabled(); + } else { + if ($.Param.debugMode){ + console.warn("[ARCHEIA STEAMWORKS] Unable to get if cloud sync is enabled. Is Steamworks Initialized?"); + } + return null; + } + }; + + Game_System.prototype.enableCloud = function(flag) { + if (SceneManager.steamworksInitialized()) { + steamworks.enableCloud(flag); + } else { + if ($.Param.debugMode){ + console.warn("[ARCHEIA STEAMWORKS] Unable to enable/disable cloud sync. Is Steamworks Initialized?"); + } + } + }; + + Game_System.prototype.getCloudQuota = function(callback,errorcallback) { + if (SceneManager.steamworksInitialized()) { + steamworks.getCloudQuota(function(total,available) { + if (callback) { + callback(total,available); + } + },function(err){ + if (errorcallback) { + errorcallback(err); + } else { + if ($.Param.debugMode) { + console.error(Archeia.Utils.sformat("[ARCHEIA STEAMWORKS] Error when trying to get cloud quota. OUTPUT: '{0}'", err)); + } + } + }); + } else { + if ($.Param.debugMode){ + console.warn("[ARCHEIA STEAMWORKS] Unable to get if cloud sync is enabled. Is Steamworks Initialized?"); + } + } + }; + + Game_System.prototype.onAchievementUnlocked = function(achievement) { + $gameParty.members().forEach(function(member) { + if (member.currentClass().steamworks.achievementGrants[achievement]) { + if (member.currentClass().steamworks.achievementGrants[achievement].learn) { + for (var l = 0; l < member.currentClass().steamworks.achievementGrants[achievement].learn.length; l++ ){ + member.learnSkill(member.currentClass().steamworks.achievementGrants[achievement].learn[l]); + } + } if (member.currentClass().steamworks.achievementGrants[achievement].unlearn) { + for (var u = 0; u < member.currentClass().steamworks.achievementGrants[achievement].unlearn.length; u++ ){ + member.forgetSkill(member.currentClass().steamworks.achievementGrants[achievement].unlearn[u]); + } + } + } + }); + + for (var i = 0; i < $dataItems.length; i++) { + var item = $dataItems[i]; + if (item && item.steamworks) { + if (item.steamworks.achievementGrants[achievement]) { + var given = item.steamworks.achievementGrants[achievement]; + $gameParty.gainItem(item,given,true); + } + } + } + + for (var w = 0; w < $dataWeapons.length; w++) { + var weapon = $dataWeapons[w]; + if (weapon && weapon.steamworks) { + if (weapon.steamworks.achievementGrants[achievement]) { + var given = weapon.steamworks.achievementGrants[achievement]; + $gameParty.gainItem(weapon,given,true); + } + } + } + + for (var a = 0; a < $dataArmors.length; a++) { + var armor = $dataArmors[a]; + if (armor && armor.steamworks) { + if (armor.steamworks.achievementGrants[achievement]) { + var given = armor.steamworks.achievementGrants[achievement]; + $gameParty.gainItem(armor,given,true); + } + } + } + + }; + + Game_System.prototype.onAchievementCleared = function(achievement) { + $gameParty.members().forEach(function(member) { + if (member.currentClass().steamworks.achievementClears[achievement]) { + if (member.currentClass().steamworks.achievementClears[achievement].learn) { + for (var l = 0; l < member.currentClass().steamworks.achievementClears[achievement].learn.length; l++ ){ + member.learnSkill(member.currentClass().steamworks.achievementGrants[achievement].learn[l]); + } + } if (member.currentClass().steamworks.achievementClears[achievement].unlearn) { + for (var u = 0; u < member.currentClass().steamworks.achievementClears[achievement].unlearn.length; u++ ){ + member.forgetSkill(member.currentClass().steamworks.achievementClears[achievement].unlearn[u]); + } + } + } + }); + + for (var i = 0; i < $dataItems.length; i++) { + var item = $dataItems[i]; + if (item && item.steamworks) { + if (item.steamworks.achievementClears[achievement]) { + var given = item.steamworks.achievementClears[achievement]; + $gameParty.gainItem(item,given,true); + } + } + } + + for (var w = 0; w < $dataWeapons.length; w++) { + var weapon = $dataWeapons[w]; + if (weapon && weapon.steamworks) { + if (weapon.steamworks.achievementClears[achievement]) { + var given = weapon.steamworks.achievementClears[achievement]; + $gameParty.gainItem(weapon,given,true); + } + } + } + + for (var a = 0; a < $dataArmors.length; a++) { + var armor = $dataArmors[a]; + if (armor && armor.steamworks) { + if (armor.steamworks.achievementClears[achievement]) { + var given = armor.steamworks.achievementClears[achievement]; + $gameParty.gainItem(armor,given,true); + } + } + } + }; + + //================================================================================ + // Cloud Saving - coming to a meme near you. + //================================================================================ + + //================================================================================ + // Game_Interpreter + //================================================================================ + + Archeia.Steamworks.GameInterpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand; + Game_Interpreter.prototype.pluginCommand = function(command,args) { + if (command.toLowerCase() == "steamworks") { + if (args.length < 1) return; // No action given. + var action = args[0].toLowerCase(); + switch (action) { + case "steamname": + case "screenname": + case "name": + if (args.length < 2) return; // No variable to put it in. + var steamname = $gameSystem.getSteamName(); + if (steamname == null) steamname = -1; // failed to get name. + $gameVariables.setValue(parseInt(args[1]),steamname); + break; + case "steamid": + case "accountid": + case "id": + if (args.length < 2) return; // No variable to put it in. + var steamid = $gameSystem.getSteamAccountId(); + if (steamid == null) steamid = -1; + $gameVariables.setValue(parseInt(args[1]),steamid); + break; + case "staticsteamid": + case "staticid": + case "staticaccountid": + if (args.length < 2) return; // No variable to put it in. + var statid = $gameSystem.getSteamStaticAccountId(); + if (statid == null) statid = -1; + $gameVariables.setValue(parseInt(args[1]),statid); + break; + case "level": + case "steamlevel": + if (args.length < 2) return; // No variable to put it in. + var level = $gameSystem.getSteamLevel(); + if (level == null) level = -1; + $gameVariables.setValue(parseInt(args[1]),level); + break; + case "numofplayers": + case "playercount": + if (args.length < 2) return; // No variable to put it in. + $gameSystem.getNumberOfPlayers(function(count) { + $gameVariables.setValue(parseInt(args[1]),count); + },function(err){ + if ($.Param.debugMode) { + console.error("[ARCHEIA STEAMWORKS] An error occurred when attempting to get player count. Is Steamworks Initialized?") + } + $gameVariables.setValue(parseInt(args[1]),-1); + }); + break; + case "numofachievements": + case "achievementcount": + if (args.length < 2) return; // No variable to put it in. + var achievementcount = $gameSystem.getNumberOfAchievements(); + if (achievementcount == null) achievementcount = -1; + $gameVariables.setValue(parseInt(args[1]),achievementcount); + break; + case "overlayenabled": + case "gameoverlayenabled": + case "steamoverlayenabled": + if (args.length < 2) return; // No variable to put it in. + var overlayenabled = $gameSystem.isGameOverlayEnabled(); + if (overlayenabled == null) overlayenabled = -1; + if (overlayenabled == true) overlayenabled = 1; + if (overlayenabled == false) overlayenabled = 0; + $gameVariables.setValue(parseInt(args[1]),overlayenabled); + break; + case "openoverlay": + case "opensteamoverlay": + case "opengameoverlay": + if (args.length < 2) return; // No overlay option given. + $gameSystem.activateGameOverlay(args[1]); + break; + case "openoverlaytourl": + case "opengameoverlayurl": + case "opensteamovertourl": + if (args.length < 2) return; // no url given. + args = args.splice(1,args.length - 1); + $gameSystem.activateGameOverlayToWebpage(args.join('')); + break; + case "activateachievement": + case "giveachivement": + case "grantachievement": + if (args.length < 2) return; // no achievement name given. + args = args.splice(1,args.length - 1); + $gameSystem.unlockAchievement(args.join(''),$gameSystem.onAchievementUnlocked,null); + break; + case "deactivateachievement": + case "clearachievement": + case "getrekted": // I, Liquid, am a child at heart, this must be kept in in order for the children of the world to get their daily dose of memes. + if (args.length < 2) return; // no achievement name given. + args = args.splice(1,args.length - 1); + $gameSystem.clearAchievement(args.join(''),$gameSystem.onAchievementCleared,null); + break; + case "devtest": // outputs the value of all returnable commands to console + for (var i = 0; i < 7; i++) { + console.warn($gameVariables.value(i)); + } + break; + } + } else { + Archeia.Steamworks.GameInterpreter_pluginCommand.call(this,command,args); + } + }; + + //================================================================================ + // UTILS + //================================================================================ + + // The below is a string formatting function that gives me/js/people/anyone/stuff + // the ability to use C#/C styled string formatting using {0},{1} for parameters. + // I prefer this method, as it is what I'm used to. + // - Liquidize + if (!Archeia.Utils.sformat) { + Archeia.Utils.sformat = function () { + var theString = arguments[0]; + for (var i = 1; i < arguments.length; i++) { + var regEx = new RegExp("\\{" + (i - 1) + "\\}", "gm"); + theString = theString.replace(regEx, arguments[i]); + } + return theString; + }; + } + +})(Archeia.Steamworks); + +ArcheiaSteamworks = Archeia.Steamworks; +Imported["Archeia_Steamworks"] = 1.00; \ No newline at end of file diff --git a/js/plugins/BattleResultsPopup.js b/js/plugins/BattleResultsPopup.js new file mode 100644 index 0000000..547c661 --- /dev/null +++ b/js/plugins/BattleResultsPopup.js @@ -0,0 +1,125 @@ +//============================================================================= +// BattleResultsPopup.js +//============================================================================= + +/*: + * @plugindesc Displays a battle results window instead of text messages. + * @author Yoji Ojima + * + * @help This plugin does not provide plugin commands. + */ + +/*:ja + * @plugindesc 戦闘結果の表示をポップアップ形式に変更します。 + * @author Yoji Ojima + * + * @help このプラグインには、プラグインコマンドはありません。 + */ + +(function() { + + var resultDisplaying = 0; + + var _BattleManager_initMembers = BattleManager.initMembers; + BattleManager.initMembers = function() { + _BattleManager_initMembers.call(this); + resultDisplaying = 0; + }; + + var _BattleManager_update = BattleManager.update; + BattleManager.update = function() { + _BattleManager_update.call(this); + if (resultDisplaying > 0) { + if (++resultDisplaying >= 60) { + if (Input.isTriggered('ok') || TouchInput.isTriggered()) { + resultDisplaying = 0; + } + } + } + }; + + var _BattleManager_isBusy = BattleManager.isBusy; + BattleManager.isBusy = function() { + return _BattleManager_isBusy.call(this) || resultDisplaying > 0; + }; + + BattleManager.displayVictoryMessage = function() { + }; + + BattleManager.displayRewards = function() { + resultDisplaying = 1; + }; + + Game_Actor.prototype.shouldDisplayLevelUp = function() { + return false; + }; + + var _Scene_Battle_update = Scene_Battle.prototype.update; + Scene_Battle.prototype.update = function() { + _Scene_Battle_update.call(this); + if (resultDisplaying > 30 && !this._resultWindow) { + this._resultWindow = new Window_BattleResults(); + this.addWindow(this._resultWindow); + } + }; + + var _Scene_Battle_stop = Scene_Battle.prototype.stop; + Scene_Battle.prototype.stop = function() { + _Scene_Battle_stop.call(this); + if (this._resultWindow) { + this._resultWindow.close(); + } + }; + + function Window_BattleResults() { + this.initialize.apply(this, arguments); + } + + Window_BattleResults.prototype = Object.create(Window_Base.prototype); + Window_BattleResults.prototype.constructor = Window_BattleResults; + + Window_BattleResults.prototype.initialize = function() { + var rewards = BattleManager._rewards; + var width = 400; + var height = this.fittingHeight(Math.min(9, rewards.items.length + 1)); + var statusHeight = this.fittingHeight(4); + var x = (Graphics.boxWidth - width) / 2; + var y = (Graphics.boxHeight - statusHeight - height) / 2; + Window_Base.prototype.initialize.call(this, x, y, width, height); + this.refresh(); + this.openness = 0; + this.open(); + }; + + Window_BattleResults.prototype.refresh = function() { + var x = this.textPadding(); + var y = 0; + var width = this.contents.width; + var lineHeight = this.lineHeight(); + var rewards = BattleManager._rewards; + var items = rewards.items; + this.contents.clear(); + + this.resetTextColor(); + this.drawText(rewards.exp, x, y); + x += this.textWidth(rewards.exp) + 6; + this.changeTextColor(this.systemColor()); + this.drawText(TextManager.expA, x, y); + x += this.textWidth(TextManager.expA + ' '); + + this.resetTextColor(); + this.drawText(rewards.gold, x, y); + x += this.textWidth(rewards.gold) + 6; + this.changeTextColor(this.systemColor()); + this.drawText(TextManager.currencyUnit, x, y); + + x = 0; + y += lineHeight; + + items.forEach(function(item) { + this.drawItemName(item, x, y, width); + y += lineHeight; + }, this); + }; + +})(); diff --git a/js/plugins/BattleVoice.js b/js/plugins/BattleVoice.js new file mode 100644 index 0000000..80a7f7d --- /dev/null +++ b/js/plugins/BattleVoice.js @@ -0,0 +1,256 @@ +//============================================================================= +// BattleVoice.js +//============================================================================= + +/*: + * @plugindesc play voice SE at battle when actor does spcified action + * @author Sasuke KANNAZUKI + * + * @param pitch + * @desc pitch of SEs. this setting is common among all voice SEs. + * @default 100 + * + * @param volume + * @desc volume of SEs. this setting is common among all voice SEs. + * @default 90 + * + * @noteParam attackVoice + * @noteRequire 1 + * @noteDir audio/se/ + * @noteType file + * @noteData actors + * + * @noteParam recoverVoice + * @noteRequire 1 + * @noteDir audio/se/ + * @noteType file + * @noteData actors + * + * @noteParam friendMagicVoice + * @noteRequire 1 + * @noteDir audio/se/ + * @noteType file + * @noteData actors + * + * @noteParam magicVoice + * @noteRequire 1 + * @noteDir audio/se/ + * @noteType file + * @noteData actors + * + * @noteParam skillVoice + * @noteRequire 1 + * @noteDir audio/se/ + * @noteType file + * @noteData actors + * + * @noteParam damageVoice + * @noteRequire 1 + * @noteDir audio/se/ + * @noteType file + * @noteData actors + * + * @noteParam defeatedVoice + * @noteRequire 1 + * @noteDir audio/se/ + * @noteType file + * @noteData actors + * + * @noteParam victoryVoice + * @noteRequire 1 + * @noteDir audio/se/ + * @noteType file + * @noteData actors + * + * @help This plugin does not provide plugin commands. + * + * note specification: + * write down each actor's note at following format to set SE filename. + * plays when actor does normal attack. + * plays when actor uses HP recovering magic. + * plays when actor spells magic for friend + * except HP recovering. if this is not set but is set, + * it plays setting file. + * plays when actor spells magic(except for friend). + * plays when actor uses special skill except magic. + * plays when actor takes damage. + * plays when actor is died. + * plays when battle finishes. + * if plural actors attend the battle, randomly selected actor's SE is adopted. + * + */ +/*:ja + * @plugindesc アクターの戦闘時の行動にボイスSEを設定します。 + * @author 神無月サスケ + * + * @param pitch + * @desc ボイスSEのピッチです。この設定が全てのボイスSEの共通となります。 + * @default 100 + * + * @param volume + * @desc ボイスSEのボリュームです。この設定が全てのボイスSEの共通となります。 + * @default 90 + * + * @noteParam attackVoice + * @noteRequire 1 + * @noteDir audio/se/ + * @noteType file + * @noteData actors + * + * @noteParam recoverVoice + * @noteRequire 1 + * @noteDir audio/se/ + * @noteType file + * @noteData actors + * + * @noteParam friendMagicVoice + * @noteRequire 1 + * @noteDir audio/se/ + * @noteType file + * @noteData actors + * + * @noteParam magicVoice + * @noteRequire 1 + * @noteDir audio/se/ + * @noteType file + * @noteData actors + * + * @noteParam skillVoice + * @noteRequire 1 + * @noteDir audio/se/ + * @noteType file + * @noteData actors + * + * @noteParam damageVoice + * @noteRequire 1 + * @noteDir audio/se/ + * @noteType file + * @noteData actors + * + * @noteParam defeatedVoice + * @noteRequire 1 + * @noteDir audio/se/ + * @noteType file + * @noteData actors + * + * @noteParam victoryVoice + * @noteRequire 1 + * @noteDir audio/se/ + * @noteType file + * @noteData actors + * + * @help このプラグインには、プラグインコマンドはありません。 + * + * メモ設定方法: + * それぞれのアクターのメモに以下の書式で書いてください。 + * filename はボイスSEのファイル名にしてください。 + * + * 通常攻撃の時に再生されるボイスです。 + * HP回復魔法を使用した時に再生されるボイスです。 + * HP回復以外の味方向け魔法を使用した時に + * 再生されるボイスです。省略された場合でが + * 設定されている場合は、そちらが再生されます。 + * 味方向け以外の魔法を使用した時に再生されるボイスです。 + * 必殺技を使用した時に再生されるボイスです。 + * ダメージを受けた時に再生されるボイスです。 + * 戦闘不能になった時に再生されるボイスです。 + * 戦闘勝利時に再生されるボイスです。 + * アクターが複数いる場合は、生きているアクターの中からランダムで再生されます。 + * + */ +(function() { + + // + // process parameters + // + var parameters = PluginManager.parameters('BattleVoice'); + var pitch = Number(parameters['pitch']) || 100; + var volume = Number(parameters['volume']) || 90; + + AudioManager.createAudioByFileame = function(name){ + var audio = {}; + audio.name = name; + audio.pitch = pitch; + audio.volume = volume; + return audio; + }; + + // + // play actor voice + // + SoundManager.playActorVoice = function(actor, type){ + var name = ''; + switch(type){ + case 'attack': + name = actor.meta.attackVoice; + break; + case 'recover': + name = actor.meta.recoverVoice; + break; + case 'friendmagic': + name = actor.meta.friendMagicVoice || actor.meta.magicVoice; + break; + case 'magic': + name = actor.meta.magicVoice; + break; + case 'skill': + name = actor.meta.skillVoice; + break; + case 'damage': + name = actor.meta.damageVoice; + break; + case 'dead': + name = actor.meta.defeatedVoice; + break; + case 'victory': + name = actor.meta.victoryVoice; + break; + } + if(name){ + var audio = AudioManager.createAudioByFileame(name); + AudioManager.playSe(audio); + } + }; + + // + // functions for call actor voice. + // + var _Game_Actor_performAction = Game_Actor.prototype.performAction; + Game_Actor.prototype.performAction = function(action) { + _Game_Actor_performAction.call(this, action); + if (action.isAttack()) { + SoundManager.playActorVoice(this.actor(), 'attack'); + } else if (action.isMagicSkill() && action.isHpRecover()) { + SoundManager.playActorVoice(this.actor(), 'recover'); + } else if (action.isMagicSkill() && action.isForFriend()) { + SoundManager.playActorVoice(this.actor(), 'friendmagic'); + } else if (action.isMagicSkill()) { + SoundManager.playActorVoice(this.actor(), 'magic'); + } else if (action.isSkill() && !action.isGuard()) { + SoundManager.playActorVoice(this.actor(), 'skill'); + } + }; + + var _Game_Actor_performDamage = Game_Actor.prototype.performDamage; + Game_Actor.prototype.performDamage = function() { + _Game_Actor_performDamage.call(this); + SoundManager.playActorVoice(this.actor(), 'damage'); + }; + + var _Game_Actor_performCollapse = Game_Actor.prototype.performCollapse; + Game_Actor.prototype.performCollapse = function() { + _Game_Actor_performCollapse.call(this); + if ($gameParty.inBattle()) { + SoundManager.playActorVoice(this.actor(), 'dead'); + } + }; + + var _BattleManager_processVictory = BattleManager.processVictory; + BattleManager.processVictory = function() { + var index = Math.randomInt($gameParty.aliveMembers().length); + var actor = $gameParty.aliveMembers()[index].actor(); + SoundManager.playActorVoice(actor, 'victory'); + _BattleManager_processVictory.call(this); + }; + +})(); diff --git a/js/plugins/BattlebackScroll.js b/js/plugins/BattlebackScroll.js new file mode 100644 index 0000000..bb01287 --- /dev/null +++ b/js/plugins/BattlebackScroll.js @@ -0,0 +1,55 @@ +//============================================================================= +// BattlebackScroll.js +//============================================================================= + +/*: + * @plugindesc Automatically scrolls a 'battlebacks1' image. + * @author Yoji Ojima + * + * @param Scroll X Variable ID + * @desc The ID of the variable for the horizontal scroll speed. + * @default 0 + * + * @param Scroll Y Variable ID + * @desc The ID of the variable for the vertical scroll speed. + * @default 0 + * + * @help This plugin does not provide plugin commands. + */ + +/*:ja + * @plugindesc 戦闘背景(battlebacks1)を自動的にスクロールします。 + * @author Yoji Ojima + * + * @param Scroll X Variable ID + * @desc 横スクロール速度を指定するための変数のIDです。 + * @default 0 + * + * @param Scroll Y Variable ID + * @desc 縦スクロール速度を指定するための変数のIDです。 + * @default 0 + * + * @help このプラグインには、プラグインコマンドはありません。 + */ + +(function() { + + var parameters = PluginManager.parameters('BattlebackScroll'); + var scrollXVariableId = Number(parameters['Scroll X Variable ID'] || 0); + var scrollYVariableId = Number(parameters['Scroll Y Variable ID'] || 0); + + var _Spriteset_Battle_updateBattleback = + Spriteset_Battle.prototype.updateBattleback; + Spriteset_Battle.prototype.updateBattleback = function() { + _Spriteset_Battle_updateBattleback.call(this); + var scrollX = $gameVariables.value(scrollXVariableId); + var scrollY = $gameVariables.value(scrollYVariableId); + if (scrollX) { + this._back1Sprite.origin.x += scrollX / 8; + } + if (scrollY) { + this._back1Sprite.origin.y += scrollY / 8; + } + }; + +})(); diff --git a/js/plugins/ChangeWeaponOnBattle.js b/js/plugins/ChangeWeaponOnBattle.js new file mode 100644 index 0000000..11da0b1 --- /dev/null +++ b/js/plugins/ChangeWeaponOnBattle.js @@ -0,0 +1,234 @@ +//============================================================================= +// ChangeWeaponOnBattle.js +//============================================================================= + +/*: + * @plugindesc make battle command that changes weapon. + * @author Sasuke KANNAZUKI + * + * @param commandName + * @desc command name that change equip + * @default Equip + * + * @help This plugin does not provide plugin commands. + * + * - changable equips are only weapon(s) and shield. + * - changing weapon doesn't consume turn. + * + */ + +/*:ja + * @plugindesc 戦闘コマンドに装備変更を追加 + * @author 神無月サスケ + * + * @param commandName + * @desc 装備変更のコマンド名です。 + * @default 装備変更 + * + * @help このプラグインには、プラグインコマンドはありません。 + * + * - 変更可能なのは武器と盾だけです。 + * - 装備変更はターンを消費しません。 + * + */ + +(function() { + + var parameters = PluginManager.parameters('ChangeWeaponOnBattle'); + var commandName = parameters['commandName'] || 'Equip'; + + //--------------------------------------------------------------------------- + // Tiny equip status + // display only atk and def. + // + function Window_TinyEquipStatus() { + this.initialize.apply(this, arguments); + } + + Window_TinyEquipStatus.prototype = + Object.create(Window_EquipStatus.prototype); + Window_TinyEquipStatus.prototype.constructor = Window_TinyEquipStatus; + + Window_TinyEquipStatus.prototype.initialize = function(x, y) { + Window_EquipStatus.prototype.initialize.call(this, x, y); + }; + + Window_TinyEquipStatus.prototype.numVisibleRows = function() { + return 2; + }; + + Window_TinyEquipStatus.prototype.refresh = function() { + this.contents.clear(); + if (this._actor) { + for (var i = 0; i < 2; i++) { + this.drawItem(0, this.lineHeight() * i, 2 + i); + } + } + }; + + //--------------------------------------------------------------------------- + // Tiny equip slot + // display only a weapon, and a shield or another weapon. + // + function Window_TinyEquipSlot() { + this.initialize.apply(this, arguments); + } + + Window_TinyEquipSlot.prototype = Object.create(Window_EquipSlot.prototype); + Window_TinyEquipSlot.prototype.constructor = Window_TinyEquipSlot; + + Window_TinyEquipSlot.prototype.initialize = function(x, y, width, height) { + Window_EquipSlot.prototype.initialize.call(this, x, y, width, height); + }; + + Window_TinyEquipSlot.prototype.maxItems = function() { + return this._actor ? 2 : 0; + }; + + Window_TinyEquipSlot.prototype.show = function() { + Window_EquipSlot.prototype.show.call(this); + this.showHelpWindow(); + }; + + Window_TinyEquipSlot.prototype.hide = function() { + Window_EquipSlot.prototype.hide.call(this); + this.hideHelpWindow(); + }; + + //--------------------------------------------------------------------------- + + // + // add equipment windows for check active. + // + var _Scene_Battle_isAnyInputWindowActive = + Scene_Battle.prototype.isAnyInputWindowActive; + Scene_Battle.prototype.isAnyInputWindowActive = function() { + if(_Scene_Battle_isAnyInputWindowActive.call(this)) { + return true; + } + return (this._equipSlotWindow.active || this._equipItemWindow.active); + }; + + // + // creat new windows for equip weapon(s) on battle + // + var _Scene_Battle_createAllWindows = Scene_Battle.prototype.createAllWindows; + Scene_Battle.prototype.createAllWindows = function() { + _Scene_Battle_createAllWindows.call(this); + this.createEquipStatusWindow(); + this.createEquipSlotWindow(); + this.createEquipItemWindow(); + }; + + Scene_Battle.prototype.createEquipStatusWindow = function() { + this._equipStatusWindow = + new Window_TinyEquipStatus(0, this._helpWindow.height); + this._equipStatusWindow.hide(); + this.addWindow(this._equipStatusWindow); + }; + + Scene_Battle.prototype.createEquipSlotWindow = function() { + var wx = this._equipStatusWindow.width; + var wy = this._helpWindow.height; + var ww = Graphics.boxWidth - this._equipStatusWindow.width; + var wh = this._equipStatusWindow.height; + this._equipSlotWindow = new Window_TinyEquipSlot(wx, wy, ww, wh); + this._equipSlotWindow.setHelpWindow(this._helpWindow); + this._equipSlotWindow.setStatusWindow(this._equipStatusWindow); + this._equipSlotWindow.setHandler('ok', this.onEquipSlotOk.bind(this)); + this._equipSlotWindow.setHandler('cancel', + this.onEquipSlotCancel.bind(this)); + this._equipSlotWindow.hide(); + this.addWindow(this._equipSlotWindow); + }; + + Scene_Battle.prototype.createEquipItemWindow = function() { + var wx = 0; + var wy = this._equipStatusWindow.y + this._equipStatusWindow.height; + var ww = Graphics.boxWidth; + var wh = Graphics.boxHeight - wy - this._statusWindow.height; + this._equipItemWindow = new Window_EquipItem(wx, wy, ww, wh); + this._equipItemWindow.setHelpWindow(this._helpWindow); + this._equipItemWindow.setStatusWindow(this._equipStatusWindow); + this._equipItemWindow.setHandler('ok', this.onEquipItemOk.bind(this)); + this._equipItemWindow.setHandler('cancel', + this.onEquipItemCancel.bind(this)); + this._equipSlotWindow.setItemWindow(this._equipItemWindow); + this._equipItemWindow.hide(); + this.addWindow(this._equipItemWindow); + }; + + // + // add command to actor command window + // + var _Scene_Battle_createActorCommandWindow = + Scene_Battle.prototype.createActorCommandWindow; + Scene_Battle.prototype.createActorCommandWindow = function() { + _Scene_Battle_createActorCommandWindow.call(this); + this._actorCommandWindow.setHandler('equip', this.commandEquip.bind(this)); + }; + + var _Window_ActorCommand_makeCommandList = + Window_ActorCommand.prototype.makeCommandList; + Window_ActorCommand.prototype.makeCommandList = function() { + _Window_ActorCommand_makeCommandList.call(this); + if (this._actor) { + this.addEquipCommand(); + } + }; + + Window_ActorCommand.prototype.addEquipCommand = function() { + this.addCommand(commandName, 'equip'); + }; + + // + // process handlers + // + Scene_Battle.prototype.refreshActor = function() { + var actor = BattleManager.actor(); + this._equipStatusWindow.setActor(actor); + this._equipSlotWindow.setActor(actor); + this._equipItemWindow.setActor(actor); + }; + + Scene_Battle.prototype.commandEquip = function() { + this.refreshActor(); + this._equipStatusWindow.show(); + this._equipItemWindow.refresh(); + this._equipItemWindow.show(); + this._equipSlotWindow.refresh(); + this._equipSlotWindow.show(); + this._equipSlotWindow.activate(); + this._equipSlotWindow.select(0); + }; + + Scene_Battle.prototype.onEquipSlotOk = function() { + this._equipItemWindow.activate(); + this._equipItemWindow.select(0); + }; + + Scene_Battle.prototype.onEquipSlotCancel = function() { + this._equipStatusWindow.hide(); + this._equipItemWindow.hide(); + this._equipSlotWindow.hide(); + this._actorCommandWindow.activate(); + this._actorCommandWindow.select(0); + }; + + Scene_Battle.prototype.onEquipItemOk = function() { + SoundManager.playEquip(); + BattleManager.actor().changeEquip(this._equipSlotWindow.index(), + this._equipItemWindow.item()); + this._equipSlotWindow.activate(); + this._equipSlotWindow.refresh(); + this._equipItemWindow.deselect(); + this._equipItemWindow.refresh(); + this._equipStatusWindow.refresh(); + }; + + Scene_Battle.prototype.onEquipItemCancel = function() { + this._equipSlotWindow.activate(); + this._equipItemWindow.deselect(); + }; + +})(); diff --git a/js/plugins/ConfigureRootElement.js b/js/plugins/ConfigureRootElement.js new file mode 100644 index 0000000..9509fad --- /dev/null +++ b/js/plugins/ConfigureRootElement.js @@ -0,0 +1,265 @@ +//============================================================================= +// ConfigureRootElement.js +// Version: 1.0.0 +//---------------------------------------------------------------------------- +// Copyright (c) 2016 DeNA +// RPGMV 1.0.0 +//============================================================================= + +//============================================================================= + /*: + * @plugindesc v1.00 任意のroot要素にゲーム本体の要素を追加できるようにするpluginです + * @author DeNA + * + * @param ---General--- + * @default + * + * @param Root Element Id + * @default + * + * @help + * ============================================================================ + * Introduction + * ============================================================================ + * + * このpluginはgameの要素を追加するroot要素を指定できます。 + * + * # ConfigureRootElement.js + * + * ## 使い方 + * * GUI上からConfigureRootElement の"Root Element Id"に任意のDOMのidを指定する * ことでゲームが表示される領域をコントロールすることができます。 + * + * ## 実装 + * + * ### RootElementの指定 + * 以下の部分を参照ください。 + * + * ``` + * var Parameters = PluginManager.parameters('ConfigureRootElement'); + * var RootElementId = String(Parameters['Root Element Id']); + * var GAME_ROOT_ELEMENT_NODE_KEY = 'ConfigureRootElement_Root_Element_Node_Key'; + * try { + * if (RootElementId) { + * PluginManager.setParameters(GAME_ROOT_ELEMENT_NODE_KEY, document.getElementById(RootElementId)); + * } else if (!(PluginManager.parameters(GAME_ROOT_ELEMENT_NODE_KEY) instanceof HTMLElement)) { + * PluginManager.setParameters(GAME_ROOT_ELEMENT_NODE_KEY, document.body); + * } + * } catch (e) { + * console.info('Caution! set default root element, document.body.'); + * PluginManager.setParameters(GAME_ROOT_ELEMENT_NODE_KEY, document.body); + * } + * ``` + * + * ### 表示位置のコントロール + * + * * rpg_core.jsのGraphicsの以下の関数をオーバーライドすることで表示位置をコントロールしています。(rpg_core.jsに変更が入った場合はご注意ください。) + * * Graphics.pageToCanvasX + * * Graphics._createErrorPrinter + * * Graphics._createCanvas + * * Graphics._createVideo + * * Graphics._createUpperCanvas + * * Graphics._createModeBox + * * Graphics._createFontLoader + * * Graphics._disableTextSelection + * * Graphics._disableContextMenu + * * Graphics._requestFullScreen + * + * ============================================================================ + * Changelog + * ============================================================================ + * + * Version 1.00: + * - Finished plugin! + */ +//============================================================================= + +(function() { + //----------------------------------------------------------------------------- + // setup + + var Parameters = PluginManager.parameters('ConfigureRootElement'); + var RootElementId = String(Parameters['Root Element Id']); + var GAME_ROOT_ELEMENT_NODE_KEY = 'ConfigureRootElement_Root_Element_Node_Key'; + try { + if (RootElementId) { + PluginManager.setParameters(GAME_ROOT_ELEMENT_NODE_KEY, document.getElementById(RootElementId)); + } else if (!(PluginManager.parameters(GAME_ROOT_ELEMENT_NODE_KEY) instanceof HTMLElement)) { + PluginManager.setParameters(GAME_ROOT_ELEMENT_NODE_KEY, document.body); + } + } catch (e) { + console.info('Caution! set default root element, document.body.'); + PluginManager.setParameters(GAME_ROOT_ELEMENT_NODE_KEY, document.body); + } + + //----------------------------------------------------------------------------- + // override Graphics + + /** + * Converts an x coordinate on the page to the corresponding + * x coordinate on the canvas area. + * + * @static + * @method pageToCanvasX + * @param {Number} x The x coordinate on the page to be converted + * @return {Number} The x coordinate on the canvas area + */ + Graphics.pageToCanvasX = function(x) { + if (this._canvas) { + var left = this._canvas.getBoundingClientRect().left; + return Math.round((x - left) / this._realScale); + } else { + return 0; + } + }; + + /** + * @static + * @method _createErrorPrinter + * @private + */ + Graphics._createErrorPrinter = function() { + this._errorPrinter = document.createElement('p'); + this._errorPrinter.id = 'ErrorPrinter'; + this._updateErrorPrinter(); + PluginManager.parameters(GAME_ROOT_ELEMENT_NODE_KEY).appendChild(this._errorPrinter); + }; + + /** + * @static + * @method _createCanvas + * @private + */ + Graphics._createCanvas = function() { + this._canvas = document.createElement('canvas'); + this._canvas.id = 'GameCanvas'; + this._updateCanvas(); + PluginManager.parameters(GAME_ROOT_ELEMENT_NODE_KEY).appendChild(this._canvas); + }; + + /** + * @static + * @method _createVideo + * @private + */ + Graphics._createVideo = function() { + this._video = document.createElement('video'); + this._video.id = 'GameVideo'; + this._video.style.opacity = 0; + this._updateVideo(); + PluginManager.parameters(GAME_ROOT_ELEMENT_NODE_KEY).appendChild(this._video); + }; + + /** + * @static + * @method _createUpperCanvas + * @private + */ + Graphics._createUpperCanvas = function() { + this._upperCanvas = document.createElement('canvas'); + this._upperCanvas.id = 'UpperCanvas'; + this._updateUpperCanvas(); + PluginManager.parameters(GAME_ROOT_ELEMENT_NODE_KEY).appendChild(this._upperCanvas); + }; + + /** + * @static + * @method _createModeBox + * @private + */ + Graphics._createModeBox = function() { + var box = document.createElement('div'); + box.id = 'modeTextBack'; + box.style.position = 'absolute'; + box.style.left = '5px'; + box.style.top = '5px'; + box.style.width = '119px'; + box.style.height = '58px'; + box.style.background = 'rgba(0,0,0,0.2)'; + box.style.zIndex = 9; + box.style.opacity = 0; + + var text = document.createElement('div'); + text.id = 'modeText'; + text.style.position = 'absolute'; + text.style.left = '0px'; + text.style.top = '41px'; + text.style.width = '119px'; + text.style.fontSize = '12px'; + text.style.fontFamily = 'monospace'; + text.style.color = 'white'; + text.style.textAlign = 'center'; + text.style.textShadow = '1px 1px 0 rgba(0,0,0,0.5)'; + text.innerHTML = this.isWebGL() ? 'WebGL mode' : 'Canvas mode'; + + PluginManager.parameters(GAME_ROOT_ELEMENT_NODE_KEY).appendChild(box); + box.appendChild(text); + + this._modeBox = box; + }; + + /** + * @static + * @method _createFontLoader + * @param {String} name + * @private + */ + Graphics._createFontLoader = function(name) { + var div = document.createElement('div'); + var text = document.createTextNode('.'); + div.style.fontFamily = name; + div.style.fontSize = '0px'; + div.style.color = 'transparent'; + div.style.position = 'absolute'; + div.style.margin = 'auto'; + div.style.top = '0px'; + div.style.left = '0px'; + div.style.width = '1px'; + div.style.height = '1px'; + div.appendChild(text); + PluginManager.parameters(GAME_ROOT_ELEMENT_NODE_KEY).appendChild(div); + }; + + /** + * @static + * @method _disableTextSelection + * @private + */ + Graphics._disableTextSelection = function() { + var body = PluginManager.parameters(GAME_ROOT_ELEMENT_NODE_KEY); + body.style.userSelect = 'none'; + body.style.webkitUserSelect = 'none'; + body.style.msUserSelect = 'none'; + body.style.mozUserSelect = 'none'; + }; + + /** + * @static + * @method _disableContextMenu + * @private + */ + Graphics._disableContextMenu = function() { + var elements = PluginManager.parameters(GAME_ROOT_ELEMENT_NODE_KEY).getElementsByTagName('*'); + var oncontextmenu = function() { return false; }; + for (var i = 0; i < elements.length; i++) { + elements[i].oncontextmenu = oncontextmenu; + } + }; + + /** + * @static + * @method _requestFullScreen + * @private + */ + Graphics._requestFullScreen = function() { + var element = PluginManager.parameters(GAME_ROOT_ELEMENT_NODE_KEY); + if (element.requestFullScreen) { + element.requestFullScreen(); + } else if (element.mozRequestFullScreen) { + element.mozRequestFullScreen(); + } else if (element.webkitRequestFullScreen) { + element.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT); + } else if (element.msRequestFullscreen) { + element.msRequestFullscreen(); + } + }; +})(); diff --git a/js/plugins/DeadOrAliveItem.js b/js/plugins/DeadOrAliveItem.js new file mode 100644 index 0000000..da2b599 --- /dev/null +++ b/js/plugins/DeadOrAliveItem.js @@ -0,0 +1,188 @@ +//============================================================================= +// DeadOrAliveItem.js +//============================================================================= + +/*: + * @plugindesc make item/skill whose scope is both dead or alive. + * @author Sasuke KANNAZUKI + * + * @help This plugin does not provide plugin commands. + * + * Skill/Item Note: + * + * + * usage example: + * - a skill that revive dead member with full HP, + * if use it to living menber, recover full HP. + */ +/*:ja + * @plugindesc 戦闘不能かどうかに関係なく、仲間に使える技/アイテムを作成 + * @author 神無月サスケ + * + * @help このプラグインにはプラグインコマンドはありません。 + * + * スキル/アイテムのメモに以下のように書いてください + * 生死問わず仲間1体への効果になります + *  生死問わず仲間全体への効果になります + * + * 使用例: + * 死者をHP全快で蘇生させる技だが、生きている味方に使用してもHP全快する + */ + +(function() { + + // added item.scope + // 20 : single friend (dead or alive) + // 21 : all friends (dead or alive) + + // + // process data in item.note + // (for efficiency, note is processed at first.) + // + var _Scene_Boot_start = Scene_Boot.prototype.start; + Scene_Boot.prototype.start = function() { + _Scene_Boot_start.call(this); + DataManager.processItemScope(); + }; + + DataManager.processItemScope = function() { + for (var i = 1; i < $dataSkills.length; i++) { + DataManager.checkEachItemScope($dataSkills[i]); + } + for (var i = 1; i < $dataItems.length; i++) { + DataManager.checkEachItemScope($dataItems[i]); + } + }; + + DataManager.checkEachItemScope = function(item) { + var result = item.meta.scope; + if (result){ + if(result == 'oneDeadOrAlive') { + item.scope = 20; + } else if (result == 'allDeadOrAlive') { + item.scope = 21; + } + } + }; + + // + // make status "dead or alive" + // + Game_Action.prototype.isDeadOrAlive = function() { + return this.checkItemScope([20, 21]); + }; + + var _Game_Action_isForFriend = Game_Action.prototype.isForFriend; + Game_Action.prototype.isForFriend = function() { + if (_Game_Action_isForFriend.call(this)) { + return true; + } + return this.checkItemScope([20, 21]); + }; + + var _Game_Action_isForDeadFriend = Game_Action.prototype.isForDeadFriend; + Game_Action.prototype.isForDeadFriend = function() { + if (_Game_Action_isForDeadFriend.call(this)) { + return true; + } + return this.checkItemScope([20, 21]); + }; + + var _Game_Action_isForOne = Game_Action.prototype.isForOne; + Game_Action.prototype.isForOne = function() { + if (_Game_Action_isForOne.call(this)) { + return true; + } + return this.checkItemScope([20]); + }; + + var _Game_Action_isForAll = Game_Action.prototype.isForAll; + Game_Action.prototype.isForAll = function() { + if (_Game_Action_isForAll.call(this)) { + return true; + } + return this.checkItemScope([21]); + }; + + var _Game_Action_needsSelection = Game_Action.prototype.needsSelection; + Game_Action.prototype.needsSelection = function() { + if (_Game_Action_needsSelection.call(this)) { + return true; + } + return this.checkItemScope([20]); + }; + + // + // smooth/random target + // + Game_Unit.prototype.smoothTargetDeadOrAlive = function(index) { + if (index < 0) { + index = 0; + } + var member = this.members()[index]; + return member ? member : this.members()[0]; + }; + + Game_Unit.prototype.randomTargetDeadOrAlive = function() { + var randomDeadTarget = this.randomDeadTarget(); + if( randomDeadTarget ) { + return randomDeadTarget; + } + return this.randomTarget(); + }; + + var _Game_Action_decideRandomTarget = + Game_Action.prototype.decideRandomTarget; + Game_Action.prototype.decideRandomTarget = function() { + var target; + if(this.isDeadOrAlive()){ + target = this.friendsUnit().randomTargetDeadOrAlive(); + if (target) { + this._targetIndex = target.index; + } else { + this.clear(); + } + return; + } + _Game_Action_decideRandomTarget.call(this); + }; + + var _Game_Action_targetsForFriends = Game_Action.prototype.targetsForFriends; + Game_Action.prototype.targetsForFriends = function() { + var targets = []; + var unit = this.friendsUnit(); + if(this.isDeadOrAlive()) { + if (this.isForOne()) { + targets.push(unit.smoothTargetDeadOrAlive(this._targetIndex)); + } else { + targets = unit.members(); + } + return targets; + } + return _Game_Action_targetsForFriends.call(this); + }; + + var _Game_Action_itemTargetCandidates = + Game_Action.prototype.itemTargetCandidates; + Game_Action.prototype.itemTargetCandidates = function() { + if (!this.isValid()) { + return []; + } else if (this.isDeadOrAlive()) { + return this.friendsUnit().members(); + } + return _Game_Action_itemTargetCandidates.call(this); + }; + + var _Game_Action_testApply = Game_Action.prototype.testApply; + Game_Action.prototype.testApply = function(target) { + if(_Game_Action_testApply.call(this, target)) { + return true; + } + // for convenience, always true + if(this.isDeadOrAlive()) { + return true; + } + return false; +}; + +})(); diff --git a/js/plugins/EscapeDungeon.js b/js/plugins/EscapeDungeon.js new file mode 100644 index 0000000..8fb7bc3 --- /dev/null +++ b/js/plugins/EscapeDungeon.js @@ -0,0 +1,109 @@ +//============================================================================= +// EscapeDungeon.js +//============================================================================= + +/*: + * @plugindesc Escape to the specified position from a dungeon. + * @author Sasuke KANNAZUKI + * + * @param mapIdVal + * @desc variable id for escape map ID. + * Escape is disabled when variable number mapIdVal equals 0. + * @default 21 + * + * @param xCoordVal + * @desc variable id for escape x coordinate. + * @default 22 + * + * @param yCoordVal + * @desc variable id for escape y coordinate. + * @default 23 + * + * @help This plugin does not provide plugin commands. + * + * - Set the position variables when player enters the dungeon. + * - Be sure to disable when player exits from the dungeon, + * especially when the player moves to other map by an event. + * (to disable this, let variables number mapIdVal be 0). + * - After escape exection, escape is automatically disabled + * + * check points: + * - this plugin only for menu scene, cannot apply at battle scene. + * - the scope must be 0(none). + * + * Item/Skill Note: + * : the item/skill is for escape. + */ +/*:ja + * @plugindesc ダンジョンから特定の場所にエスケープ + * @author 神無月サスケ + * + * @param mapIdVal + * @desc 脱出するマップのIDを格納するゲーム変数番号 + * この値が 0 の時は、エスケープは出来ません。 + * @default 21 + * + * @param xCoordVal + * @desc 脱出するマップのX座標用の変数を格納するゲーム変数番号 + * @default 22 + * + * @param yCoordVal + * @desc 脱出するマップのY座標用の変数を格納するゲーム変数番号 + * @default 23 + * + * @help このプラグインにプラグインコマンドはありません。 + * + * - プレイヤーがダンジョンに入る際に変数を設定してください。 + * - ダンジョンから出る時は、忘れずにエスケープ禁止にしてください。 + * 特にダンジョンからイベントで別の場所に行く場合は忘れずに。 + * (mapIdVal の変数を 0 にしてください)。 + * - エスケープした後、自動的にエスケープ不可になります。 + * + * チェックポイント: + * - このプラグインはメニュー専用です。戦闘時は使用できません。 + * - 「範囲」は「なし」にしてください。 + * + * アイテムや魔法のメモに以下を書くとエスケープとみなされます: + * + */ + +(function() { + var parameters = PluginManager.parameters('EscapeDungeon'); + var mapIdVal = Number(parameters['mapIdVal'] || 21); + var xCoordVal = Number(parameters['xCoordVal'] || 22); + var yCoordVal = Number(parameters['yCoordVal'] || 23); + var reEscape = //i; + + // + // use escape item + // + var _Scene_ItemBase_useItem = Scene_ItemBase.prototype.useItem; + Scene_ItemBase.prototype.useItem = function() { + _Scene_ItemBase_useItem.call(this); + if(reEscape.exec(this.item().note) != null){ + this.useEscapeItem(); + } + }; + + Scene_ItemBase.prototype.useEscapeItem = function() { + var mapId = $gameVariables.value(mapIdVal); + var x = $gameVariables.value(xCoordVal); + var y = $gameVariables.value(yCoordVal); + $gamePlayer.reserveTransfer(mapId, x, y, 2, 0); + SceneManager.goto(Scene_Map); + $gameVariables.setValue(mapIdVal, 0); // disable escape + }; + + // + // check whether one can escape or not + // + var _Game_BattlerBase_meetsUsableItemConditions = + Game_BattlerBase.prototype.meetsUsableItemConditions; + Game_BattlerBase.prototype.meetsUsableItemConditions = function(item) { + if (reEscape.exec(item.note) != null && + $gameVariables.value(mapIdVal) == 0) { + return false; + } + return _Game_BattlerBase_meetsUsableItemConditions.call(this, item); + }; +})(); diff --git a/js/plugins/EventSelector.js b/js/plugins/EventSelector.js new file mode 100644 index 0000000..a4b331b --- /dev/null +++ b/js/plugins/EventSelector.js @@ -0,0 +1,215 @@ +//============================================================================= +// EventSelector.js +//============================================================================= + +/*: + * @plugindesc Displays a window to select a common event. + * @author Yoji Ojima + * + * @help + * + * Plugin Command: + * EventSelector open # Open the event selector window + * EventSelector add 3 # Add common event #3 to the selector + * EventSelector remove 4 # Remove common event #4 from the selector + * EventSelector clear # Clear the event selector + */ + +/*:ja + * @plugindesc コモンイベントを選択するウィンドウを表示します。 + * @author Yoji Ojima + * + * @help + * + * プラグインコマンド: + * EventSelector open # イベント選択ウィンドウを開く + * EventSelector add 3 # コモンイベント3番をイベント選択に追加 + * EventSelector remove 4 # コモンイベント4番をイベント選択から削除 + * EventSelector clear # イベント選択をクリア + */ + +(function() { + + var eventSelectorStatus = ''; + var selectedCommonEvent = null; + + var _Game_Interpreter_pluginCommand = + Game_Interpreter.prototype.pluginCommand; + Game_Interpreter.prototype.pluginCommand = function(command, args) { + _Game_Interpreter_pluginCommand.call(this, command, args); + if (command === 'EventSelector') { + switch (args[0]) { + case 'open': + eventSelectorStatus = 'open'; + this.setWaitMode('EventSelector'); + break; + case 'add': + $gameSystem.addToEventSelector(Number(args[1])); + break; + case 'remove': + $gameSystem.removeFromEventSelector(Number(args[1])); + break; + case 'clear': + $gameSystem.clearEventSelector(); + break; + } + } + }; + + var _Game_Interpreter_updateWaitMode = + Game_Interpreter.prototype.updateWaitMode; + Game_Interpreter.prototype.updateWaitMode = function() { + if (this._waitMode === 'EventSelector') { + if (eventSelectorStatus === 'close') { + this._waitMode = ''; + if (selectedCommonEvent) { + this.setupChild(selectedCommonEvent.list); + this._callingSelectedEvent = true; + } + eventSelectorStatus = ''; + } + return true; + } else { + return _Game_Interpreter_updateWaitMode.call(this); + } + }; + + var _Game_Interpreter_updateChild = Game_Interpreter.prototype.updateChild; + Game_Interpreter.prototype.updateChild = function() { + var result = _Game_Interpreter_updateChild.call(this); + if (this._callingSelectedEvent && !result) { + this._callingSelectedEvent = false; + eventSelectorStatus = 'open'; + this.setWaitMode('EventSelector'); + return true; + } + return result; + }; + + Game_System.prototype.addToEventSelector = function(commonEventId) { + if (!this._eventSelectorData) { + this.clearEventSelector(); + } + if (!this._eventSelectorData.contains(commonEventId)) { + this._eventSelectorData.push(commonEventId); + } + }; + + Game_System.prototype.removeFromEventSelector = function(commonEventId) { + if (this._eventSelectorData) { + var index = this._eventSelectorData.indexOf(commonEventId); + if (index >= 0) { + this._eventSelectorData.splice(index, 1); + } + } + }; + + Game_System.prototype.clearEventSelector = function() { + this._eventSelectorData = []; + }; + + Game_System.prototype.eventSelectorData = function() { + if (this._eventSelectorData) { + return this._eventSelectorData.clone(); + } else { + return []; + } + }; + + var _Scene_Map_createAllWindows = Scene_Map.prototype.createAllWindows; + Scene_Map.prototype.createAllWindows = function() { + _Scene_Map_createAllWindows.call(this); + this._eventSelectorWindow = new Window_EventSelector(0, 0); + this.addChild(this._eventSelectorWindow); + }; + + function Window_EventSelector() { + this.initialize.apply(this, arguments); + } + + Window_EventSelector.prototype = Object.create(Window_Selectable.prototype); + Window_EventSelector.prototype.constructor = Window_EventSelector; + + Window_EventSelector.lastTopRow = 0; + Window_EventSelector.lastIndex = 0; + + Window_EventSelector.prototype.initialize = function(x, y) { + var width = Graphics.boxWidth; + var height = this.fittingHeight(4); + Window_Selectable.prototype.initialize.call(this, x, y, width, height); + this.openness = 0; + this.deactivate(); + this.setHandler('ok', this.onOk.bind(this)); + this.setHandler('cancel', this.onCancel.bind(this)); + }; + + Window_EventSelector.prototype.maxCols = function() { + return 3; + }; + + Window_EventSelector.prototype.maxItems = function() { + return this._list ? this._list.length : 0; + }; + + Window_EventSelector.prototype.update = function() { + Window_Selectable.prototype.update.call(this); + switch (eventSelectorStatus) { + case 'open': + this.refresh(); + this.setTopRow(Window_EventSelector.lastTopRow); + this.select(Window_EventSelector.lastIndex); + this.open(); + this.activate(); + eventSelectorStatus = 'select'; + break; + case 'select': + if (this.isClosed()) { + eventSelectorStatus = 'close'; + } + break; + } + }; + + Window_EventSelector.prototype.refresh = function() { + var data = $gameSystem.eventSelectorData(); + this._list = []; + for (var i = 0; i < data.length; i++) { + var commonEvent = $dataCommonEvents[data[i]]; + if (commonEvent) { + this._list.push(commonEvent); + } + } + this.createContents(); + this.drawAllItems(); + }; + + Window_EventSelector.prototype.drawItem = function(index) { + var commonEvent = this._list[index]; + var rect = this.itemRectForText(index); + this.drawText(commonEvent.name, rect.x, rect.y, rect.width); + }; + + Window_EventSelector.prototype.isCurrentItemEnabled = function() { + var commonEvent = this._list[this.index()]; + return !!commonEvent; + }; + + Window_EventSelector.prototype.isOkTriggered = function() { + return Input.isTriggered('ok'); + }; + + Window_EventSelector.prototype.onOk = function() { + selectedCommonEvent = this._list[this.index()]; + Window_EventSelector.lastTopRow = this.topRow(); + Window_EventSelector.lastIndex = this.index(); + this.close(); + }; + + Window_EventSelector.prototype.onCancel = function() { + selectedCommonEvent = null; + Window_EventSelector.lastTopRow = this.topRow(); + Window_EventSelector.lastIndex = this.index(); + this.close(); + }; + +})(); diff --git a/js/plugins/ExtraEquipType.js b/js/plugins/ExtraEquipType.js new file mode 100644 index 0000000..df72039 --- /dev/null +++ b/js/plugins/ExtraEquipType.js @@ -0,0 +1,170 @@ +//============================================================================= +// ExtraEquipType.js +//============================================================================= + +/*: + * @plugindesc add/remove extra equip type to an actor + * @author Sasuke KANNAZUKI + * @help + * Plugin Command: + * ExtraEquipType arg0 arg1 arg2 arg3 + * arg0 must be 'add' or 'remove'. + * arg1 must be actor ID number. + * arg2 must be 'weapon' or 'armor'. + * arg3 must be type id number of weapon/armor. + * ex. + * ExtraEquipType add 1 weapon 4 # actor#1 can equip weapon whose type is 4. + * ExtraEquipType remove 2 armor 3 # actor#2 cannot equip armor whose type is 3 + * note: + * database is higher priority than this plugin. so, even if an actor is + * removed equip type, it won't disable if it's enabled on database. + * + */ +/*:ja + * @plugindesc クラスや装備を変更せずに、武器/防具タイプを増やす + * @author 神無月サスケ + * @help + * プラグインコマンドの書式: + * ExtraEquipType arg0 arg1 arg2 arg3 + * arg0 は add か remove にします。addだと追加、removeだと削除です。 + * arg1 は 装備可能にするアクターのIDです。 + * arg2 は weapon か armor にします。 + * arg3 は タイプIDです。 + * + * 例: + * ExtraEquipType add 1 weapon 5 + * → アクターID1番のキャラが、武器タイプ5(ムチ)を装備可能になります。 + * ExtraEquipType add 3 armor 6 + * → アクターID3番のキャラが、防具タイプ6(大型盾)を装備可能になります。 + * ExtraEquipType remove 1 weapon 5 + * → アクターID1番のキャラが、さっき装備可能になったムチが装備出来なくなります。 + * ムチを装備していた場合、自動的にはずされます。 + * ExtraEquipType remove 3 armor 6 + * → アクターID3番のキャラが、さっき装備可能になった大型盾が装備できなくなります。 + * 大型盾を装備していた場合、自動的にはずされます。 + * + * 注意: + * remove で装備出来なくなるのは、このプラグインで装備可能にしたものだけで、 + * データベースで装備可能になっているものは、removeしても装備不可にはなりません。 + */ + +(function() { + // + // process plugin commands + // + var _Game_Interpreter_pluginCommand = + Game_Interpreter.prototype.pluginCommand; + Game_Interpreter.prototype.pluginCommand = function(command, args) { + _Game_Interpreter_pluginCommand.call(this, command, args); + if (command === 'ExtraEquipType') { + var actor = $gameActors.actor(Number(args[1])); + var typeId = Number(args[3]); + if (!actor || typeId == 0){ + return; + } + if(args[0] === 'add'){ + if(args[2] === 'weapon'){ + actor.addWtypeId(typeId); + } else if (args[2] === 'armor'){ + actor.addAtypeId(typeId); + } + } else if (args[0] === 'remove'){ + if(args[2] === 'weapon'){ + actor.removeWtypeId(typeId); + actor.releaseUnequippableItems(false); + } else if (args[2] === 'armor'){ + actor.removeAtypeId(typeId); + actor.releaseUnequippableItems(false); + } + } + } + }; + + // + // initialize + // + var _Game_Actor_initialize = Game_Actor.prototype.initialize; + Game_Actor.prototype.initialize = function(actorId) { + _Game_Actor_initialize.call(this, actorId); + this.initAddedWtypeIds(); + this.initAddedAtypeIds(); + }; + + Game_Actor.prototype.initAddedWtypeIds = function() { + this._addedWtypeIds = []; + }; + + Game_Actor.prototype.initAddedAtypeIds = function() { + this._addedAtypeIds = []; + }; + + // + // add W/AtypeId + // + Game_Actor.prototype.addWtypeId = function(wtypeId) { + if(!this._addedWtypeIds) { + this.initAddedWtypeIds(); + } + this._addedWtypeIds[wtypeId] = true; + }; + + Game_Actor.prototype.addAtypeId = function(atypeId) { + if(!this._addedAtypeIds){ + this.initAddedAtypeIds(); + } + this._addedAtypeIds[atypeId] = true; + }; + + // + // remove W/AtypeId + // + Game_Actor.prototype.removeWtypeId = function(wtypeId) { + if(!this._addedWtypeIds) { + this.initAddedWtypeIds(); + } + this._addedWtypeIds[wtypeId] = false; + }; + + Game_Actor.prototype.removeAtypeId = function(atypeId) { + if(!this._addedAtypeIds) { + this.initAddedAtypeIds(); + } + this._addedAtypeIds[atypeId] = false; + }; + + // + // check W/AtypeId is added or not + // + Game_Actor.prototype.isAddedWtypeId = function(wtypeId){ + if(!this._addedWtypeIds) { + return false; + } + return !!this._addedWtypeIds[wtypeId]; + }; + + Game_Actor.prototype.isAddedAtypeId = function(atypeId){ + if(!this._addedAtypeIds) { + return false; + } + return !!this._addedAtypeIds[atypeId]; + }; + + // + // check whether the actor can equip it. + // + var _Game_Actor_isEquipWtypeOk = Game_Actor.prototype.isEquipWtypeOk; + Game_Actor.prototype.isEquipWtypeOk = function(wtypeId) { + if(this.isAddedWtypeId(wtypeId)) { + return true; + } + return _Game_Actor_isEquipWtypeOk.call(this, wtypeId); + }; + + var _Game_Actor_isEquipAtypeOk = Game_Actor.prototype.isEquipAtypeOk; + Game_Actor.prototype.isEquipAtypeOk = function(atypeId) { + if(this.isAddedAtypeId(atypeId)) { + return true; + } + return _Game_Actor_isEquipAtypeOk.call(this, atypeId); + }; +})(); diff --git a/js/plugins/FixGuardMotion.js b/js/plugins/FixGuardMotion.js new file mode 100644 index 0000000..385af5c --- /dev/null +++ b/js/plugins/FixGuardMotion.js @@ -0,0 +1,17 @@ +(function() { + var _Sprite_Actor_refreshMotion + = Sprite_Actor.prototype.refreshMotion; + + Sprite_Actor.prototype.refreshMotion = function() { + var actor = this._actor, + motionGuard = Sprite_Actor.MOTIONS['guard']; + + if (actor) { + if (this._motion === motionGuard && !BattleManager.isInputting()) { + return; + } + + _Sprite_Actor_refreshMotion.call(this); + } + }; +}()); \ No newline at end of file diff --git a/js/plugins/FixedBattleMembers.js b/js/plugins/FixedBattleMembers.js new file mode 100644 index 0000000..3f73f11 --- /dev/null +++ b/js/plugins/FixedBattleMembers.js @@ -0,0 +1,65 @@ +//============================================================================= +// FixedBattleMembers.js +//============================================================================= + +/*: + * @plugindesc Forbids formation change to the specified party members. + * @author Yoji Ojima + * + * @help + * + * Plugin Command: + * FixedBattleMembers 1 # Fixed battle members = the actor #1 + * FixedBattleMembers 2 3 # Fixed battle members = the actor #2 and #3 + * FixedBattleMembers # Clears the fixed battle members + */ + +/*:ja + * @plugindesc 指定したパーティメンバーの並び替えを禁止します。 + * @author Yoji Ojima + * + * @help + * + * プラグインコマンド: + * FixedBattleMembers 1 # アクター1番を固定メンバーにする + * FixedBattleMembers 2 3 # アクター2番と3番を固定メンバーにする + * FixedBattleMembers # 固定メンバーの指定を解除する + */ + +(function() { + + var _Game_Interpreter_pluginCommand = + Game_Interpreter.prototype.pluginCommand; + Game_Interpreter.prototype.pluginCommand = function(command, args) { + _Game_Interpreter_pluginCommand.call(this, command, args); + if (command === 'FixedBattleMembers') { + var members = $gameParty.allMembers(); + $gameParty.fixedBattleMembers = []; + for (var i = 0; i < members.length; i++) { + $gameParty.removeActor(members[i].actorId()); + } + for (i = 0; i < args.length; i++) { + var actorId = Number(args[i]); + if ($dataActors[actorId]) { + $gameParty.fixedBattleMembers.push(actorId); + $gameParty.addActor(actorId); + } + } + for (i = 0; i < members.length; i++) { + $gameParty.addActor(members[i].actorId()); + } + } + }; + + var _Game_Actor_isFormationChangeOk = + Game_Actor.prototype.isFormationChangeOk; + Game_Actor.prototype.isFormationChangeOk = function() { + var array = $gameParty.fixedBattleMembers; + if (array && array.contains(this.actorId())) { + return false; + } else { + return _Game_Actor_isFormationChangeOk.call(this); + } + }; + +})(); diff --git a/js/plugins/Foreground.js b/js/plugins/Foreground.js new file mode 100644 index 0000000..ea900ef --- /dev/null +++ b/js/plugins/Foreground.js @@ -0,0 +1,322 @@ +//============================================================================= +// Foreground.js (Ver1.0.1) +//============================================================================= +// [History] +// 2015.Nov. 7 1.0.0 First Release +// 2018.Sep.19 1.0.1 Fix bug when 'event command -> test' becomes error + +/*: + * @plugindesc display foreground tiling sprite(Ver1.0.1) + * @author Sasuke KANNAZUKI (thanks to Yoji Ojima) + * + * @noteParam fgName + * @noteRequire 1 + * @noteDir img/parallaxes/ + * @noteType file + * @noteData maps + * + * @help This plugin does not provide plugin commands. + * + * 'foreground' is like a parallax that displays over the map. + * put bitmap file at img/parallaxes. + * + * Map Note: + * write down following 5 settings at map's note. + * name is the string, file name of tiling sprite. + * if the name starts '!', it is regarded as "foreground zero". + * the filename is searched from img/parallaxes. + * number is the flag of loop x. 0:no 1:yes + * if this is not written on the note, it'll be 0(=no). + * number is the flag of loop y. 0:no 1:yes + * if this is not written on the note, it'll be 0(=no). + * number is x scroll speed. + * when it doesn't loop x, this is ignored. + * if this is not written on the note, it'll be 0. + * number is y scroll speed. + * when it doesn't loop y, this is ignored. + * if this is not written on the note, it'll be 0. + * + * Ex. + * + * + * + * + * [License] + * this plugin is released under MIT license. + * http://opensource.org/licenses/mit-license.php + */ + +/*:ja + * @plugindesc マップに合わせてスクロールする近景の設定(Ver1.0.1) + * @author 神無月サスケ (thanks to Yoji Ojima) + * + * @noteParam fgName + * @noteRequire 1 + * @noteDir img/parallaxes/ + * @noteType file + * @noteData maps + * + * @help このプラグインにプラグインコマンドはありません。 + * 近景(foreground)は、マップの上に表示される遠景のようなものです。 + * 使用する画像ファイルは、img/parallaxes に置いてください。 + * + * マップのメモ: + * 以下の5項目を書いてください(設定項目は、遠景と似ています)。 + * 前景として使うファイル名です(拡張子なし) + * 名前が '!'で始まる場合、遠景同様視差ゼロとなります。 + * ファイルは img/parallaxes に置いてください + * X座標にループするかどうか (0:no 1:yes)。 + * 省略時は0(=no)になります。 + * Y座標にループするかどうか (0:no 1:yes)。 + * 省略時は0(=no)になります。 + * X座標のスクロール速度です + * X座標にループしない場合は無視されます。 + * 省略時は0になります。 + * Y座標のスクロール速度です + * Y座標にループしない場合は無視されます。 + * 省略時は0になります。 + * + * 例: + * + * sample1.png が前景になり、斜め上にループします。 + * + * + * 視差ゼロで!sample1.png が表示されます。 + * + * ■ライセンス表記 + * このプラグインは MIT ライセンスで配布されます。 + * ご自由にお使いください。 + * http://opensource.org/licenses/mit-license.php + */ + +(function() { + // + // check zero foreground or not. + // + ImageManager.isZeroForeground = function(filename) { + return filename.charAt(0) === '!'; + }; + + // + // map initialization + // + var _Game_Map_initialize = Game_Map.prototype.initialize; + Game_Map.prototype.initialize = function() { + _Game_Map_initialize.call(this); + this.initForeground(); + }; + + Game_Map.prototype.initForeground = function(){ + this._foregroundDefined = true; + this._foregroundName = ''; + this._foregroundZero = false; + this._foregroundLoopX = false; + this._foregroundLoopY = false; + this._foregroundSx = 0; + this._foregroundSy = 0; + this._foregroundX = 0; + this._foregroundY = 0; + }; + + // + // if foreground is undefined, initialize it. + // + Game_Map.prototype.guardForeground = function(){ + if(!this._foregroundDefined){ + this.initForeground(); + } + }; + + // + // an accessor + // + Game_Map.prototype.foregroundName = function() { + this.guardForeground(); + return this._foregroundName; +}; + + // + // set foreground by reading map's note. + // + var _Game_Map_setup = Game_Map.prototype.setup; + Game_Map.prototype.setup = function(mapId) { + _Game_Map_setup.call(this, mapId); + this.setupForeground(); + }; + + Game_Map.prototype.setupForeground = function() { + if ($dataMap.meta) { + this._foregroundName = $dataMap.meta.fgName || ''; + this._foregroundZero = ImageManager.isZeroForeground( + this._foregroundName); + this._foregroundLoopX = !!$dataMap.meta.fgLoopX; + this._foregroundLoopY = !!$dataMap.meta.fgLoopY; + this._foregroundSx = Number($dataMap.meta.fgSx) || 0; + this._foregroundSy = Number($dataMap.meta.fgSy) || 0; + } + this._foregroundX = 0; + this._foregroundY = 0; + }; + + // + // to display foreground + // + var _Game_Map_setDisplayPos = Game_Map.prototype.setDisplayPos; + Game_Map.prototype.setDisplayPos = function(x, y) { + _Game_Map_setDisplayPos.call(this, x, y); + this.guardForeground(); + if (this.isLoopHorizontal()) { + this._foregroundX = x; + } else { + this._foregroundX = this._displayX; + } + if (this.isLoopVertical()) { + this._foregroundY = y; + } else { + this._foregroundY = this._displayY; + } + }; + + Game_Map.prototype.foregroundOx = function() { + this.guardForeground(); + if (this._foregroundZero) { + return this._foregroundX * this.tileWidth(); + } else if (this._foregroundLoopX) { + return this._foregroundX * this.tileWidth() / 2; + } else { + return 0; + } + }; + + Game_Map.prototype.foregroundOy = function() { + this.guardForeground(); + if (this._foregroundZero) { + return this._foregroundY * this.tileHeight(); + } else if (this._foregroundLoopY) { + return this._foregroundY * this.tileHeight() / 2; + } else { + return 0; + } + }; + + // + // to scroll foreground + // + var _Game_Map_scrollDown = Game_Map.prototype.scrollDown; + Game_Map.prototype.scrollDown = function(distance) { + var lastY = this._displayY; + _Game_Map_scrollDown.call(this, distance); + this.guardForeground(); + if (this.isLoopVertical()) { + if (this._foregroundLoopY) { + this._foregroundY += distance; + } + } else if (this.height() >= this.screenTileY()) { + var displayY = Math.min(lastY + distance, + this.height() - this.screenTileY()); + this._foregroundY += displayY - lastY; + } + }; + + var _Game_Map_scrollLeft = Game_Map.prototype.scrollLeft; + Game_Map.prototype.scrollLeft = function(distance) { + var lastX = this._displayX; + _Game_Map_scrollLeft.call(this, distance); + this.guardForeground(); + if (this.isLoopHorizontal()) { + if (this._foregroundLoopX) { + this._foregroundX -= distance; + } + } else if (this.width() >= this.screenTileX()) { + var displayX = Math.max(lastX - distance, 0); + this._foregroundX += displayX - lastX; + } + }; + + var _Game_Map_scrollRight = Game_Map.prototype.scrollRight; + Game_Map.prototype.scrollRight = function(distance) { + var lastX = this._displayX; + _Game_Map_scrollRight.call(this, distance); + this.guardForeground(); + if (this.isLoopHorizontal()) { + if (this._foregroundLoopX) { + this._foregroundX += distance; + } + } else if (this.width() >= this.screenTileX()) { + var displayX = Math.min(lastX + distance, + this.width() - this.screenTileX()); + this._foregroundX += displayX - lastX; + } + }; + + var _Game_Map_scrollUp = Game_Map.prototype.scrollUp; + Game_Map.prototype.scrollUp = function(distance) { + var lastY = this._displayY; + _Game_Map_scrollUp.call(this, distance); + this.guardForeground(); + if (this.isLoopVertical()) { + if (this._foregroundLoopY) { + this._foregroundY -= distance; + } + } else if (this.height() >= this.screenTileY()) { + var displayY = Math.max(lastY - distance, 0); + this._foregroundY += displayY - lastY; + } + }; + + // + // update foreground + // + var _Game_Map_update = Game_Map.prototype.update; + Game_Map.prototype.update = function(sceneActive) { + _Game_Map_update.call(this, sceneActive); + this.updateForeground(); + }; + + Game_Map.prototype.updateForeground = function() { + this.guardForeground(); + if (this._foregroundLoopX) { + this._foregroundX += this._foregroundSx / this.tileWidth() / 2; + } + if (this._foregroundLoopY) { + this._foregroundY += this._foregroundSy / this.tileHeight() / 2; + } + }; + + // + // sprites + // + var _Spriteset_Map_createLowerLayer = + Spriteset_Map.prototype.createLowerLayer; + Spriteset_Map.prototype.createLowerLayer = function() { + _Spriteset_Map_createLowerLayer.call(this); + this.createForeground(); + }; + + var _Spriteset_Map_update = Spriteset_Map.prototype.update; + Spriteset_Map.prototype.update = function() { + _Spriteset_Map_update.call(this); + this.updateForeground(); + }; + + Spriteset_Map.prototype.createForeground = function() { + this._foreground = new TilingSprite(); + this._foreground.move(0, 0, Graphics.width, Graphics.height); + // in order to display under the weather sprites: + this._baseSprite.removeChild(this._weather); + this._baseSprite.addChild(this._foreground); + this._baseSprite.addChild(this._weather); + }; + + Spriteset_Map.prototype.updateForeground = function() { + if (this._foregroundName !== $gameMap.foregroundName()) { + this._foregroundName = $gameMap.foregroundName(); + this._foreground.bitmap = ImageManager.loadParallax(this._foregroundName); + } + if (this._foreground.bitmap) { + this._foreground.origin.x = $gameMap.foregroundOx(); + this._foreground.origin.y = $gameMap.foregroundOy(); + } + }; + +})(); diff --git a/js/plugins/GamepadConfig.js b/js/plugins/GamepadConfig.js new file mode 100644 index 0000000..313cc6b --- /dev/null +++ b/js/plugins/GamepadConfig.js @@ -0,0 +1,620 @@ +//============================================================================= +// Yanfly Engine Plugins - Gamepad Config +// GamepadConfig.js +// Version: 1.00 +//============================================================================= + +var Imported = Imported || {}; +Imported.GamepadConfig = true; + +var Yanfly = Yanfly || {}; +Yanfly.GamepadConfig = Yanfly.GamepadConfig || {}; + +//============================================================================= + /*: + * @plugindesc v1.00 Allows players to adjust their button configuration + * for gamepads. + * @author Yanfly Engine Plugins + * + * @param Command Name + * @desc This is the option name that appears in the main menu. + * @default Gamepad Config + * + * @param Button Name + * @desc This is how a button name will appear in the config menu. + * @default Button %1 + * + * @param OK Button + * @desc This is the command name for the OK button. + * @default OK / Talk + * + * @param OK Help + * @desc This is the help description for the OK button. + * @default Used to accept menu actions and talk to people. + * + * @param Cancel Button + * @desc Cancel Button + * @desc This is the command name for the Cancel button. + * @default Cancel + * + * @param Cancel Help + * @desc This is the help description for the Cancel button. + * @default Used to cancel menu actions. + * + * @param Shift Button + * @desc This is the command name for the Shift button. + * @default Dash + * + * @param Shift Help + * @desc This is the help description for the Shift button. + * @default Hold this button to dash on the field. + * + * @param Menu Button + * @desc This is the command name for the Menu button. + * @default Menu + * + * @param Menu Help + * @desc This is the help description for the Menu button. + * @default Access the Main Menu from the field. + * + * @param PageUp Button + * @desc This is the command name for the Page Up button. + * @default Page Up + * + * @param PageUp Help + * @desc This is the help description for the Page Up button. + * @default Use it to quickly scroll up menus. + * + * @param PageDown Button + * @desc This is the command name for the Page Down button. + * @default Page Down + * + * @param PageDown Help + * @desc This is the help description for the Page Down button. + * @default Use it to quickly scroll down menus. + * + * @param Reset Default + * @desc This is the command name to reset the config to default. + * @default Reset to Default + * + * @param Reset Help + * @desc This is the help description for the Reset button. + * @default Returns your controller to default settings. + * + * @param Finish Config + * @desc This is the command name for the finish button. + * @default Finish Configuration + * + * @param Finish Help + * @desc This is the help description for the Finish button. + * @default Are you done configuring your gamepad? + * + * @help + * Adds a "Gamepad Config" option to the Options Menu if a gamepad is detected. + * Players can then adjust the button configuration to their liking and it will + * be loaded automatically each time they play the game. Keep in mind that if + * at any point where a Gamepad is not detected inside of the Option or Gamepad + * Config menu, the game will automatically eject the player out the prevent + * the player from being locked inside. + */ + + /*:ja + * @plugindesc ゲームパッド向けにボタンコンフィグを行なうプラグインです。 + * @author Yanfly Engine Plugins + * + * @param Command Name + * @desc メインメニューに表示されるオプション名を変更できます + * @default Gamepad Config + * + * @param Button Name + * @desc コンフィグメニューでのボタン名の表示方法を変更できます + * @default Button %1 + * + * @param OK Button + * @desc OKボタンに対するコマンド名を変更できます + * @default OK / Talk + * + * @param OK Help + * @desc OKボタンに対するヘルプを設定できます + * @default メニューの決定/人に話しかける際に使うボタンです + * + * @param Cancel Button + * @desc キャンセルボタン + * @desc キャンセルボタンに対するコマンド名を変更できます + * @default Cancel + * + * @param Cancel Help + * @desc キャンセルボタンに対するヘルプを設定できます + * @default メニューアクションをキャンセルする際に使うボタンです + * + * @param Shift Button + * @desc シフトボタンに対するコマンド名を変更できます + * @default ダッシュ + * + * @param Shift Help + * @desc シフトボタンに対するヘルプを設定できます + * @default 長押しするとフィールド上をダッシュできます + * + * @param Menu Button + * @desc メニューボタンに対するコマンド名を変更できます + * @default Menu + * + * @param Menu Help + * @desc メニューボタンに対するヘルプを設定できます + * @default フィールドからメインメニューにアクセスします + * + * @param PageUp Button + * @desc ページアップボタンに対するコマンド名を変更できます + * @default Page Up + * + * @param PageUp Help + * @desc ページアップボタンに対するヘルプを設定できます + * @default メニューを素早くスクロールアップできます + * + * @param PageDown Button + * @desc ページダウンボタンに対するコマンド名を変更できます + * @default Page Down + * + * @param PageDown Help + * @desc ページダウンボタンに対するヘルプを設定できます + * @default メニューを素早くスクロールダウンできます + * + * @param Reset Default + * @desc コンフィグをリセットする際のコマンド名を変更できます + * @default Reset to Default + * + * @param Reset Help + * @desc リセットボタンに対するヘルプを設定できます + * @default コントローラコンフィグをデフォルトに戻します + * + * @param Finish Config + * @desc コンフィグを完了する際のコマンド名を変更できます + * @default Finish Configuration + * + * @param Finish Help + * @desc 完了ボタンに対するヘルプを設定できます + * @default ゲームパッドのコンフィグを完了しますか? + * + * @help + * ゲームパッドが使用される場合、 + * "Gamepad Config"をオプションメニューに追加してください。 + * プレイヤーは好みのコンフィグ設定を行うことができ、 + * その設定は毎回プレイ時に自動的にロードされます。 + * + * ゲームパッドがオプションやゲームパッドコンフィグから検出されなくなると、 + * ゲームは自動的にプレイヤーを排出し、ゲーム内に閉じ込められることを防ぎます。 + * + */ + +//============================================================================= + +//============================================================================= +// Parameter Variables +//============================================================================= + +Yanfly.Parameters = PluginManager.parameters('GamepadConfig'); +Yanfly.Param = Yanfly.Param || {}; + +Yanfly.Param.GamepadConfigName = String(Yanfly.Parameters['Command Name']); +Yanfly.Param.GamepadConfigButton = String(Yanfly.Parameters['Button Name']); +Yanfly.Param.GamepadConfigOkTx = String(Yanfly.Parameters['OK Button']); +Yanfly.Param.GamepadConfigOkHelp = String(Yanfly.Parameters['OK Help']); +Yanfly.Param.GamepadConfigCancelTx = String(Yanfly.Parameters['Cancel Button']); +Yanfly.Param.GamepadConfigCancelHelp = String(Yanfly.Parameters['Cancel Help']); +Yanfly.Param.GamepadConfigShiftTx = String(Yanfly.Parameters['Shift Button']); +Yanfly.Param.GamepadConfigShiftHelp = String(Yanfly.Parameters['Shift Help']); +Yanfly.Param.GamepadConfigMenuTx = String(Yanfly.Parameters['Menu Button']); +Yanfly.Param.GamepadConfigMenuHelp = String(Yanfly.Parameters['Menu Help']); +Yanfly.Param.GamepadConfigPgUpTx = String(Yanfly.Parameters['PageUp Button']); +Yanfly.Param.GamepadConfigPgUpHelp = String(Yanfly.Parameters['PageUp Help']); +Yanfly.Param.GamepadConfigPgDnTx = String(Yanfly.Parameters['PageDown Button']); +Yanfly.Param.GamepadConfigPgDnHelp = String(Yanfly.Parameters['PageDown Help']); +Yanfly.Param.GamepadConfigResetTx = String(Yanfly.Parameters['Reset Default']); +Yanfly.Param.GamepadConfigResetHelp = String(Yanfly.Parameters['Reset Help']); +Yanfly.Param.GamepadConfigFinishTx = String(Yanfly.Parameters['Finish Config']); +Yanfly.Param.GamepadConfigFinishHelp = String(Yanfly.Parameters['Finish Help']); + +//============================================================================= +// Input +//============================================================================= + +Input.getPressedGamepadButton = function() { + if (Yanfly.Param.GamepadTimer > 0) { + Yanfly.Param.GamepadTimer -= 1; + return -1; + } + if (navigator.getGamepads) { + var gamepads = navigator.getGamepads(); + if (gamepads) { + for (var i = 0; i < gamepads.length; i++) { + var gamepad = gamepads[i]; + if (gamepad && gamepad.connected) { + return this.gamepadButtonId(gamepad); + } + } + } + } + return -1; +}; + +Input.gamepadButtonId = function(gamepad) { + var buttons = gamepad.buttons; + for (var i = 0; i < buttons.length; i++) { + if (buttons[i].pressed) return i; + } + return -1; +}; + +Input.getGamepadButton = function(type) { + for (var i = 0; i < 12; ++i) { + if (Input.gamepadMapper[i] === type) return i; + } + return null; +}; + +Input.isControllerConnected = function() { + if (navigator.getGamepads) { + var gamepads = navigator.getGamepads(); + if (gamepads) { + for (var i = 0; i < gamepads.length; i++) { + var gamepad = gamepads[i]; + if (gamepad && gamepad.connected) return true; + } + } + } + return false; +}; + +//============================================================================= +// ConfigManager +//============================================================================= + +ConfigManager.gamepadInput = { + 0: 'ok', + 1: 'cancel', + 2: 'shift', + 3: 'menu', + 4: 'pageup', + 5: 'pagedown', + 12: 'up', + 13: 'down', + 14: 'left', + 15: 'right', +}; + +Yanfly.GamepadConfig.ConfigManager_makeData = ConfigManager.makeData; +ConfigManager.makeData = function() { + var config = Yanfly.GamepadConfig.ConfigManager_makeData.call(this); + config.gamepadInput = this.gamepadInput; + return config; +}; + +Yanfly.GamepadConfig.ConfigManager_applyData = ConfigManager.applyData; +ConfigManager.applyData = function(config) { + Yanfly.GamepadConfig.ConfigManager_applyData.call(this, config); + this.gamepadInput = this.readGamepadConfig(config, 'gamepadInput'); + this.applyGamepadConfig(); +}; + +ConfigManager.applyGamepadConfig = function() { + Input.gamepadMapper = this.gamepadInput; + Input.update(); + Input.clear(); +}; + +ConfigManager.readGamepadConfig = function(config, name) { + var value = config[name]; + if (value !== undefined) { + return value; + } else { + return { + 0: 'ok', + 1: 'cancel', + 2: 'shift', + 3: 'menu', + 4: 'pageup', + 5: 'pagedown', + 12: 'up', + 13: 'down', + 14: 'left', + 15: 'right', + }; + } +}; + +//============================================================================= +// Window_MenuCommand +//============================================================================= + +Yanfly.GamepadConfig.Window_Options_addGeneralOptions = + Window_Options.prototype.addGeneralOptions; +Window_Options.prototype.addGeneralOptions = function() { + Yanfly.GamepadConfig.Window_Options_addGeneralOptions.call(this); + this.addGameConfigCommand(); +}; + +Window_Options.prototype.addGameConfigCommand = function() { + if (Input.isControllerConnected()) { + this.addCommand(Yanfly.Param.GamepadConfigName, 'gamepadConfig', true); + this._addedController = true; + } +}; + +Yanfly.GamepadConfig.Window_Options_update = + Window_Options.prototype.update; +Window_Options.prototype.update = function() { + Yanfly.GamepadConfig.Window_Options_update.call(this); + if (this._addedController && !Input.isControllerConnected()) { + this.refresh(); + this.height = this.windowHeight(); + this.updatePlacement(); + } +}; + +Yanfly.GamepadConfig.Window_Options_drawItem = + Window_Options.prototype.drawItem; +Window_Options.prototype.drawItem = function(index) { + if (this.commandSymbol(index) === 'gamepadConfig') { + var rect = this.itemRectForText(index); + var text = this.commandName(index); + this.resetTextColor(); + this.changePaintOpacity(this.isCommandEnabled(index)); + this.drawText(text, rect.x, rect.y, rect.width, 'left'); + } else { + Yanfly.GamepadConfig.Window_Options_drawItem.call(this, index); + } +}; + +Yanfly.GamepadConfig.Window_Options_processOk = + Window_Options.prototype.processOk; +Window_Options.prototype.processOk = function() { + if (this.commandSymbol(this.index()) === 'gamepadConfig') { + Window_Command.prototype.processOk.call(this); + } else { + Yanfly.GamepadConfig.Window_Options_processOk.call(this); + } +}; + +//============================================================================= +// Window_GamepadConfig +//============================================================================= + +function Window_GamepadConfig() { + this.initialize.apply(this, arguments); +} + +Window_GamepadConfig.prototype = Object.create(Window_Command.prototype); +Window_GamepadConfig.prototype.constructor = Window_GamepadConfig; + +Window_GamepadConfig.prototype.initialize = function(helpWindow) { + var wy = helpWindow.height; + Window_Command.prototype.initialize.call(this, 0, wy); + this.setHelpWindow(helpWindow); + this.height = Graphics.boxHeight - wy; + this.refresh(); + this.activate(); + this.select(0); +}; + +Window_GamepadConfig.prototype.windowWidth = function() { + return Graphics.boxWidth; +}; + +Window_GamepadConfig.prototype.makeCommandList = function(index) { + for (var i = 0; i < 6; ++i) { + var text = this.getButtonTypeText(i); + this.addCommand(text, 'button', true); + } + this.addCommand('', 'filler', true); + this.addCommand(this.getButtonTypeText(7), 'reset', true); + this.addCommand(this.getButtonTypeText(8), 'finish', true); +}; + +Window_GamepadConfig.prototype.drawItem = function(index) { + if (index > 5) { + Window_Command.prototype.drawItem.call(this, index); + } else { + var rect = this.itemRectForText(index); + var align = this.itemTextAlign(); + var ww = rect.width / 2; + this.resetTextColor(); + this.changePaintOpacity(this.isCommandEnabled(index)); + this.drawText(this.commandName(index), rect.x, rect.y, ww, align); + var text = this.getButtonConfig(index); + this.drawText(text, rect.x + ww, rect.y, ww, align); + } +}; + +Window_GamepadConfig.prototype.getButtonTypeText = function(index) { + if (index === 0) return Yanfly.Param.GamepadConfigOkTx; + if (index === 1) return Yanfly.Param.GamepadConfigCancelTx; + if (index === 2) return Yanfly.Param.GamepadConfigShiftTx; + if (index === 3) return Yanfly.Param.GamepadConfigMenuTx; + if (index === 4) return Yanfly.Param.GamepadConfigPgUpTx; + if (index === 5) return Yanfly.Param.GamepadConfigPgDnTx; + if (index === 7) return Yanfly.Param.GamepadConfigResetTx; + if (index === 8) return Yanfly.Param.GamepadConfigFinishTx; + return ''; +}; + +Window_GamepadConfig.prototype.getButtonConfig = function(index) { + if (index > 5) return ''; + var key = this.getButtonKey(index); + var button = Input.getGamepadButton(key); + return Yanfly.Param.GamepadConfigButton.format(button); +}; + +Window_GamepadConfig.prototype.getButtonKey = function(index) { + if (index === 0) return 'ok'; + if (index === 1) return 'cancel'; + if (index === 2) return 'shift'; + if (index === 3) return 'menu'; + if (index === 4) return 'pageup'; + if (index === 5) return 'pagedown'; +}; + +Window_GamepadConfig.prototype.itemTextAlign = function() { + return 'center'; +}; + +Window_GamepadConfig.prototype.clearButtonConfig = function(index) { + var rect = this.itemRectForText(index); + rect.x += rect.width / 2; + rect.width /= 2; + this.contents.clearRect(rect.x, rect.y, rect.width, rect.height); +}; + +Window_GamepadConfig.prototype.updateHelp = function() { + if (!this._helpWindow) return; + switch (this.index()) { + case 0: + this._helpWindow.setText(Yanfly.Param.GamepadConfigOkHelp); + break; + case 1: + this._helpWindow.setText(Yanfly.Param.GamepadConfigCancelHelp); + break; + case 2: + this._helpWindow.setText(Yanfly.Param.GamepadConfigShiftHelp); + break; + case 3: + this._helpWindow.setText(Yanfly.Param.GamepadConfigMenuHelp); + break; + case 4: + this._helpWindow.setText(Yanfly.Param.GamepadConfigPgUpHelp); + break; + case 5: + this._helpWindow.setText(Yanfly.Param.GamepadConfigPgDnHelp); + break; + case 7: + this._helpWindow.setText(Yanfly.Param.GamepadConfigResetHelp); + break; + case 8: + this._helpWindow.setText(Yanfly.Param.GamepadConfigFinishHelp); + break; + default: + this._helpWindow.clear(); + break; + } +}; + +//============================================================================= +// Scene_Options +//============================================================================= + +Yanfly.GamepadConfig.Scene_Options_createOptionsWindow = + Scene_Options.prototype.createOptionsWindow; +Scene_Options.prototype.createOptionsWindow = function() { + Yanfly.GamepadConfig.Scene_Options_createOptionsWindow.call(this); + this._optionsWindow.setHandler('gamepadConfig', + this.commandGamepadConfig.bind(this)); +}; + +Scene_Options.prototype.commandGamepadConfig = function() { + SceneManager.push(Scene_GamepadConfig); +}; + +//============================================================================= +// Scene_GamepadConfig +//============================================================================= + +function Scene_GamepadConfig() { + this.initialize.apply(this, arguments); +} + +Scene_GamepadConfig.prototype = Object.create(Scene_MenuBase.prototype); +Scene_GamepadConfig.prototype.constructor = Scene_GamepadConfig; + +Scene_GamepadConfig.prototype.initialize = function() { + Scene_MenuBase.prototype.initialize.call(this); +}; + +Scene_GamepadConfig.prototype.create = function() { + Scene_MenuBase.prototype.create.call(this); + this.createHelpWindow(); + this.createGamepadConfigWindow(); +}; + +Scene_GamepadConfig.prototype.terminate = function() { + Scene_MenuBase.prototype.terminate.call(this); + ConfigManager.save(); +}; + +Scene_GamepadConfig.prototype.update = function() { + Scene_MenuBase.prototype.update.call(this); + this.updateAttachedController(); + this.updateButtonConfig(); + this.updateAfterConfig(); +}; + +Scene_GamepadConfig.prototype.updateAttachedController = function() { + if (Input.isControllerConnected()) return; + this.popScene(); +}; + +Scene_GamepadConfig.prototype.createGamepadConfigWindow = function() { + this._configWindow = new Window_GamepadConfig(this._helpWindow); + this._configWindow.setHandler('button', this.commandButton.bind(this)); + this._configWindow.setHandler('reset', this.commandReset.bind(this)); + this._configWindow.setHandler('finish', this.popScene.bind(this)); + this.addWindow(this._configWindow); +}; + +Scene_GamepadConfig.prototype.commandButton = function() { + var index = this._configWindow.index(); + this._configWindow.clearButtonConfig(index); + this._configEnabled = true; + Yanfly.Param.GamepadTimer = 12; +}; + +Scene_GamepadConfig.prototype.commandReset = function() { + ConfigManager.gamepadInput = { + 0: 'ok', + 1: 'cancel', + 2: 'shift', + 3: 'menu', + 4: 'pageup', + 5: 'pagedown', + 12: 'up', + 13: 'down', + 14: 'left', + 15: 'right', + }; + ConfigManager.applyGamepadConfig(); + this.refreshWindows(); +}; + +Scene_GamepadConfig.prototype.refreshWindows = function() { + this._configWindow.refresh(); + this._configWindow.activate(); + ConfigManager.save(); +}; + +Scene_GamepadConfig.prototype.updateButtonConfig = function() { + if (!this._configEnabled) return; + var buttonId = Input.getPressedGamepadButton(); + if (buttonId > 11) return; + if (buttonId >= 0) this.applyButtonConfig(buttonId); +}; + +Scene_GamepadConfig.prototype.applyButtonConfig = function(buttonId) { + this._configEnabled = false; + var index = this._configWindow.index(); + var newConfig = this._configWindow.getButtonKey(index); + var formerConfig = Input.gamepadMapper[buttonId]; + var formerButton = Input.getGamepadButton(newConfig); + ConfigManager.gamepadInput[buttonId] = newConfig; + ConfigManager.gamepadInput[formerButton] = formerConfig; + ConfigManager.applyGamepadConfig(); + this._configTimer = 12; +}; + +Scene_GamepadConfig.prototype.updateAfterConfig = function() { + if (!this._configTimer) return; + if (--this._configTimer > 0) return; + SoundManager.playEquip(); + this.refreshWindows(); +}; + +//============================================================================= +// End of File +//============================================================================= diff --git a/js/plugins/HPConsumeSkill.js b/js/plugins/HPConsumeSkill.js new file mode 100644 index 0000000..b812666 --- /dev/null +++ b/js/plugins/HPConsumeSkill.js @@ -0,0 +1,96 @@ +//============================================================================= +// HPConsumeSkill.js +//============================================================================= + +/*: + * @plugindesc make the skill that consumes HP, not only MP and/or TP + * @author Sasuke KANNAZUKI + * + * @help This plugin does not provide plugin commands. + * + * write following format at skill's note: + * # the skill consumes 30 HP. + * + * The skill can use even if subject's HP is less than skill's HP Cost. + * In that case, let the subject's HP be 1. + * (i.e. subject won't die by the skill.) + */ + +/*:ja + * @plugindesc HP消費技 + * @author 神無月サスケ + * + * @help このプラグインには、プラグインコマンドはありません。 + * + * 仕様: + * スキルのメモ欄に「」といった書式で書いてください。 + * この場合、HPを30消費します。 + * + * 入力時や術使用時のHPが、消費HPより低い場合でも選択、実行可能で、 + * この場合使用後のHPは1になります。(つまり、この技で戦闘不能にはならない) + * + * - HPの消費は、技を使う前になされます。 + * - HPと同時に、MPやTPを消費する技も作成可能ですが、 + * ウィンドウでは消費HPのみが表示されます。 + */ + +(function() { + + // -------------------- + // Process Data in item.note + // *for efficiency, note is processed at first. + // -------------------- + + var _Scene_Boot_start = Scene_Boot.prototype.start; + Scene_Boot.prototype.start = function() { + _Scene_Boot_start.call(this); + DataManager.processHpCost(); + }; + + DataManager.processHpCost = function() { + for (var i = 1; i < $dataSkills.length; i++) { + var skill = $dataSkills[i]; + var result = skill.meta.hp_cost; + if (result){ + skill.hpCost = Number(result); + } else { + skill.hpCost = 0; + } + } + }; + + // -------------------- + // exec consume HP cost + // -------------------- + + Game_BattlerBase.prototype.skillHpCost = function(skill) { + return skill.hpCost; + }; + + var _Game_BattlerBase_paySkillCost = + Game_BattlerBase.prototype.paySkillCost; + Game_BattlerBase.prototype.paySkillCost = function(skill) { + _Game_BattlerBase_paySkillCost.call(this, skill); + if (this._hp > this.skillHpCost(skill)) { + this._hp -= this.skillHpCost(skill); + } else { + this._hp = 1; + } + }; + + // -------------------- + // draw HP cost + // -------------------- + + var _Window_SkillList_drawSkillCost = + Window_SkillList.prototype.drawSkillCost; + Window_SkillList.prototype.drawSkillCost = function(skill, x, y, width) { + if (this._actor.skillHpCost(skill) > 0) { + this.changeTextColor(this.textColor(17)); + this.drawText(this._actor.skillHpCost(skill), x, y, width, 'right'); + return; + } + _Window_SkillList_drawSkillCost.call(this, skill, x, y, width); + }; + +})(); diff --git a/js/plugins/KeyItemAlone.js b/js/plugins/KeyItemAlone.js new file mode 100644 index 0000000..c7e5e60 --- /dev/null +++ b/js/plugins/KeyItemAlone.js @@ -0,0 +1,48 @@ +//============================================================================= +// KeyItemAlone.js +//============================================================================= + +/*: + * @plugindesc at Scene_Item, only display key items. + * @author Sasuke KANNAZUKI + * * + * @help This plugin does not provide plugin commands. + * + */ +/*:ja + * @plugindesc アイテム選択画面で「大事なもの」のみ表示 + * @author 神無月サスケ + * * + * @help このプラグインに、プラグインコマンドはありません + * + */ + + +(function() { + + Scene_Item.prototype.create = function() { + Scene_ItemBase.prototype.create.call(this); + this.createHelpWindow(); + // abolish category window + // this.createCategoryWindow(); + this.createItemWindow(); + this.createActorWindow(); + }; + + Scene_Item.prototype.createItemWindow = function() { + var wy = this._helpWindow.height; + // original parts are commented out + // var wy = this._categoryWindow.y + this._categoryWindow.height; + var wh = Graphics.boxHeight - wy; + this._itemWindow = new Window_ItemList(0, wy, Graphics.boxWidth, wh); + this._itemWindow.setHelpWindow(this._helpWindow); + this._itemWindow.setHandler('ok', this.onItemOk.bind(this)); + this._itemWindow.setHandler('cancel', this.popScene.bind(this)); + // this._itemWindow.setHandler('cancel', this.onItemCancel.bind(this)); + this.addWindow(this._itemWindow); + // this._categoryWindow.setItemWindow(this._itemWindow); + // activate item window directly + this._itemWindow.setCategory('keyItem'); + this.onCategoryOk(); + }; +})(); diff --git a/js/plugins/KeyItemNumber.js b/js/plugins/KeyItemNumber.js new file mode 100644 index 0000000..dd92f0a --- /dev/null +++ b/js/plugins/KeyItemNumber.js @@ -0,0 +1,144 @@ +//============================================================================= +// KeyItemNumber.js +//============================================================================= + +/*: + * @plugindesc display on/off the number of key items. + * @author Sasuke KANNAZUKI + * + * @param KeyItem + * @desc whether display the number at menu window. + * 0:not display, 1:always display, 2:display only plural items + * @default 0 + * + * @param MessageWindow + * @desc whether display the number at message window. + * 0:not display, 1:always display, 2:display only plural items + * @default 0 + * + * @help + * Plugin Command: + * KeyItemNumber arg0 arg1 + * arg0 must be a number 1, 2, 3, or 4 + * 1:normal item, 2:important item, 3:hidden item A, 4:hidden item B. + * arg1 must be a number 0, 1, or 2 + * 0:not display, 1:always display, 2:display only plural items + * + * if it's not defined, MessageWindow number is used. + * ex. + * KeyItemNumber 3 0 # item number won't be displayed at hidden item A list. + * KeyItemNumber 1 1 # item number will be displayed at normal item list. + */ + +/*:ja + * @plugindesc 「大事なもの」の個数表示の設定 + * @author 神無月サスケ + * + * @param KeyItem + * @desc メニューの「大事なもの」で個数を表示するか。 + * 0:表示しない, 1:表示する, 2:複数アイテムのみ表示 + * @default 0 + * + * @param MessageWindow + * @desc イベントコマンド「アイテム選択の処理」で個数を表示するか。 + * 0:表示しない, 1:表示する, 2:複数アイテムのみ表示 + * @default 0 + * + * @help + * プラグインコマンド: + * 「アイテム選択の処理」で種類ごとに分けたい場合に呼び出して下さい。 + * KeyItemNumber arg0 arg1 + * arg0 は 1, 2, 3, または 4 です。 + * 1:通常アイテム, 2:大事なもの, 3:隠しアイテムA, 4:隠しアイテムB + * arg1 は 0, 1, または 2 です。 + * 0:表示しない, 1:表示する, 2:複数アイテムのみ表示 + * + * プラグインコマンドを呼び出さない場合、MessageWindow の設定になります。 + * 例: + * KeyItemNumber 3 0 # 隠しアイテムA では 個数を表示しない + * KeyItemNumber 1 1 # 通常アイテムでは 個数を表示する + */ + + +(function() { + + var parameters = PluginManager.parameters('KeyItemNumber'); + var atKeyItem = Number(parameters['KeyItem'] || 0); // at Item scene + var atMsgWnd = Number(parameters['MessageWindow'] || 0); // at Event Command + + var _Game_Interpreter_pluginCommand = + Game_Interpreter.prototype.pluginCommand; + Game_Interpreter.prototype.pluginCommand = function(command, args) { + _Game_Interpreter_pluginCommand.call(this, command, args); + if (command === 'KeyItemNumber') { + var itypeId = args[0]; + var status = args[1]; // rule of itemNumberDisplay + $gameSystem.keyItemNumber()[itypeId] = status; + } + }; + + // + // an array definition at $gameSystem + // + var _Game_System_initialize = + Game_System.prototype.initialize; + Game_System.prototype.initialize = function() { + _Game_System_initialize.call(this); + this.initKeyNumber(); + }; + + Game_System.prototype.initKeyNumber = function() { + this._keyItemNumber = [null, null, null, null, null]; + }; + + Game_System.prototype.keyItemNumber = function() { + if(!this._keyItemNumber){ + this.initKeyNumber(); + }; + return this._keyItemNumber; + }; + + // + // at item scene, whether display item number or not + // + var _Window_ItemList_needsNumber = + Window_ItemList.prototype.needsNumber; + Window_ItemList.prototype.needsNumber = function() { + var original = _Window_ItemList_needsNumber.call(this); + if(this._category !== 'keyItem') { + return original; + } + return atKeyItem != 0; + }; + + // + // current display mode of EventItem window. + // + Window_EventItem.prototype.currentDispMode = function() { + var itype = $gameMessage.itemChoiceItypeId(); + return Number($gameSystem.keyItemNumber()[itype] || atMsgWnd); + }; + + // + // at message window, whether display item number or not + // + Window_EventItem.prototype.needsNumber = function() { + return this.currentDispMode() != 0; + }; + + // + // draw item (includes behavior if item number >= 2) + // + var _Window_ItemList_drawItemNumber = + Window_ItemList.prototype.drawItemNumber; + Window_ItemList.prototype.drawItemNumber = function(item, x, y, width) { + var isEvent = (this instanceof Window_EventItem); + var status = isEvent ? this.currentDispMode() : atKeyItem; + if((this._category == 'keyItem' || isEvent) && + status == 2 && $gameParty.numItems(item) <= 1) { + return; // return without drawing number + } + _Window_ItemList_drawItemNumber.call(this, item, x, y, width); + }; + +})(); diff --git a/js/plugins/KeyboardConfig.js b/js/plugins/KeyboardConfig.js new file mode 100644 index 0000000..3d0126a --- /dev/null +++ b/js/plugins/KeyboardConfig.js @@ -0,0 +1,1010 @@ +//============================================================================= +// Yanfly Engine Plugins - Template +// KeyboardConfig.js +// Version: 1.00 +//============================================================================= + +var Imported = Imported || {}; +Imported.KeyboardConfig = true; + +var Yanfly = Yanfly || {}; +Yanfly.KeyConfig = Yanfly.KeyboardConfig || {}; + +//============================================================================= + /*: + * @plugindesc v1.00 Allows players to adjust their button configuration + * for keyboards. + * @author Yanfly Engine Plugins + * + * @param Command Name + * @desc This is the option name that appears in the main menu. + * @default Keyboard Config + * + * @param Key Help + * @desc This is the help message that will display for keys. + * @default Change the configuration of this key? + * + * @param Default Layout + * @desc This is the text for switching to the default layout. + * @default Default Keyboard Layout + * + * @param Default Help + * @desc This is the help message that will display for keys. + * @default Reverts your keyboard setting to the default setup. + * + * @param WASD Layout + * @desc This is the text for switching to the WASD layout. + * @default WASD Movement Layout + * + * @param WASD Help + * @desc This is the help message that will display for WASD. + * @default Changes your keyboard to WASD movement. + * + * @param Finish Config + * @desc This is the text for finishing with keyboard configuration. + * @default Finish Configuration + * + * @param Finish Help + * @desc This is the help message that will display for Finish. + * @default Are you done configuring your keyboard? + * + * @param Assigned Color + * @desc This is the background color of a key that's assigned. + * @default 21 + * + * @param Action Color + * @desc This is the text color of an assigned action. + * @default 4 + * + * @param Clear Text + * @desc This is the Clear action will appear for the config text. + * @default Clear + * + * @param OK Key + * @desc This is the OK action will appear on a key. + * @default OK + * + * @param OK Text + * @desc This is the OK action will appear for the config text. + * @default OK / Talk + * + * @param Escape Key + * @desc This is the Escape action will appear on a key. + * @default X + * + * @param Escape Text + * @desc This is the Escape action will appear for the config text. + * @default Cancel / Menu + * + * @param Cancel Key + * @desc This is the Cancel action will appear on a key. + * @default Cancel + * + * @param Cancel Text + * @desc This is the Cancel action will appear for the config text. + * @default Cancel + * + * @param Menu Key + * @desc This is the Menu action will appear on a key. + * @default Menu + * + * @param Menu Text + * @desc This is the Menu action will appear for the config text. + * @default Menu + * + * @param Shift Key + * @desc This is the Shift action will appear on a key. + * @default Dash + * + * @param Shift Text + * @desc This is the Shift action will appear for the config text. + * @default Dash + * + * @param PageUp Key + * @desc This is the PageUp action will appear on a key. + * @default PgUp + * + * @param PageUp Text + * @desc This is the PageUp action will appear for the config text. + * @default Page Up + * + * @param PageDown Key + * @desc This is the PageUp action will appear on a key. + * @default PgDn + * + * @param PageDown Text + * @desc This is the PageUp action will appear for the config text. + * @default Page Down + * + * @param Left Key + * @desc This is the Left action will appear on a key. + * @default ◄ + * + * @param Left Text + * @desc This is the Left action will appear for the config text. + * @default Move ◄ Left + * + * @param Up Key + * @desc This is the Up action will appear on a key. + * @default ▲ + * + * @param Up Text + * @desc This is the Up action will appear for the config text. + * @default Move ▲ Up + * + * @param Right Key + * @desc This is the Right action will appear on a key. + * @default ► + * + * @param Right Text + * @desc This is the Right action will appear for the config text. + * @default Move ► Right + * + * @param Down Key + * @desc This is the Down action will appear on a key. + * @default ▼ + * + * @param Down Text + * @desc This is the Down action will appear for the config text. + * @default Move ▼ Down* + * + * @help + * This plugin allows players to change their keyboard configuration from the + * in-game Options menu provided that they're using a computer to play the + * game and not from a mobile device. The "Keyboard Config" option will send + * the player to a different screen where they can assign actions to each of + * the allowed keys on the keyboard. + * + * Certain measures are made to prevent the player from locking himself or + * herself in the configuration screen. These measures are that the Enter keys + * and arrow keys cannot be changed. Almost every other key is capable of being + * changed to something of the player's liking. + */ + + /*:ja + * @plugindesc キーボード向けにボタンコンフィグを行なうプラグインです。 + * @author Yanfly Engine Plugins + * + * @param Command Name + * @desc メインメニューに表示されるオプション名を変更できます + * @default Keyboard Config + * + * @param Key Help + * @desc キー設定時に表示される補助メッセージです + * @default このキーのコンフィグを変更しますか? + * + * @param Default Layout + * @desc デフォルトのレイアウトに変更する際のテキストメッセージです. + * @default デフォルトレイアウト + * + * @param Default Help + * @desc デフォルト設定に対するヘルプメッセージを設定できます + * @default キーボード設定をデフォルトに戻します + * + * @param WASD Layout + * @desc WASDのレイアウトに切り替える際のテキストを設定します + * @default WASDレイアウト + * + * @param WASD Help + * @desc WADSD設定に対するヘルプメッセージを設定できます + * @default キーボードをWASDレイアウトに変更します + * + * @param Finish Config + * @desc キーボードコンフィグを完了する際のコマンド名を変更できます + * @default Finish Configuration + * + * @param Finish Help + * @desc 完了時のヘルプを設定できます + * @default キーボードのコンフィグを完了しますか? + * + * @param Assigned Color + * @desc アサインされたキーの背景色を設定できます + * @default 21 + * + * @param Action Color + * @desc アサインされたアクションのテキストカラーを設定できます + * @default 4 + * + * @param Clear Text + * @desc コンフィグテキストに表れるClearの説明文を変更できます + * @default Clear + * + * @param OK Key + * @desc キー上に表れるOKアクションの表記を変更できます + * @default OK + * + * @param OK Text + * @desc コンフィグテキストに表れるOKの説明文を変更できます + * @default OK / 話す + * + * @param Escape Key + * @desc キー上に表れるEscapeアクションの表記を変更できます + * @default X + * + * @param Escape Text + * @desc コンフィグテキストに表れるEscapeの説明文を変更できます + * @default Cancel / Menu + * + * @param Cancel Key + * @desc キー上に表れるキャンセルアクションの表記を変更できます + * @default Cancel + * + * @param Cancel Text + * @desc コンフィグテキストに表れるキャンセルの説明文を変更できます + * @default キャンセル + * + * @param Menu Key + * @desc キー上に表れるメニューアクションの表記を変更できます + * @default Menu + * + * @param Menu Text + * @desc コンフィグテキストに表れるメニューの説明文を変更できます + * @default Menu + * + * @param Shift Key + * @desc キー上に表れるShiftアクションの表記を変更できます + * @default Dash + * + * @param Shift Text + * @desc コンフィグテキストに表れるShiftの説明文を変更できます + * @default ダッシュする + * + * @param PageUp Key + * @desc キー上に表れるPageUpアクションの表記を変更できます + * @default PgUp + * + * @param PageUp Text + * @desc コンフィグテキストに表れるPageUpの説明文を変更できます + * @default ページアップ + * + * @param PageDown Key + * @desc キー上に表れるPageDownアクションの表記を変更できます + * @default PgDn + * + * @param PageDown Text + * @desc コンフィグテキストに表れるPageDownの説明文を変更できます + * @default ページダウン + * + * @param Left Key + * @desc キー上に表れるレフトキーアクションの表記を変更できます + * @default ◄ + * + * @param Left Text + * @desc コンフィグテキストに表れるレフトキーの説明文を変更できます + * @default 左へ ◄ + * + * @param Up Key + * @desc キー上に表れるアップキーアクションの表記を変更できます + * @default ▲ + * + * @param Up Text + * @desc コンフィグテキストに表れるアップキーの説明文を変更できます + * @default 上へ ▲ + * + * @param Right Key + * @desc キー上に表れるライトキーアクションの表記を変更できます + * @default ► + * + * @param Right Text + * @desc コンフィグテキストに表れるライトキーの説明文を変更できます + * @default 右へ ► + * + * @param Down Key + * @desc キー上に表れるダウンキーアクションの表記を変更できます + * @default ▼ + * + * @param Down Text + * @desc コンフィグテキストに表れるダウンキーの説明文を変更できます + * @default 下へ ▼ + * + * @help + * このプラグインを用いて、ゲーム内オプションから + * キーボードコンフィグを変更することができます。(PCのみ有効) + * プレイヤーは、ゲームとは別のスクリーンにて + * キーボードにアクションをアサインすることができます。 + * + * プレイヤーがコンフィグスクリーンに閉じ込められてしまうことが無いように、 + * エンターキーと矢印キーは変更できないようになっています。 + * それ以外の殆どのキーは、プレイヤーの好きなように変更することができます。 + * + */ + +//============================================================================= + +//============================================================================= +// Parameter Variables +//============================================================================= + +Yanfly.Parameters = PluginManager.parameters('KeyboardConfig'); +Yanfly.Param = Yanfly.Param || {}; + +Yanfly.Param.KeyConfigName = String(Yanfly.Parameters['Command Name']); +Yanfly.Param.KeyConfigKeyHelp = String(Yanfly.Parameters['Key Help']); +Yanfly.Param.KeyConfigDefaultTx = String(Yanfly.Parameters['Default Layout']); +Yanfly.Param.KeyConfigDefaultHelp = String(Yanfly.Parameters['Default Help']); +Yanfly.Param.KeyConfigWasdTx = String(Yanfly.Parameters['WASD Layout']); +Yanfly.Param.KeyConfigWasdHelp = String(Yanfly.Parameters['WASD Help']); +Yanfly.Param.KeyConfigFinishTx = String(Yanfly.Parameters['Finish Config']); +Yanfly.Param.KeyConfigFinishHelp = String(Yanfly.Parameters['Finish Help']); +Yanfly.Param.KeyConfigAssignColor = Number(Yanfly.Parameters['Assigned Color']); +Yanfly.Param.KeyConfigActionColor = Number(Yanfly.Parameters['Action Color']); +Yanfly.Param.KeyConfigClearTx = String(Yanfly.Parameters['Clear Text']); +Yanfly.Param.KeyConfigOkKey = String(Yanfly.Parameters['OK Key']); +Yanfly.Param.KeyConfigOkTx = String(Yanfly.Parameters['OK Text']); +Yanfly.Param.KeyConfigEscKey = String(Yanfly.Parameters['Escape Key']); +Yanfly.Param.KeyConfigEscTx = String(Yanfly.Parameters['Escape Text']); +Yanfly.Param.KeyConfigCancelKey = String(Yanfly.Parameters['Cancel Key']); +Yanfly.Param.KeyConfigCancelTx = String(Yanfly.Parameters['Cancel Text']); +Yanfly.Param.KeyConfigMenuKey = String(Yanfly.Parameters['Menu Key']); +Yanfly.Param.KeyConfigMenuTx = String(Yanfly.Parameters['Menu Text']); +Yanfly.Param.KeyConfigShiftKey = String(Yanfly.Parameters['Shift Key']); +Yanfly.Param.KeyConfigShiftTx = String(Yanfly.Parameters['Shift Text']); +Yanfly.Param.KeyConfigPageUpKey = String(Yanfly.Parameters['PageUp Key']); +Yanfly.Param.KeyConfigPageUpTx = String(Yanfly.Parameters['PageUp Text']); +Yanfly.Param.KeyConfigPageDnKey = String(Yanfly.Parameters['PageDown Key']); +Yanfly.Param.KeyConfigPageDnTx = String(Yanfly.Parameters['PageDown Text']); +Yanfly.Param.KeyConfigLeftKey = String(Yanfly.Parameters['Left Key']); +Yanfly.Param.KeyConfigLeftTx = String(Yanfly.Parameters['Left Text']); +Yanfly.Param.KeyConfigUpKey = String(Yanfly.Parameters['Up Key']); +Yanfly.Param.KeyConfigUpTx = String(Yanfly.Parameters['Up Text']); +Yanfly.Param.KeyConfigRightKey = String(Yanfly.Parameters['Right Key']); +Yanfly.Param.KeyConfigRightTx = String(Yanfly.Parameters['Right Text']); +Yanfly.Param.KeyConfigDownKey = String(Yanfly.Parameters['Down Key']); +Yanfly.Param.KeyConfigDownTx = String(Yanfly.Parameters['Down Text']); + +//============================================================================= +// ConfigManager +//============================================================================= + +ConfigManager.keyMapper = { + 9: 'tab', + 13: 'ok', + 16: 'shift', + 17: 'control', + 18: 'control', + 27: 'escape', + 32: 'ok', + 33: 'pageup', + 34: 'pagedown', + 37: 'left', + 38: 'up', + 39: 'right', + 40: 'down', + 45: 'escape', + 81: 'pageup', + 87: 'pagedown', + 88: 'escape', + 90: 'ok', + 96: 'escape', + 98: 'down', + 100: 'left', + 102: 'right', + 104: 'up', + 120: 'debug' +}; + +Yanfly.KeyConfig.ConfigManager_makeData = ConfigManager.makeData; +ConfigManager.makeData = function() { + var config = Yanfly.KeyConfig.ConfigManager_makeData.call(this); + config.keyMapper = this.keyMapper; + return config; +}; + +Yanfly.KeyConfig.ConfigManager_applyData = ConfigManager.applyData; +ConfigManager.applyData = function(config) { + Yanfly.KeyConfig.ConfigManager_applyData.call(this, config); + this.keyMapper = this.readKeyConfig(config, 'keyMapper'); + this.applyKeyConfig(); +}; + +ConfigManager.applyKeyConfig = function() { + Input.keyMapper = this.keyMapper; + Input.update(); + Input.clear(); +}; + +ConfigManager.readKeyConfig = function(config, name) { + var value = config[name]; + if (value !== undefined) { + return value; + } else { + return { + 9: 'tab', + 13: 'ok', + 16: 'shift', + 17: 'control', + 18: 'control', + 27: 'escape', + 32: 'ok', + 33: 'pageup', + 34: 'pagedown', + 37: 'left', + 38: 'up', + 39: 'right', + 40: 'down', + 45: 'escape', + 46: 'ok', + 35: 'escape', + 36: 'menu', + 81: 'pageup', + 87: 'pagedown', + 88: 'escape', + 90: 'ok', + 96: 'escape', + 98: 'down', + 100: 'left', + 102: 'right', + 104: 'up', + 120: 'debug' + }; + } +}; + +//============================================================================= +// Window_Options +//============================================================================= + +Yanfly.KeyConfig.Window_Options_addGeneralOptions = + Window_Options.prototype.addGeneralOptions; +Window_Options.prototype.addGeneralOptions = function() { + Yanfly.KeyConfig.Window_Options_addGeneralOptions.call(this); + this.addKeyConfigCommand(); +}; + +Window_Options.prototype.addKeyConfigCommand = function() { + if (Utils.isMobileDevice()) return; + this.addCommand(Yanfly.Param.KeyConfigName, 'keyConfig', true); +}; + +Yanfly.KeyConfig.Window_Options_drawItem = + Window_Options.prototype.drawItem; +Window_Options.prototype.drawItem = function(index) { + if (this.commandSymbol(index) === 'keyConfig') { + var rect = this.itemRectForText(index); + var text = this.commandName(index); + this.resetTextColor(); + this.changePaintOpacity(this.isCommandEnabled(index)); + this.drawText(text, rect.x, rect.y, rect.width, 'left'); + } else { + Yanfly.KeyConfig.Window_Options_drawItem.call(this, index); + } +}; + +Yanfly.KeyConfig.Window_Options_processOk = + Window_Options.prototype.processOk; +Window_Options.prototype.processOk = function() { + if (this.commandSymbol(this.index()) === 'keyConfig') { + Window_Command.prototype.processOk.call(this); + } else { + Yanfly.KeyConfig.Window_Options_processOk.call(this); + } +}; + +//============================================================================= +// Window_KeyConfig +//============================================================================= + +function Window_KeyConfig() { + this.initialize.apply(this, arguments); +}; + +Window_KeyConfig._keyLayout = [ + '~', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '=', ' ', 'Ins', + 'Home', 'PgUp', ' ', '#pD/', '*', '#pD-', ' ', 'Q', 'W', 'E', 'R', 'T', 'Y', + 'U', 'I', 'O', 'P', '[', ']', '\\', 'Del', 'End', 'PgDn', '#pD7', '#pD8', + '#pD9', '+', ' ', 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', ';', "'", + 'Enter', 'Enter', ' ', ' ', ' ', '#pD4', '#pD5', '#pD6', '+', 'Shift', + 'Shift', 'Z', 'X', 'C', 'V', 'B', 'N', 'M', ',', '.', '/', 'Shift', 'Shift', + ' ', '↑', ' ', '#pD1', '#pD2', '#pD3', 'En', ' ', ' ', ' ', 'Space', 'Space', + 'Space', 'Space', 'Space', 'Space', 'Space', ' ', ' ', ' ', ' ', '←', '↓', + '→', '#pD0', '#pD0', '#pD.', 'En' +]; + +Window_KeyConfig._refId = { + '~': 192, '0': 48, '1': 49, '2': 50, '3': 51, '4': 52, + '5': 53, '6': 54, '7': 55, '8': 56, '9': 57, '-': 189, + '=': 187, 'Ins': 45, 'Home': 36, 'PgUp': 33, '#pD/': 111, '*': 106, + '#pD-': 109, 'Q': 81, 'W': 87, 'E': 69, 'R': 82, 'T': 84, + 'Y': 89, 'U': 85, 'I': 73, 'O': 79, 'P': 80, '[': 219, + ']': 221, '\\': 220, 'Del': 46, 'End': 35, 'PgDn': 34, '#pD7': 103, + '#pD8': 104, '#pD9': 105, '+': 107, 'A': 65, 'S': 83, 'D': 68, + 'F': 70, 'G': 71, 'H': 72, 'J': 74, 'K': 75, 'L': 76, + ';': 186, "'": 222, 'Enter': 13, '#pD4': 100, '#pD5': 101, '#pD6': 102, + 'Shift': 16, 'Z': 90, 'X': 88, 'C': 67, 'V': 86, 'B': 66, + 'N': 78, 'M': 77, ',': 188, '.': 190, '/': 191, 'Shift': 16, + '↑': 38, '#pD1': 97, '#pD2': 98, '#pD3': 99, 'En': 13, 'Space': 32, + '←': 37, '↓': 40, '→': 39, '#pD0': 96, '#pD.': 110 +}; + +Window_KeyConfig.prototype = Object.create(Window_Command.prototype); +Window_KeyConfig.prototype.constructor = Window_KeyConfig; + +Window_KeyConfig.prototype.initialize = function(helpWindow) { + var wy = helpWindow.height; + Window_Command.prototype.initialize.call(this, 0, wy); + this.setHelpWindow(helpWindow); + this.height = Graphics.boxHeight - wy; + this.refresh(); + this.activate(); + this.select(0); +}; + +Window_KeyConfig.prototype.windowWidth = function() { + return Graphics.boxWidth; +}; + +Window_KeyConfig.prototype.maxCols = function() { + return 21; +}; + +Window_KeyConfig.prototype.spacing = function() { + return 1; +}; + +Window_KeyConfig.prototype.itemHeight = function() { + return this.lineHeight() * 2; +}; + +Window_KeyConfig.prototype.itemTextAlign = function() { + return 'center'; +}; + +Window_KeyConfig.prototype.makeCommandList = function(index) { + for (var i = 0; i < Window_KeyConfig._keyLayout.length; ++i) { + var keyName = Window_KeyConfig._keyLayout[i]; + var enabled = this.isKeyEnabled(keyName); + this.addCommand(keyName, 'key', enabled); + } + this.addCommand(Yanfly.Param.KeyConfigDefaultTx, 'default', true); + for (var i = 0; i < 6; ++i) this.addCommand(' ', 'default', true); + this.addCommand(Yanfly.Param.KeyConfigWasdTx, 'wasd', true); + for (var i = 0; i < 6; ++i) this.addCommand(' ', 'wasd', true); + this.addCommand(Yanfly.Param.KeyConfigFinishTx, 'cancel', true); + for (var i = 0; i < 6; ++i) this.addCommand(' ', 'cancel', true); +}; + +Window_KeyConfig.prototype.isKeyEnabled = function(keyName) { + return !([' ', 'Enter', 'En', '↑', '←', '↓', '→'].contains(keyName)); +}; + +Window_KeyConfig.prototype.itemRect = function(index) { + var rect = Window_Selectable.prototype.itemRect.call(this, index); + var maxCols = this.maxCols(); + if ([41, 62].contains(index)) { + rect.y = Math.floor(41 / maxCols) * rect.height - this._scrollY; + rect.height = this.itemHeight() * 2; + } else if ([54, 55].contains(index)) { + rect.x = 54 % maxCols * (rect.width + this.spacing()) - this._scrollX; + rect.width = (this.itemWidth() + this.spacing()) * 2 - this.spacing(); + } else if ([63, 64].contains(index)) { + rect.x = 63 % maxCols * (rect.width + this.spacing()) - this._scrollX; + rect.width = (this.itemWidth() + this.spacing()) * 2 - this.spacing(); + } else if ([75, 76].contains(index)) { + rect.x = 75 % maxCols * (rect.width + this.spacing()) - this._scrollX; + rect.width = (this.itemWidth() + this.spacing()) * 2 - this.spacing(); + } else if ([83, 104].contains(index)) { + rect.y = Math.floor(83 / maxCols) * rect.height - this._scrollY; + rect.height = this.itemHeight() * 2; + } else if ([87, 88, 89, 90, 91, 92, 93].contains(index)) { + rect.x = 87 % maxCols * (rect.width + this.spacing()) - this._scrollX; + rect.width = (this.itemWidth() + this.spacing()) * 7 - this.spacing(); + } else if ([101, 102].contains(index)) { + rect.x = 101 % maxCols * (rect.width + this.spacing()) - this._scrollX; + rect.width = (this.itemWidth() + this.spacing()) * 2 - this.spacing(); + } else if ([105, 106, 107, 108, 109, 110, 111].contains(index)) { + rect.x = 105 % maxCols * (rect.width + this.spacing()) - this._scrollX; + rect.width = (this.itemWidth() + this.spacing()) * 7 - this.spacing(); + } else if ([112, 113, 114, 115, 116, 117, 118].contains(index)) { + rect.x = 112 % maxCols * (rect.width + this.spacing()) - this._scrollX; + rect.width = (this.itemWidth() + this.spacing()) * 7 - this.spacing(); + } else if ([119, 120, 121, 122, 123, 124, 125].contains(index)) { + rect.x = 119 % maxCols * (rect.width + this.spacing()) - this._scrollX; + rect.width = (this.itemWidth() + this.spacing()) * 7 - this.spacing(); + } + rect.y += Math.max(0, (this.contents.height - this.lineHeight() * 12) / 2); + return rect; +}; + +Window_KeyConfig.prototype.leaveEmpty = function(index) { + return [55, 56, 57, 58, 62, 64, 76, 77, 79, 84, 85, 86, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 102, 104, 106, 107, 108, 109, 110, 111, 113, 114, + 115, 116, 117, 118, 120, 121, 122, 123, 124, 125].contains(index); +}; + +Window_KeyConfig.prototype.drawItem = function(index) { + if (this.leaveEmpty(index)) return; + this.drawItemRect(index); + this.drawItemKey(index); + this.drawItemAction(index); +}; + +Window_KeyConfig.prototype.drawItemRect = function(index) { + var rect = this.itemRect(index); + var color = this.getRectColor(index); + this.drawRect(rect.x+1, rect.y+1, rect.width-2, rect.height-2, color); +}; + +Window_KeyConfig.prototype.getRectColor = function(index) { + if (index > 104) return this.gaugeBackColor(); + var key = Window_KeyConfig._refId[this.commandName(index)]; + var action = Input.keyMapper[key]; + if (action !== undefined) { + return this.textColor(Yanfly.Param.KeyConfigAssignColor); + } else { + return this.gaugeBackColor(); + } +}; + +Window_KeyConfig.prototype.drawRect = function(dx, dy, dw, dh, color) { + this.changePaintOpacity(false); + this.contents.fillRect(dx, dy, dw, dh, color); + this.changePaintOpacity(true); +}; + +Window_KeyConfig.prototype.drawItemKey = function(index) { + this.resetFontSettings(); + this.contents.fontSize -= 8; + this.resetTextColor(); + this.changePaintOpacity(true); + var rect = this.itemRectForText(index); + var align = this.itemTextAlign(); + this.drawText(this.visualName(index), rect.x, rect.y, rect.width, align); +}; + +Window_KeyConfig.prototype.visualName = function(index) { + var text = this._list[index].name; + text = text.replace(/#pD/gi, '' ); + return text; +}; + +Window_KeyConfig.prototype.drawItemAction = function(index) { + var key = Window_KeyConfig._refId[this.commandName(index)]; + var action = Input.keyMapper[key]; + if (action === undefined) return; + this.resetFontSettings(); + this.contents.fontSize -= 8; + var color = this.textColor(Yanfly.Param.KeyConfigActionColor); + this.changeTextColor(color); + this.changePaintOpacity(true); + var rect = this.itemRectForText(index); + rect.y += this.lineHeight(); + var align = this.itemTextAlign(); + this.drawText(this.actionKey(action), rect.x, rect.y, rect.width, align); +}; + +Window_KeyConfig.prototype.actionKey = function(action) { + switch(action) { + case 'ok': + return Yanfly.Param.KeyConfigOkKey; + break; + case 'escape': + return Yanfly.Param.KeyConfigEscKey; + break; + case 'cancel': + return Yanfly.Param.KeyConfigCancelKey; + break; + case 'menu': + return Yanfly.Param.KeyConfigMenuKey; + break; + case 'shift': + return Yanfly.Param.KeyConfigShiftKey; + break; + case 'pageup': + return Yanfly.Param.KeyConfigPageUpKey; + break; + case 'pagedown': + return Yanfly.Param.KeyConfigPageDnKey; + break; + case 'left': + return Yanfly.Param.KeyConfigLeftKey; + break; + case 'up': + return Yanfly.Param.KeyConfigUpKey; + break; + case 'right': + return Yanfly.Param.KeyConfigRightKey; + break; + case 'down': + return Yanfly.Param.KeyConfigDownKey; + break; + } +}; + +Window_KeyConfig.prototype.cursorDown = function(wrap) { + var index = this.index(); + if (index >= 105) { + this.select(index - 104); + } else if ([41, 62].contains(index)) { + this.select(83); + } else if ([83, 104].contains(index)) { + this.select(125); + } else { + Window_Command.prototype.cursorDown.call(this, wrap); + } +}; + +Window_KeyConfig.prototype.cursorUp = function(wrap) { + var index = this.index(); + if (index === 0) { + this.select(125); + } else if (index <= 20) { + this.select(index + 104); + } else if ([41, 62].contains(index)) { + this.select(20); + } else if ([83, 104].contains(index)) { + this.select(41); + } else { + Window_Command.prototype.cursorUp.call(this, wrap); + } +}; + +Window_KeyConfig.prototype.cursorRight = function(wrap) { + var index = this.index(); + if ([54, 55].contains(index)) { + this.select(56); + } else if ([63, 64].contains(index)) { + this.select(65); + } else if ([75, 76].contains(index)) { + this.select(77); + } else if ([87, 88, 89, 90, 91, 92, 93].contains(index)) { + this.select(94); + } else if ([101, 102].contains(index)) { + this.select(103); + } else if ([105, 106, 107, 108, 109, 110, 111].contains(index)) { + this.select(112); + } else if ([112, 113, 114, 115, 116, 117, 118].contains(index)) { + this.select(119); + } else if ([119, 120, 121, 122, 123, 124, 125].contains(index)) { + this.select(0); + } else { + Window_Command.prototype.cursorRight.call(this, wrap); + } +}; + +Window_KeyConfig.prototype.cursorLeft = function(wrap) { + var index = this.index(); + if (index === 0) { + this.select(125); + } else if ([54, 55].contains(index)) { + this.select(53); + } else if ([63, 64].contains(index)) { + this.select(62); + } else if ([75, 76].contains(index)) { + this.select(74); + } else if ([87, 88, 89, 90, 91, 92, 93].contains(index)) { + this.select(86); + } else if ([101, 102].contains(index)) { + this.select(100); + } else if ([105, 106, 107, 108, 109, 110, 111].contains(index)) { + this.select(104); + } else if ([112, 113, 114, 115, 116, 117, 118].contains(index)) { + this.select(111); + } else if ([119, 120, 121, 122, 123, 124, 125].contains(index)) { + this.select(118); + } else { + Window_Command.prototype.cursorLeft.call(this, wrap); + } +}; + +Window_KeyConfig.prototype.updateHelp = function() { + if (!this._helpWindow) return; + switch (this.currentSymbol()) { + case 'key': + this._helpWindow.setText(Yanfly.Param.KeyConfigKeyHelp); + break; + case 'default': + this._helpWindow.setText(Yanfly.Param.KeyConfigDefaultHelp); + break; + case 'wasd': + this._helpWindow.setText(Yanfly.Param.KeyConfigWasdHelp); + break; + case 'cancel': + this._helpWindow.setText(Yanfly.Param.KeyConfigFinishHelp); + break; + default: + this._helpWindow.clear(); + break; + } +}; + +//============================================================================= +// Window_KeyAction +//============================================================================= + +function Window_KeyAction() { + this.initialize.apply(this, arguments); +}; + +Window_KeyAction.prototype = Object.create(Window_Command.prototype); +Window_KeyAction.prototype.constructor = Window_KeyAction; + +Window_KeyAction.prototype.initialize = function() { + Window_Command.prototype.initialize.call(this, 0, 0); + this.x = (Graphics.boxWidth - this.width) / 2; + this.y = (Graphics.boxHeight - this.height) / 2; + this.openness = 0; + this.deactivate(); +}; + +Window_KeyAction.prototype.makeCommandList = function() { + this.addCommand(Yanfly.Param.KeyConfigClearTx, 'ok', true, 'clear'); + this.addCommand(Yanfly.Param.KeyConfigOkTx, 'ok', true, 'ok'); + this.addCommand(Yanfly.Param.KeyConfigEscTx, 'ok', true, 'escape'); + this.addCommand(Yanfly.Param.KeyConfigCancelTx, 'ok', true, 'cancel'); + this.addCommand(Yanfly.Param.KeyConfigMenuTx, 'ok', true, 'menu'); + this.addCommand(Yanfly.Param.KeyConfigShiftTx, 'ok', true, 'shift'); + this.addCommand(Yanfly.Param.KeyConfigPageUpTx, 'ok', true, 'pageup'); + this.addCommand(Yanfly.Param.KeyConfigPageDnTx, 'ok', true, 'pagedown'); + this.addCommand(Yanfly.Param.KeyConfigLeftTx, 'ok', true, 'left'); + this.addCommand(Yanfly.Param.KeyConfigUpTx, 'ok', true, 'up'); + this.addCommand(Yanfly.Param.KeyConfigRightTx, 'ok', true, 'right'); + this.addCommand(Yanfly.Param.KeyConfigDownTx, 'ok', true, 'down'); +}; + +//============================================================================= +// Scene_Options +//============================================================================= + +Yanfly.KeyConfig.Scene_Options_createOptionsWindow = + Scene_Options.prototype.createOptionsWindow; +Scene_Options.prototype.createOptionsWindow = function() { + Yanfly.KeyConfig.Scene_Options_createOptionsWindow.call(this); + this._optionsWindow.setHandler('keyConfig', this.commandKeyConfig.bind(this)); +}; + +Scene_Options.prototype.commandKeyConfig = function() { + SceneManager.push(Scene_KeyConfig); +}; + +//============================================================================= +// Scene_KeyConfig +//============================================================================= + +function Scene_KeyConfig() { + this.initialize.apply(this, arguments); +} + +Scene_KeyConfig.prototype = Object.create(Scene_MenuBase.prototype); +Scene_KeyConfig.prototype.constructor = Scene_KeyConfig; + +Scene_KeyConfig.prototype.initialize = function() { + Scene_MenuBase.prototype.initialize.call(this); +}; + +Scene_KeyConfig.prototype.create = function() { + Scene_MenuBase.prototype.create.call(this); + this.createHelpWindow(); + this.createKeyConfigWindow(); + this.createKeyActionWindow(); +}; + +Scene_KeyConfig.prototype.terminate = function() { + Scene_MenuBase.prototype.terminate.call(this); + ConfigManager.save(); +}; + +Scene_KeyConfig.prototype.refreshWindows = function() { + this._configWindow.refresh(); + this._configWindow.activate(); + ConfigManager.save(); +}; + +Scene_KeyConfig.prototype.createKeyConfigWindow = function() { + this._configWindow = new Window_KeyConfig(this._helpWindow); + this._configWindow.setHandler('default', this.commandDefault.bind(this)); + this._configWindow.setHandler('wasd', this.commandWasd.bind(this)); + this._configWindow.setHandler('cancel', this.popScene.bind(this)); + this._configWindow.setHandler('key', this.commandKey.bind(this)); + this.addWindow(this._configWindow); +}; + +Scene_KeyConfig.prototype.createKeyActionWindow = function() { + this._actionWindow = new Window_KeyAction(); + this._actionWindow.setHandler('ok', this.onActionOk.bind(this)); + this._actionWindow.setHandler('cancel', this.onActionCancel.bind(this)); + this.addWindow(this._actionWindow); +}; + +Scene_KeyConfig.prototype.commandDefault = function() { + ConfigManager.keyMapper = { + 9: 'tab', + 13: 'ok', + 16: 'shift', + 17: 'control', + 18: 'control', + 27: 'escape', + 32: 'ok', + 33: 'pageup', + 34: 'pagedown', + 37: 'left', + 38: 'up', + 39: 'right', + 40: 'down', + 45: 'escape', + 46: 'ok', + 35: 'escape', + 36: 'menu', + 81: 'pageup', + 87: 'pagedown', + 88: 'escape', + 90: 'ok', + 96: 'escape', + 98: 'down', + 100: 'left', + 102: 'right', + 104: 'up', + 120: 'debug' + }; + ConfigManager.applyKeyConfig(); + this.refreshWindows(); +}; + +Scene_KeyConfig.prototype.commandWasd = function() { + ConfigManager.keyMapper = { + 9: 'tab', + 13: 'ok', + 16: 'shift', + 17: 'control', + 18: 'control', + 27: 'escape', + 32: 'ok', + 33: 'pageup', + 34: 'pagedown', + 37: 'left', + 38: 'up', + 39: 'right', + 40: 'down', + 87: 'up', + 65: 'left', + 83: 'down', + 68: 'right', + 74: 'ok', + 75: 'escape', + 77: 'menu', + 219: 'pageup', + 221: 'pagedown', + 45: 'escape', + 46: 'ok', + 35: 'escape', + 36: 'menu', + 96: 'escape', + 98: 'down', + 100: 'left', + 102: 'right', + 104: 'up', + 120: 'debug' + }; + ConfigManager.applyKeyConfig(); + this.refreshWindows(); +}; + +Scene_KeyConfig.prototype.commandKey = function() { + this._actionWindow.select(0); + this._actionWindow.open(); + this._actionWindow.activate(); +}; + +Scene_KeyConfig.prototype.onActionCancel = function() { + this._actionWindow.close(); + this._actionWindow.deactivate(); + this._configWindow.activate(); +}; + +Scene_KeyConfig.prototype.onActionOk = function() { + var action = this._actionWindow.currentExt(); + var name = this._configWindow.commandName(this._configWindow.index()); + var key = Window_KeyConfig._refId[name]; + if (action === 'clear') { + ConfigManager.keyMapper[key] = undefined; + } else { + ConfigManager.keyMapper[key] = action; + } + SoundManager.playEquip(); + ConfigManager.applyKeyConfig(); + this.onActionCancel(); + this.refreshWindows(); +}; + +//============================================================================= +// End of File +//============================================================================= diff --git a/js/plugins/LastSubjectActor.js b/js/plugins/LastSubjectActor.js new file mode 100644 index 0000000..05cd017 --- /dev/null +++ b/js/plugins/LastSubjectActor.js @@ -0,0 +1,41 @@ +//============================================================================= +// LastSubjectActor.js +//============================================================================= + +/*: + * @plugindesc Stores the ID of the actor who acted lastly to a variable. + * @author Yoji Ojima + * + * @param Variable ID + * @desc The ID of the variable for storing the actor ID. + * @default 0 + * + * @help This plugin does not provide plugin commands. + */ + +/*:ja + * @plugindesc 最後に行動したアクターのIDを変数に格納します。 + * @author Yoji Ojima + * + * @param Variable ID + * @desc アクターIDを格納する変数のIDです。 + * @default 0 + * + * @help このプラグインには、プラグインコマンドはありません。 + */ + +(function() { + + var parameters = PluginManager.parameters('LastSubjectActor'); + var variableId = Number(parameters['Variable ID'] || 0); + + var _BattleManager_processTurn = BattleManager.processTurn; + BattleManager.processTurn = function() { + var subject = this._subject; + if (subject.isActor()) { + $gameVariables.setValue(variableId, subject.actorId()); + } + _BattleManager_processTurn.call(this); + }; + +})(); diff --git a/js/plugins/LastUsedItem.js b/js/plugins/LastUsedItem.js new file mode 100644 index 0000000..ccb96b4 --- /dev/null +++ b/js/plugins/LastUsedItem.js @@ -0,0 +1,54 @@ +//============================================================================= +// LastUsedItem.js +//============================================================================= + +/*: + * @plugindesc Stores the ID of the skill or item which is used last. + * @author Yoji Ojima + * + * @param Variable ID 1 + * @desc The ID of the variable for storing the skill or item ID. + * @default 0 + * + * @param Variable ID 2 + * @desc The ID of the variable for distinguishing between skills and items. + * Stored value 0: item, 1: skill + * @default 0 + * + * @help This plugin does not provide plugin commands. + */ + +/*:ja + * @plugindesc 最後に使用されたスキルかアイテムのIDを変数に格納します。 + * @author Yoji Ojima + * + * @param Variable ID 1 + * @desc スキルかアイテムのIDを格納する変数のIDです。 + * @default 0 + * + * @param Variable ID 2 + * @desc スキルかアイテムの判別情報を格納する変数のIDです。 + * 代入された値 0: アイテム、1: スキル + * @default 0 + * + * @help このプラグインには、プラグインコマンドはありません。 + */ + +(function() { + + var parameters = PluginManager.parameters('LastUsedItem'); + var variableId1 = Number(parameters['Variable ID 1'] || 0); + var variableId2 = Number(parameters['Variable ID 2'] || 0); + + var _Game_Battler_useItem = Game_Battler.prototype.useItem; + Game_Battler.prototype.useItem = function(item) { + _Game_Battler_useItem.call(this, item); + $gameVariables.setValue(variableId1, item.id); + if (DataManager.isSkill(item)) { + $gameVariables.setValue(variableId2, 1); + } else { + $gameVariables.setValue(variableId2, 0); + } + }; + +})(); diff --git a/js/plugins/MenuSubMember.js b/js/plugins/MenuSubMember.js new file mode 100644 index 0000000..264becd --- /dev/null +++ b/js/plugins/MenuSubMember.js @@ -0,0 +1,564 @@ +//============================================================================= +// MenuSubMember.js (Ver1.2.2) +//============================================================================= +// 更新履歴 +// 2015.10.27 1.0 初公開(準公式プラグイン) +// 2017.06.03 1.1 マップ画面でも同行者を表示 +// 2017.06.04 1.1.1 後方互換性対応。プラグイン導入前のセーブデータも読み込み可 +// 2017.06.05 1.1.2 連続でメニューを開閉するとフリーズする不具合を修正 +// 2017.06.17 1.2 ひきも記さんの隊列歩行プラグイン「TMFollowerEx.js」との併用が +// 可能になりました。 +// 2017.06.19 1.2.1 「TMFollowerEx.js」プラグイン導入前にセーブしたデータを +// 読み込んでも、正しく隊列が表示されるようになりました。 +// 逆(「TMFollowerEx.js」導入後にセーブしたデータを、導入前の +// 環境で読み込む)の場合も、正しく表示されます。 +// 2018.09.18 1.2.2 メニュー画面での同行者の表示のタイプを追加 + +/*: + * @plugindesc display sub member at menu window and field (Ver1.2.2) + * @author Sasuke KANNAZUKI (thanks to Yoji Ojima) + * + * @param subMemberIdVal1 + * @desc variable id for actor id of sub member 1 + * @default 11 + * + * @param subMemberIdVal2 + * @desc variable id for actor id of sub member 2 + * @default 12 + * + * @param subMemberIdVal3 + * @desc variable id for actor id of sub member 3 + * @default 13 + * + * @param subMemberIdVal4 + * @desc variable id for actor id of sub member 4 + * @default 14 + * + * @param displayIfNone + * @desc when no sub members, whether display the window or not. + * (1=display, 0=not display) + * @default 0 + * + * @param subMemberText + * @desc display text that means sub member + * @default Sub Members + * + * @param subMemberNoneText + * @desc text display when no sub members + * @default None + * + * @param DisplayOnMap + * @desc whether to display sub members on map at tail of party (1:yes, 0:no) + * @default 1 + * + * @param MenuSubMember Display Mode + * @desc set display mode on window. 0=default, 1=without name + * @default 0 + * + * @help This plugin does not provide plugin commands. + * + * this plugin displays sub members under the menu commands. + * sub member is an actor that not attend battle. + * + * [Ver1.1 additional feature] + * At map scene, it displays sub members after actors. + * *note* by option setting, this function can invalidate. + * + * if no sub members, set variables value be 0. + * + * the actors appeared on map are top 4, that attends the battle. + * sub members in the party appear always every one on map. + * + * [Ver1.2 additional feature] + * _Enables to utilize this plugin with "TMFollowerEx.js". + * http://hikimoki.sakura.ne.jp/plugin/plugin_system.html#TMFollowerEx + * + * In the case, be sure to put MenuSubMember.js below TMFollowerEx.js. + * + * *** Check points to utilize 2 plugins: + * ・You can insert NPC actor(s) either/both top or tail. + * This function is independent from MenuSubMember. + * ・You can set the max length of the followers. + * It enables you to display all actors and sub members on the map scene. + * ・"TMFollower.js" suppose menu sub members as the tail of actors. + * So you can run plugin commands for followers also to menu sub members. + * ・If the player obtain more character(actors, NPCs, and menu sub members), + * truncate actors and menu sub members from the tail. + * + * note: this plugin is only for default menu. + * it cannot use on changed layout menu(ex. AltMenuScreen.js). + * + * [License] + * this plugin is released under MIT license. + * http://opensource.org/licenses/mit-license.php + */ + +/*:ja + * @plugindesc メニュー画面と隊列の最後尾に同行者を表示します(ver1.2.2) + * @author 神無月サスケ (thanks to Yoji Ojima) + * + * @param subMemberIdVal1 + * @desc 同行者1のアクターIDを入れる変数ID + * @default 11 + * + * @param subMemberIdVal2 + * @desc 同行者2のアクターIDを入れる変数ID + * @default 12 + * + * @param subMemberIdVal3 + * @desc 同行者3のアクターIDを入れる変数ID + * @default 13 + * + * @param subMemberIdVal4 + * @desc 同行者4のアクターIDを入れる変数ID + * @default 14 + * + * @param displayIfNone + * @desc 同行者がいない場合でも、ウィンドウを表示するか + * (する=1, しない=0) + * @default 0 + * + * @param subMemberText + * @desc 「同行者」の意味で表示するテキスト + * @default 同行者 + * + * @param subMemberNoneText + * @desc 同行者がいない時に表示するテキスト + * @default なし + * + * @param DisplayOnMap + * @desc 隊列歩行の最後尾に同行者を表示するか(1:する, 0:しない) + * @default 1 + * + * @param MenuSubMember Display Mode + * @desc メニュー画面での同行者の表示方法。0=通常 1=キャラのみで名前なし + * @default 0 + * + * @help このプラグインには、プラグインコマンドはありません。 + * + * このプラグインは、同行者リストを、メニューコマンドの下に表示します。 + * 同行者とは、戦闘に参加しないアクターです。 + * + * [Ver1.1 追加要素] + * 同行者は、マップ上での隊列歩行で、アクターの最後尾に表示されます。 + * オプションでマップ上で非表示にすることも可能です。 + * + * 同行者を設定しない場合は、該当する変数の値を 0 にしてください。 + * + * アクターが5人以上の場合でも、隊列に現れるアクターは先頭の4人だけです。 + * 一方同行者は、全員(最大4人)が表示されます。 + * + * [Ver1.2 追加要素] + * ひきも記さんの隊列歩行プラグイン「TMFollowerEx.js」との連携が可能に。 + * http://hikimoki.sakura.ne.jp/plugin/plugin_system.html#TMFollowerEx + * + * 連携する場合、本プラグインMenuSubMember.js を、必ず下に配置してください。 + * + * 連携により、例えば以下のようなことが可能になります。 + * ・隊列の先頭や末尾に、メニューに現れないアクターを挿入可能です。 + * この機能は、同行者とは完全に独立しています。 + * ・隊列の長さを指定可能です。これにより、本プラグイン単体では先頭4人のみ + * ですが、連携することで、全てのアクター、同行者を表示することも可能です。 + * ・『TMFollower.js』側から見ると同行者は「最後尾にいるフォロワー達」と + * 認識されます。このため、『TMFollower.js』側のプラグインコマンドで + * フォロワーに関する処理が同行者に対しても施されます。 + * ・仮に指定した隊列表示人数より、アクターと同行者の方が多くなった場合、 + * 同行者の最後尾から順に表示が省略されていきます。 + * + * ■注意:このプラグインはデフォルトのメニュー画面専用です。 + * プラグイン(AltMenuScreen.jsなど)でレイアウトを変更したケースでは使えません。 + * + * ■ライセンス表記 + * このプラグインは MIT ライセンスで配布されます。 + * ご自由にお使いください。 + * http://opensource.org/licenses/mit-license.php + */ + +(function() { + + // + // process parameters + // + var parameters = PluginManager.parameters('MenuSubMember'); + var submemberVar1 = Number(parameters['subMemberIdVal1'] || 11); + var submemberVar2 = Number(parameters['subMemberIdVal2'] || 12); + var submemberVar3 = Number(parameters['subMemberIdVal3'] || 13); + var submemberVar4 = Number(parameters['subMemberIdVal4'] || 14); + var subMemberText = parameters['subMemberText'] || 'Sub Members'; + var subMemberNoneText = parameters['subMemberNoneText'] || 'None'; + var displayIfNone = !!Number(parameters['displayIfNone']); + var DisplayOnMap = !!Number(parameters['DisplayOnMap'] || 1); + var menuDisplayMode = Number(parameters['MenuSubMember Display Mode'] || 0); + + // + // process TMFollowerEx parameters + // + var tmParams = PluginManager.parameters('TMFollowerEx'); + var additionalFollower = tmParams ? Number(tmParams['additionalFollower'] || + 4) : 4; + + // ---------------------------------------------------------------------- + // add window to menu scene (V1.0 section) + // + var _Scene_Menu_create = Scene_Menu.prototype.create; + Scene_Menu.prototype.create = function() { + _Scene_Menu_create.call(this); + this.createSubMemberWindow(); + }; + + Scene_Menu.prototype.createSubMemberWindow = function() { + var x = 0; + var y = this._commandWindow.height; + var width = this._commandWindow.width; + var height = Graphics.height - y - this._goldWindow.height; + switch (menuDisplayMode) { + case 0: + this._subMemberWindow = new Window_SubMember(x, y, width, height); + break; + default: + this._subMemberWindow = new Window_SubMember2(x, y, width, height); + break; + } + this.addWindow(this._subMemberWindow); + }; + + var _Scene_Menu_start = Scene_Menu.prototype.start; + Scene_Menu.prototype.start = function() { + _Scene_Menu_start.call(this); + this._subMemberWindow.refresh(); + }; + + // + // sub member window + // + function Window_SubMember() { + this.initialize.apply(this, arguments); + } + + Window_SubMember.prototype = Object.create(Window_Base.prototype); + Window_SubMember.prototype.constructor = Window_SubMember; + + Window_SubMember.prototype.initialize = function(x, y, width, height) { + Window_Base.prototype.initialize.call(this, x, y, width, height); + this.setSubMember(); + this.refresh(); + }; + + Window_SubMember.prototype.setSubMember = function() { + this.subMember1 = $gameActors.actor($gameVariables.value(submemberVar1)); + this.subMember2 = $gameActors.actor($gameVariables.value(submemberVar2)); + this.subMember3 = $gameActors.actor($gameVariables.value(submemberVar3)); + this.subMember4 = $gameActors.actor($gameVariables.value(submemberVar4)); + }; + + Window_SubMember.prototype.refresh = function() { + var y = 0; + var numLines = 0; + var isVisible = true; + var width = this.width - 80; + var lineHeight = this.lineHeight(); + this.contents.clear(); + // draw the text "sub member" + this.changeTextColor(this.systemColor()); + this.drawText(subMemberText, 4, 0, width); + numLines++; + // draw sub members + this.resetTextColor(); + y += lineHeight; + if(this.subMember1){ + this.drawActorName(this.subMember1, 44 , y, width); + this.drawActorCharacter(this.subMember1, 24, y + 40); + y += lineHeight; + numLines++; + } + if(this.subMember2){ + this.drawActorName(this.subMember2, 44, y, width); + this.drawActorCharacter(this.subMember2, 24, y + 40); + y += lineHeight; + numLines++; + } + if(this.subMember3){ + this.drawActorName(this.subMember3, 44, y, width); + this.drawActorCharacter(this.subMember3, 24, y + 40); + y += lineHeight; + numLines++; + } + if(this.subMember4){ + this.drawActorName(this.subMember4, 44, y, width); + this.drawActorCharacter(this.subMember4, 24, y + 40); + y += lineHeight; + numLines++; + } + // if no sub members + if(y === lineHeight){ + this.drawText(subMemberNoneText, 4, y, width); + numLines++; + if(!displayIfNone){ + isVisible = false; + } + } + // fitting height + if(numLines < 5 || this.y != 324){ + this.height = this.fittingHeight(numLines) + 4; + this.y = Graphics.height - 72 - this.height; + }; + // set visible status + this.visible = isVisible; + }; + + // + // sub member window 2 (without name) + // + function Window_SubMember2() { + this.initialize.apply(this, arguments); + } + + Window_SubMember2.prototype = Object.create(Window_SubMember.prototype); + Window_SubMember2.prototype.constructor = Window_SubMember2; + + Window_SubMember2.prototype.initialize = function(x, y, width, height) { + Window_SubMember.prototype.initialize.call(this, x, y, width, height); + }; + + Window_SubMember2.prototype.refresh = function() { + var x = 24; + var y = this.lineHeight() * 2 + 16; + var charSize = $gameMap.tileWidth(); + var numMembers = 0; + var isVisible = true; + var width = this.width - 80; + this.contents.clear(); + // draw the text "sub member" + this.changeTextColor(this.systemColor()); + this.drawText(subMemberText, 4, 0, width); + if(this.subMember1){ + this.drawActorCharacter(this.subMember1, x, y); + x += charSize; + numMembers++; + } + if(this.subMember2){ + this.drawActorCharacter(this.subMember2, x, y); + x += charSize; + numMembers++; + } + if(this.subMember3){ + this.drawActorCharacter(this.subMember3, x, y); + x += charSize; + numMembers++; + } + if(this.subMember4){ + this.drawActorCharacter(this.subMember4, x, y); + x += charSize; + numMembers++; + } + // draw sub members + this.resetTextColor(); + // if no sub members + if(x === 24){ + this.drawText(subMemberNoneText, 4, this.lineHeight() + 16); + if(!displayIfNone){ + isVisible = false; + } + } + // fitting height + this.height = this.fittingHeight(2) + 20; + this.y = Graphics.height - 72 - this.height; + // set visible status + this.visible = isVisible; + }; + + // ---------------------------------------------------------------------- + // display sub member at screen + // + // added parameters Ver.1.1 + // + var subMemberVarList = [submemberVar1, + submemberVar2, submemberVar3, submemberVar4]; + var subMembers = []; + + // + // sub members definition + // + var _Game_Followers_initialize = Game_Followers.prototype.initialize; + Game_Followers.prototype.initialize = function() { + _Game_Followers_initialize.call(this); + this.createSubMembers(); + }; + + Game_Followers.prototype.createSubMembers = function () { + for (var i = 0; i < 4 ; i++) { + var follower = new Game_Follower(this._data.length + 1); + this._data.push(follower); + subMembers.push(follower); + } + }; + + // + // at each loading, recreate followers. + // + var _DataManager_loadGame = DataManager.loadGame; + DataManager.loadGame = function(savefileId) { + var isSuccess = _DataManager_loadGame.call(this, savefileId) + if (isSuccess) { + $gamePlayer._followers.recreateFollowers(); + } + return isSuccess; + }; + + Game_Followers.prototype.recreateFollowers = function () { + this._data = []; + for (var i = 1; i < $gameParty.maxBattleMembers(); i++) { + this._data.push(new Game_Follower(i)); + } + $gameSystem._touchFollowerIncluded = null; + if ($gameSystem.TMFollowerIncluded()) { + for (i = 0; i < additionalFollower; i++) { + this._data.push(new Game_Follower($gameParty.maxBattleMembers() + i)); + } + } + this.createSubMembers(); + }; + + // + // sub members display (Game_Follower) + // + var parameterToSubMemberActor = function (index) { + var varId = subMemberVarList[index]; + var subMemberID = $gameVariables.value(varId); + var subMember = $gameActors.actor(subMemberID); + if (varId > 0 && subMemberID && subMember) { + return subMember; + } + return null; + }; + + // skip subMember whose actorId is 0. + var subMemberPosition = function (index) { + for (var newIndex = 0, i = 0; i < 4; i++) { + var actor = parameterToSubMemberActor(i); + if (actor) { + if (newIndex++ === index) { + return actor; + } + } else { + continue; + } + } + return null; + }; + + // + // change subPlayer display when specified variable changes + // + var _Game_Variables_setValue = Game_Variables.prototype.setValue; + Game_Variables.prototype.setValue = function(variableId, value) { + _Game_Variables_setValue.call(this, variableId, value); + if (DisplayOnMap) { + if (subMemberVarList.contains(variableId)) { + $gameTemp.needFollowerRefresh = true; + } + } + }; + + var _Scene_Map_update = Scene_Map.prototype.update; + Scene_Map.prototype.update = function() { + if ($gameTemp.needFollowerRefresh) { + $gamePlayer._followers.refresh(); + $gameTemp.needFollowerRefresh = false; + } + _Scene_Map_update.call(this); + }; + + // + // sub members display (Spriteset_Map) + // + var _Spriteset_Map_createCharacters = + Spriteset_Map.prototype.createCharacters; + Spriteset_Map.prototype.createCharacters = function() { + _Spriteset_Map_createCharacters.call(this); + for (var i = 0; i < 4; i++) { + var newCharacterSprite = new Sprite_Character(subMembers[i]); + this._characterSprites.push(newCharacterSprite); + this._tilemap.addChild(newCharacterSprite); + } + }; + + // ---------------------------------------------------------------------- + // add compatibility with TMFollowerEx.js + // + // added features Ver.1.2 + + // + // read hikimoki's plugin parameters + // + Game_System.prototype.TMFollowerIncluded = function() { + if (this._touchFollowerIncluded == null) { + this._touchFollowerIncluded = ("isTouchFollowerEnabled" in $gameSystem); + } + return this._touchFollowerIncluded; + }; + + // + // find the number of each component + // + var followerMaxSize = function () { + return $gameParty.maxBattleMembers() - 1 + + ($gameSystem.TMFollowerIncluded() ? additionalFollower : 4); + }; + + var hasHeader = function () { + return $gameSystem.TMFollowerIncluded() && + $gamePlayer.headerFollower() > 0; + }; + + var hasFooter = function () { + return $gameSystem.TMFollowerIncluded() && + $gamePlayer.footerFollower() > 0; + }; + + var numDispActor = function () { + var actorFollowerNum = $gameParty.size() - 1 + (hasHeader() ? 1 : 0); + var ceil = $gameSystem.TMFollowerIncluded() ? followerMaxSize() : + $gameParty.maxBattleMembers() - 1; + return actorFollowerNum.clamp(0, ceil); + }; + + var numSubMembers = function () { + var num = 0; + if (DisplayOnMap) { + for (var i = 0; i < 4; i++) { + if (subMemberPosition(i)) { + num++; + } + } + } + return num.clamp(0, followerMaxSize() - numDispActor()); + }; + + // + // find followers' character + // + // (overwritten) + Game_Follower.prototype.actor = function() { + var lastId = 0; + var headerNum = hasHeader() ? 1 : 0; + var footerNum = hasFooter() ? 1 : 0; + // footer + if (hasFooter() && + this._memberIndex === Math.min(followerMaxSize(), + numDispActor() + numSubMembers() + 1)) { + return $gameActors.actor($gamePlayer.footerFollower()); + } + // normal followers. + if (this._memberIndex <= (lastId = numDispActor())) { + return $gameParty.allMembers()[this._memberIndex - headerNum]; + } + // menu sub member + if (DisplayOnMap && this._memberIndex <= (lastId += numSubMembers())) { + return subMemberPosition(this._memberIndex + + numSubMembers() - lastId - 1); + } + return null; + }; + +})(); diff --git a/js/plugins/NewItemScene.js b/js/plugins/NewItemScene.js new file mode 100644 index 0000000..7adabf1 --- /dev/null +++ b/js/plugins/NewItemScene.js @@ -0,0 +1,71 @@ +//============================================================================= +// NewItemScene.js +//============================================================================= + +/*: + * @plugindesc item scene that divides armors by shield/others + * @author Sasuke KANNAZUKI + * + * @help This plugin does not provide plugin commands. + * + * @param ShieldName + * @desc Shield Name + * @default Shields + * + * @param OtherArmorName + * @desc Other Armor Name + * @default Armors + * + */ +/*:ja + * @plugindesc 盾とその他防具を分けて表示するアイテムメニュー + * @author 神無月サスケ + * + * @help このプラグインにはプラグインコマンドはありません。 + * + * @param ShieldName + * @desc 盾の名前 + * @default 盾 + * + * @param OtherArmorName + * @desc それ以外の防具の名前 + * @default 鎧など + * + */ + +(function() { + + var parameters = PluginManager.parameters('NewItemScene'); + var ShieldName = parameters['ShieldName'] || 'Shields'; + var OtherArmorName = parameters['OtherArmorName'] || 'Armors'; + + Window_ItemCategory.prototype.maxCols = function() { + return 5; + }; + + Window_ItemCategory.prototype.makeCommandList = function() { + this.addCommand(TextManager.item, 'item'); + this.addCommand(TextManager.weapon, 'weapon'); + this.addCommand(ShieldName, 'shield'); + this.addCommand(OtherArmorName, 'armor'); + this.addCommand(TextManager.keyItem, 'keyItem'); + }; + + Window_ItemList.prototype.includes = function(item) { + switch (this._category) { + case 'item': + return DataManager.isItem(item) && item.itypeId === 1; + case 'weapon': + return DataManager.isWeapon(item); + case 'shield': + return DataManager.isArmor(item) && item.etypeId === 2; + case 'armor': + return DataManager.isArmor(item) && item.etypeId !== 2; + case 'keyItem': + return DataManager.isItem(item) && item.itypeId === 2; + default: + return false; + } + }; + +})(); diff --git a/js/plugins/NovelMessage.js b/js/plugins/NovelMessage.js new file mode 100644 index 0000000..c44ba8f --- /dev/null +++ b/js/plugins/NovelMessage.js @@ -0,0 +1,160 @@ +//============================================================================= +// NovelMessage.js +//============================================================================= + +/*: + * @plugindesc Provides the full screen type message window. + * @author Yoji Ojima, Sasuke KANNAZUKI + * + * @param Switch ID + * @desc The ID of the switch to determine novel mode. + * @default 11 + * + * @help + * Use control character '\F' to page break in novel mode. + * + * This plugin does not provide plugin commands. + */ + +/*:ja + * @plugindesc 全画面型のメッセージウィンドウです。 + * @author Yoji Ojima, 神無月サスケ + * + * @param Switch ID + * @desc ノベルモードにするためのスイッチのIDです。 + * @default 11 + * + * @help + * ノベルモードにて改ページをするには、制御文字「\F」を使用してください。 + * + * このプラグインには、プラグインコマンドはありません。 + */ + +(function() { + + var parameters = PluginManager.parameters('NovelMessage'); + var switchId = Number(parameters['Switch ID'] || 11); + + function isNovelMode() { + return $gameSwitches.value(switchId); + }; + + var _Window_Message_initMembers = Window_Message.prototype.initMembers; + Window_Message.prototype.initMembers = function() { + _Window_Message_initMembers.call(this); + this._novelLineY = 0; + this._novelNewPage = true; + }; + + var _Window_Message_updatePlacement = + Window_Message.prototype.updatePlacement; + Window_Message.prototype.updatePlacement = function() { + if (!isNovelMode()) { + this.width = this.windowWidth(); + this.height = this.windowHeight(); + this.x = (Graphics.boxWidth - this.width) / 2; + } + _Window_Message_updatePlacement.call(this); + if (isNovelMode()) { + this.move(0, 0, Graphics.boxWidth, Graphics.boxHeight); + } + if (this.contents.height !== this.contentsHeight()) { + this.contents.resize(this.contentsWidth(), this.contentsHeight()); + } + }; + + var _Window_Message_updateBackground = + Window_Message.prototype.updateBackground; + Window_Message.prototype.updateBackground = function() { + _Window_Message_updateBackground.call(this); + if (isNovelMode()) { + this.setBackgroundType(2); + } + }; + + var _Window_Message_onEndOfText = Window_Message.prototype.onEndOfText; + Window_Message.prototype.onEndOfText = function() { + if (isNovelMode()) { + this.processNewLine(this._textState); + } + _Window_Message_onEndOfText.call(this); + }; + + var _Window_Message_startMessage = Window_Message.prototype.startMessage; + Window_Message.prototype.startMessage = function() { + _Window_Message_startMessage.call(this); + if (isNovelMode()) { + this._textState.y = this._novelLineY; + } + }; + + var _Window_Message_newPage = Window_Message.prototype.newPage; + Window_Message.prototype.newPage = function(textState) { + if (!isNovelMode() || this._novelNewPage) { + _Window_Message_newPage.call(this, textState); + this._novelLineY = 0; + this._novelNewPage = false; + } + if (isNovelMode()) { + textState.x = this.newLineX(); + textState.left = this.newLineX(); + textState.height = this.calcTextHeight(textState, false); + this._lineShowFast = false; + this._pauseSkip = false; + if (this.needsNewPage(textState)) { + textState.y = this.contents.height; + this._novelNewPage = true; + this._textState.index--; + this.startPause(); + } + } + }; + + var _Window_Message_processNewLine = Window_Message.prototype.processNewLine; + Window_Message.prototype.processNewLine = function(textState) { + _Window_Message_processNewLine.call(this, textState); + if (isNovelMode()) { + this._novelLineY = this._textState.y; + } + }; + + var _Window_Message_processEscapeCharacter = + Window_Message.prototype.processEscapeCharacter; + Window_Message.prototype.processEscapeCharacter = function(code, textState) { + if (isNovelMode() && code === 'F') { + textState.y = this.contents.height; + this._novelNewPage = true; + return; + } + _Window_Message_processEscapeCharacter.call(this, code, textState); + }; + + var _Window_ChoiceList_updatePlacement = + Window_ChoiceList.prototype.updatePlacement; + Window_ChoiceList.prototype.updatePlacement = function() { + _Window_ChoiceList_updatePlacement.call(this); + if (isNovelMode()) { + this.y = Graphics.boxHeight - this.height - 8; + } + }; + + var _Window_NumberInput_updatePlacement = + Window_NumberInput.prototype.updatePlacement; + Window_NumberInput.prototype.updatePlacement = function() { + _Window_NumberInput_updatePlacement.call(this); + if (isNovelMode()) { + this.y = Graphics.boxHeight - this.height - 8; + } + }; + + var _Window_NumberInput_buttonY = + Window_NumberInput.prototype.buttonY; + Window_NumberInput.prototype.buttonY = function() { + if (isNovelMode()) { + return 0 - this._buttons[0].height - 8; + } else { + return _Window_NumberInput_buttonY.call(); + } + }; + +})(); diff --git a/js/plugins/NumbState.js b/js/plugins/NumbState.js new file mode 100644 index 0000000..edf3c0f --- /dev/null +++ b/js/plugins/NumbState.js @@ -0,0 +1,79 @@ +//============================================================================= +// NumbStates.js +//============================================================================= + +/*: + * @plugindesc make the state that numb. + * numb is the state that one sometimes(using random) cannot execute action. + * @author Sasuke KANNAZUKI + * + * @param NumbMsg + * @desc text to display when one cannot move by numb. + * @default cannot move by the numb! + * + * @help This plugin does not provide plugin commands. + * + * State Note: + * to invoke this state, write down the state's note as follows. + * # cannot execute action by 35% + * + * prefer that restriction (= action constraint) of the state is 0 + * (= command inputtable). + */ + +/*:ja + * @plugindesc 一定確率で行動できないステート + * @author 神無月サスケ + * + * @param NumbMsg + * @desc 身体が痺れて動けない場合に表示する文章 + * @default は身体がしびれて動けない! + * + * @help このプラグインにプラグインコマンドはありません。 + * 痺れ(numb)は、入力は常に受け付けるものの特定の確率で動けなくなる状態で + * ツクール標準の眠り/麻痺とは異なります。 + * + * 書式: + * 「ステート」のメモに以下のように書いてください。 + * + * この場合、このステートになったら 35% の確率で行動できなくなります。 + * + * 注意: + * ステートの「行動制約」は「なし(=入力可)」にするのが望ましいです。 + */ + +(function() { + + Game_BattlerBase.prototype.numb_occur = function() { + for (var id = 0; id < this._states.length; id++) { + var stateId = this._states[id]; + var result = $dataStates[stateId].meta.numb_rate; + if (result) { + if(Math.randomInt(100) < Number(result)) { + return true; + } + } + } + return false; + }; + + var _BattleManager_processTurn = BattleManager.processTurn; + BattleManager.processTurn = function() { + var subject = this._subject; + if ( subject.numb_occur() ){ + subject.clearActions(); + this._logWindow.displayNumbOccur(subject); + } + _BattleManager_processTurn.call(this); + }; + + Window_BattleLog.prototype.displayNumbOccur = function(subject){ + var parameters = PluginManager.parameters('NumbState'); + var NumbText = String(parameters['NumbMsg'] || + " cannot move by the numb!"); + this.push('addText', subject.name() + NumbText); + this.push('clear'); + }; + +})(); + diff --git a/js/plugins/OuterSelfSwitch.js b/js/plugins/OuterSelfSwitch.js new file mode 100644 index 0000000..527d04e --- /dev/null +++ b/js/plugins/OuterSelfSwitch.js @@ -0,0 +1,66 @@ +//============================================================================= +// OuterSelfSwitch.js +//============================================================================= + +/*: + * @plugindesc Changes a self switch for other events. + * @author Yoji Ojima + * + * @help + * + * Plugin Command: + * OuterSelfSwitch on 3 A # Turns on the switch A for the event #3 + * OuterSelfSwitch on 4 B # Turns on the switch B for the event #4 + * OuterSelfSwitch off 5 C # Turns off the switch C for the event #5 + * OuterSelfSwitch off 6 D # Turns off the switch D for the event #6 + * OuterSelfSwitch off all A # Turns off the switch A for all the events + */ + +/*:ja + * @plugindesc 他のイベントのセルフスイッチを操作します。 + * @author Yoji Ojima + * + * @help + * + * プラグインコマンド: + * OuterSelfSwitch on 3 A # イベント3番のセルフスイッチAをオン + * OuterSelfSwitch on 4 B # イベント4番のセルフスイッチBをオン + * OuterSelfSwitch off 5 C # イベント5番のセルフスイッチCをオフ + * OuterSelfSwitch off 6 D # イベント6番のセルフスイッチDをオフ + * OuterSelfSwitch off all A # 全イベントのセルフスイッチAをオフ + */ + +(function() { + + var _Game_Interpreter_pluginCommand = + Game_Interpreter.prototype.pluginCommand; + Game_Interpreter.prototype.pluginCommand = function(command, args) { + _Game_Interpreter_pluginCommand.call(this, command, args); + if (command === 'OuterSelfSwitch') { + var operation = args[0]; + if (operation === 'on' || operation === 'off') { + var target = args[1]; + var character = String(args[2]); + var value = (operation === 'on'); + changeSelfSwitch(this._mapId, target, character, value); + } + } + }; + + function changeSelfSwitch(mapId, target, character, value) { + if (character.match(/^[A-D]$/)) { + if (target === 'all') { + for (var i = 1; i < $dataMap.events.length; i++) { + changeSelfSwitch(mapId, i, character, value); + } + } else { + var eventId = Number(target); + if (eventId > 0) { + var key = [mapId, eventId, character]; + $gameSelfSwitches.setValue(key, value); + } + } + } + } + +})(); diff --git a/js/plugins/OverpassTile.js b/js/plugins/OverpassTile.js new file mode 100644 index 0000000..5c1e7b4 --- /dev/null +++ b/js/plugins/OverpassTile.js @@ -0,0 +1,121 @@ +//============================================================================= +// OverpassTile.js +//============================================================================= + +/*: + * @plugindesc Settings for bridges which characters can pass through. + * @author Yoji Ojima + * + * @param Overpass Region ID + * @desc The region ID for "overpass" such as bridges. + * @default 255 + * + * @param Gateway Region ID + * @desc The region ID for "gateway" such as bridge ends. + * @default 254 + * + * @help + * + * This plugin uses region ID to determine a floor level. + * In default, set 255 to bridge tiles and 254 to ends of them. + * + * Note: This plugin does not support the collision judgment modification + * between characters who are in different floors. + */ + +/*:ja + * @plugindesc キャラクターが下をくぐり抜けられる橋の設定です。 + * @author Yoji Ojima + * + * @param Overpass Region ID + * @desc 橋などの立体交差部分に設定するリージョンIDです。 + * @default 255 + * + * @param Gateway Region ID + * @desc 橋の両端など、立体交差の入り口部分に設定するリージョンIDです。 + * @default 254 + * + * @help + * + * このプラグインは、床の高さを決定するのにリージョンIDを使用します。 + * デフォルトでは橋の部分に255、その両端に254を設定してください。 + * + * 注意:このプラグインは、異なる階層にいるキャラクター間の衝突判定修正は + * サポートしていません。 + */ + +(function() { + + var parameters = PluginManager.parameters('OverpassTile'); + var overpassRegionId = Number(parameters['Overpass Region ID'] || 255); + var gatewayRegionId = Number(parameters['Gateway Region ID'] || 254); + + var _Tilemap_isOverpassPosition = Tilemap.prototype._isOverpassPosition; + Tilemap.prototype._isOverpassPosition = function(mx, my) { + var regionId = this._readMapData(mx, my, 5); + if (regionId === overpassRegionId) { + return true; + } else { + return _Tilemap_isOverpassPosition.call(this, mx, my); + } + }; + + var _Game_CharacterBase_screenZ = Game_CharacterBase.prototype.screenZ; + Game_CharacterBase.prototype.screenZ = function() { + if (this._higherLevel) { + return 5; + } else { + return _Game_CharacterBase_screenZ.call(this); + } + }; + + var _Game_CharacterBase_isMapPassable = + Game_CharacterBase.prototype.isMapPassable; + Game_CharacterBase.prototype.isMapPassable = function(x, y, d) { + if (_Game_CharacterBase_isMapPassable.call(this, x, y, d)) { + var x2 = $gameMap.roundXWithDirection(x, d); + var y2 = $gameMap.roundYWithDirection(y, d); + var d2 = this.reverseDir(d); + var regionId1 = $gameMap.regionId(x, y); + var regionId2 = $gameMap.regionId(x2, y2); + if (this._higherLevel && regionId1 !== gatewayRegionId) { + return (regionId2 === gatewayRegionId || + regionId2 === overpassRegionId); + } + if (!this._higherLevel && regionId1 === overpassRegionId) { + if (regionId2 === overpassRegionId) { + var bit1 = (1 << (d / 2 - 1)) & 0x0f; + var bit2 = (1 << (d2 / 2 - 1)) & 0x0f; + var flags = $gameMap.tilesetFlags(); + var tileId1 = $gameMap.tileId(x, y, 0); + var tileId2 = $gameMap.tileId(x, y, 1); + var tileId3 = $gameMap.tileId(x2, y2, 0); + var tileId4 = $gameMap.tileId(x2, y2, 1); + if ((flags[tileId1] | flags[tileId2]) & bit1) { + return false; + } + if ((flags[tileId3] | flags[tileId4]) & bit2) { + return false; + } + } + return regionId2 !== gatewayRegionId; + } + return true; + } else { + return false; + } + }; + + var _Game_CharacterBase_refreshBushDepth = + Game_CharacterBase.prototype.refreshBushDepth; + Game_CharacterBase.prototype.refreshBushDepth = function() { + _Game_CharacterBase_refreshBushDepth.call(this); + var regionId = this.regionId(); + if (regionId === gatewayRegionId) { + this._higherLevel = true; + } else if (regionId !== overpassRegionId) { + this._higherLevel = false; + } + }; + +})(); diff --git a/js/plugins/PictureWipe.js b/js/plugins/PictureWipe.js new file mode 100644 index 0000000..aa21404 --- /dev/null +++ b/js/plugins/PictureWipe.js @@ -0,0 +1,193 @@ +//============================================================================= +// PictureWipe.js +//============================================================================= + +/*: + * @plugindesc Transition effects for event pictures. + * @author Yoji Ojima + * + * @help + * + * Plugin Command: + * PictureWipe 1 down in 60 + * + * The above plugin command means that the "down" transition effect will be + * applied for displaying the picture #1, in 60 frames. + * + * The first argument specifies the picture ID. + * + * The second argument specifies the type of the effect. + * Can be selected from the following types: + * down - From the top to the bottom. + * up - From the bottom to the top. + * right - From the left to the right. + * left - From the right to the left. + * square - From the center to the edge with a square shape. + * circle - From the center to the edge with a circle shape. + * hblind - Horizontal blind effect. + * vblind - Vertical blind effect. + * grid - Grid effect. + * + * The third argument should be "in" to display or "out" to erase. + * + * The fourth argument specifies the transition time in frames. + */ + +/*:ja + * @plugindesc ピクチャの切り替えエフェクトです。 + * @author Yoji Ojima + * + * @help + * + * プラグインコマンド: + * PictureWipe 1 down in 60 + * + * 上記のプラグインコマンドは、ピクチャ1番を表示する際に「down」の切り替え + * エフェクトを60フレーム表示することを指定しています。 + * + * 1つ目の引数には、ピクチャIDを指定します。 + * + * 2つ目の引数には、エフェクトの種類を指定します。 + * 以下の種類が選択可能です: + * down - 上から下へ。 + * up - 下から上へ。 + * right - 左から右へ。 + * left - 右から左へ。 + * square - 正方形で中央から端へ。 + * circle - 円形で中央から端へ。 + * hblind - 水平ブラインド効果。 + * vblind - 垂直ブラインド効果。 + * grid - グリッド効果。 + * + * 3つ目の引数は、表示なら「in」、消去なら「out」とします。 + * + * 4つめの引数は、トランジション時間をフレーム数で指定します。 + */ + +(function() { + + var _Game_Interpreter_pluginCommand = + Game_Interpreter.prototype.pluginCommand; + Game_Interpreter.prototype.pluginCommand = function(command, args) { + _Game_Interpreter_pluginCommand.call(this, command, args); + if (command === 'PictureWipe') { + var pictureId = Number(args[0]); + var wipeType = String(args[1]) || 'down'; + var wipeDirection = String(args[2]) || 'in'; + var wipeMaxFrames = Number(args[3]) || 60; + var picture = $gameScreen.picture(pictureId); + if (picture) { + picture.wipeType = wipeType; + picture.wipeDirection = wipeDirection; + picture.wipeMaxFrames = wipeMaxFrames; + picture.wipeIndex = 0; + } + } + }; + + var _Game_Picture_update = Game_Picture.prototype.update; + Game_Picture.prototype.update = function() { + _Game_Picture_update.call(this); + this.updateWipe(); + }; + + Game_Picture.prototype.updateWipe = function() { + if (this.wipeIndex < this.wipeMaxFrames) { + this.wipeIndex++; + } + }; + + var _Sprite_Picture_update = Sprite_Picture.prototype.update; + Sprite_Picture.prototype.update = function() { + _Sprite_Picture_update.call(this); + if (this.picture() && this.visible) { + this.updateWipe(); + } + }; + + Sprite_Picture.prototype.updateWipe = function() { + var picture = this.picture(); + if (picture.wipeIndex < picture.wipeMaxFrames) { + var source = ImageManager.loadPicture(this._pictureName); + if (source.isReady()) { + if (!this.bitmap || this.bitmap === source) { + this.bitmap = new Bitmap(source.width, source.height); + } + var density = 0; + if (picture.wipeDirection === 'in') { + density = picture.wipeIndex / picture.wipeMaxFrames; + } else if (picture.wipeDirection === 'out') { + density = 1 - picture.wipeIndex / picture.wipeMaxFrames; + } + this.bitmap.clear(); + this.paintWipe(this.bitmap, picture.wipeType, density); + var context = this.bitmap.context; + context.save(); + context.globalCompositeOperation = 'source-in'; + context.drawImage(source.canvas, 0, 0); + context.restore(); + } + } else if (picture.wipeDirection === 'in') { + this.bitmap = ImageManager.loadPicture(this._pictureName); + } else if (picture.wipeDirection === 'out') { + this.bitmap.clear(); + } + }; + + Sprite_Picture.prototype.paintWipe = function(bitmap, type, density) { + var blindSize = 48; + var w = bitmap.width; + var h = bitmap.height; + var cx = w / 2; + var cy = h / 2; + var color = 'white'; + var size, i, j; + switch (type) { + case 'down': + size = h * density; + bitmap.fillRect(0, 0, w, size, color); + break; + case 'up': + size = h * density; + bitmap.fillRect(0, h - size, w, size, color); + break; + case 'right': + size = w * density; + bitmap.fillRect(0, 0, size, h, color); + break; + case 'left': + size = w * density; + bitmap.fillRect(w - size, 0, size, h, color); + break; + case 'square': + size = Math.max(w, h) / 2 * density; + bitmap.fillRect(cx - size, cy - size, size * 2, size * 2, color); + break; + case 'circle': + size = Math.sqrt(w * w + h * h) / 2 * density; + bitmap.drawCircle(cx, cy, size, color); + break; + case 'hblind': + size = blindSize * density; + for (i = 0; i < h; i += blindSize) { + bitmap.fillRect(0, i, w, size, color); + } + break; + case 'vblind': + size = blindSize * density; + for (i = 0; i < w; i += blindSize) { + bitmap.fillRect(i, 0, size, h, color); + } + break; + case 'grid': + size = blindSize * density; + for (i = 0; i < h; i += blindSize) { + for (j = 0; j < w; j += blindSize) { + bitmap.fillRect(j, i, size, size, color); + } + } + break; + } + }; + +})(); diff --git a/js/plugins/PlayMsgWndCharSE.js b/js/plugins/PlayMsgWndCharSE.js new file mode 100644 index 0000000..36a5b43 --- /dev/null +++ b/js/plugins/PlayMsgWndCharSE.js @@ -0,0 +1,218 @@ +//============================================================================= +// PlayMsgWndCharSE.js +//============================================================================= + +/*: + * @plugindesc Play SE for each character at message window + * @author Sasuke KANNAZUKI + * + * @param default SE + * @desc default sound ID on map. Be 0, 1 or 2. when 0, not play at default. + * @default 1 + * + * @param battle default SE + * @desc default sound ID on battle. Be 0, 1 or 2. when 0, not play at default. + * @default 0 + * + * @param interval + * @desc character number that skip without playing SE. (prefer to be 2) + * When it sets 0, play at each character. + * @default 2 + * + * @param name1 + * @desc filename of SE1 + * @default Cursor1 + * + * @param volume1 + * @desc volume of SE1 + * @default 90 + * + * @param pitch1 + * @desc pitch of SE1 + * @default 100 + * + * @param name2 + * @desc filename of SE2 + * @default Cursor2 + * + * @param volume2 + * @desc volume of SE2 + * @default 75 + * + * @param pitch2 + * @desc pitch of SE2 + * @default 125 + * + * @help This plugin does not provide plugin commands. + * + * At message window, SE can change by following notation: + * \SE[0] : stop char SE + * \SE[1] : play SE ID 1 at each character. + * \SE[2] : play SE ID 2 at each character. + * This setting is reset when map or scene changes. + * + * when \> is set in message window, + * force to play char SE once. + */ +/*:ja + * @plugindesc メッセージウィンドウで文字ごとにSEを演奏します。 + * @author 神無月サスケ + * + * @param default SE + * @desc マップでのデフォルトの音IDです。 + * 0,1,2のいずれかにしてください。0は無音です。 + * @default 1 + * + * @param battle default SE + * @desc バトルでのデフォルトの音IDです。 + * 0,1,2のいずれかにしてください。0は無音です。 + * @default 0 + * + * @param interval + * @desc 何文字スキップして音を鳴らすか(推奨値:2)。 + * 0の場合、全ての文字で音を鳴らします。 + * @default 2 + * + * @param name1 + * @desc SE1のファイル名 + * @default Cursor1 + * + * @param volume1 + * @desc SE1のボリューム + * @default 90 + * + * @param pitch1 + * @desc SE1のピッチ + * @default 100 + * + * @param name2 + * @desc SE2のファイル名 + * @default Cursor2 + * + * @param volume2 + * @desc SE2のボリューム + * @default 75 + * + * @param pitch2 + * @desc SE2のピッチ + * @default 125 + * + * @help このプラグインには、プラグインコマンドはありません。 + * + * メッセージウィンドウで以下の書式で書くことでSEを切り替えられます。 + * \SE[0] : SEを止めます。 + * \SE[1] : SE1を鳴らします。 + * \SE[2] : SE2を鳴らします。 + * この設定は、マップかシーンが切り替わるとデフォルトにリセットされます。 + * + * 文中で \> が設定された場合、intervalの値に関わらず、 + * 強制的に1回だけSEが演奏されます。 + */ + +(function() { + // + // process parameters + // + var parameters = PluginManager.parameters('PlayMsgWndCharSE'); + var defaultMode = Number(parameters['default SE'] || 1); + var battleDefaultMode = Number(parameters['battle default SE'] || 0); + var interval = Number(parameters['interval'] || 2); + var name1 = (parameters['name1'] || 'Cursor1'); + var volume1 = Number(parameters['volume1'] || 90); + var pitch1 = Number(parameters['pitch1'] || 100); + var name2 = (parameters['name2'] || 'Cursor2'); + var volume2 = Number(parameters['volume2'] || 75); + var pitch2 = Number(parameters['pitch2'] || 125); + + // + // initialize variables + // + var _Window_Message_initMembers = Window_Message.prototype.initMembers; + Window_Message.prototype.initMembers = function() { + _Window_Message_initMembers.call(this); + this.charSECount = 0; + this.charSEmode = defaultMode; + }; + + // + // set Battle Mode + // + var _Scene_Battle_createMessageWindow = + Scene_Battle.prototype.createMessageWindow; + Scene_Battle.prototype.createMessageWindow = function() { + _Scene_Battle_createMessageWindow.call(this); + this._messageWindow.charSEmode = battleDefaultMode; + }; + + // + // set the char SE mode + // + var _Window_Message_processEscapeCharacter = + Window_Message.prototype.processEscapeCharacter; + Window_Message.prototype.processEscapeCharacter = function(code, textState) { + switch (code) { + case 'SE': + this.charSEmode = this.obtainEscapeParam(textState); + break; + case '>': + // force to play char SE once. + this.charSECount = interval + 1; + // do not break, also do default process. + default: + _Window_Message_processEscapeCharacter.call(this, code, textState); + break; + } + }; + + // + // play char SE at message window + // + var _Window_Message_processNormalCharacter = + Window_Message.prototype.processNormalCharacter; + Window_Message.prototype.processNormalCharacter = function(textState) { + _Window_Message_processNormalCharacter.call(this, textState); + this.processCharSE(); + }; + + Window_Message.prototype.processCharSE = function(){ + if(this._showFast) { // triggered (= skipping message) + return; + } + if(!this._lineShowFast) { // unless '\>' mode + ++this.charSECount; + } + if(this.charSECount > interval) { + this.playCharSE(); + this.charSECount = 0; + } + }; + + Window_Message.prototype.playCharSE = function(){ + switch (this.charSEmode) { + case 0: + // not play sound + break; + case 1: + if(name1){ + var audio = {}; + audio.name = name1; + audio.pitch = pitch1; + audio.volume = volume1; + AudioManager.playSe(audio); + } + break; + case 2: + if(name2){ + var audio = {}; + audio.name = name2; + audio.pitch = pitch2; + audio.volume = volume2; + AudioManager.playSe(audio); + } + break; + default: + // not supported yet + break; + } + }; +})(); diff --git a/js/plugins/SAN_ShaderFilter.js b/js/plugins/SAN_ShaderFilter.js new file mode 100644 index 0000000..1d8f055 --- /dev/null +++ b/js/plugins/SAN_ShaderFilter.js @@ -0,0 +1,1038 @@ +//============================================================================= +// SAN_ShaderFilter.js +//============================================================================= +// Copyright (c) 2018 Sanshiro +// Released under the MIT license +// http://opensource.org/licenses/mit-license.php +//============================================================================= + +/*:ja + * @plugindesc シェーダーフィルター 1.0.0 + * シェーダーフィルターによる視覚エフェクト + * @author Sanshiro https://github.com/rev2nym + * @help + * ■概要 + * シェーダーフィルターによる視覚エフェクト機能を提供します。 + * これはGLSLで記述されたシェーダーコードを外部ファイルから読み込んで + * ゲーム画面に視覚エフェクトとして反映させるプラグインです。 + * + * なお、このプラグインは + * シェーダーフィルターシステムのコアプラグインとして機能します。 + * 実際に視覚エフェクトを表示するためには + * このプラグインに加えてサブプラグインが必要です。 + * + * ■GLSLシェーダーコード外部ファイル + * このプラグインはGLSLシェーダーコードが記述された外部ファイルを使用します。 + * GLSLシェーダーコードは「glslフォルダ」内に配置されます。 + * 「glslフォルダ」を削除したり変更したりしないよう注意してください。 + * + * ■基本的な仕組み + * 各スプライトはゲームオブジェクトを監視しています。 + * このプラグインではゲームオブジェクトのフィルターパラメーターマップに + * フィルターパラメーターオブジェクトが登録されると + * それを監視しているスプライトが自身にフィルターを生成して + * ゲーム画面表示に視覚エフェクトとして反映させます。 + * つまりゲームオブジェクトにフィルターパラメーターオブジェクトを登録すれば + * 視覚エフェクトを表示させることができます。 + * + * 以下、説明のため次のように呼び変えます。 + * フィルターパラメーターマップ → パラメーターマップ + * フィルターパラメーターオブジェクト → パラメーター + * + * ■基本的な使い方の手順 + * 次の手順で使用します。 + * 1.パラメーターの作成と登録 + * 2. エフェクトの操作 + * 3. パラメーターの削除 + * + * ■基本的な操作 + * ・パラメーターマップへの操作 + * ・パラメーターの作成と設定 + * ・パラメーターの取得 + * ・パラメーターの削除 + * ・エフェクトの操作 + * ・フィルターの種類による + * フェードイン・フェードアウトなどの操作のことです。 + * パラメーターの処理を呼び出すことで操作します。 + * 具体的には各サブプラグインのヘルプを参照してください。 + * + * ■パラメーターマップの操作 + * パラメーターマップはゲームオブジェクトがパラメーターを保持するための + * キーと値で構成されるデータ構造です。 + * パラメーターマップにパラメーターを登録すると + * スプライトが自身にフィルターを生成して画面に反映します。 + * + * ・パラメーターの作成と登録:set() + * ゲームオブジェクトのパラメーターマップに + * フィルターIDとパラメーターを設定することで + * フィルタに用いる各設定値を登録します。 + * 例: + * $gameScreen.glslFilterParamMap().set( + * 'filterId', // フィルターID + * new GLSLFilterParam() // フィルターパラメーター + * ); + * + * ・パラメーターの取得:get() + * ゲームオブジェクトのパラメーターマップから + * フィルターIDを指定してパラメーターを取得できます。 + * 例: + * $gameScreen.glslFilterParamMap().get( + * 'filterId' // フィルターID + * ); + * + * ・パラメーターの削除:delete() + * ゲームオブジェクトのパラメーターマップから + * フィルターIDを指定してパラメーターを削除します。 + * 例: + * $gameScreen.glslFilterParamMap().delete( + * 'filterId' // フィルターID + * ); + * + * ・パラメーターの存在確認:has() + * ゲームオブジェクトのパラメーターマップに + * 指定したフィルターIDのパラメーターが存在するか確認します。 + * 存在すれば true を返し、存在しなければ false を返します。 + * 例: + * $gameScreen.glslFilterParamMap().has( + * 'filterId' // フィルターID + * ); + * + * ■エフェクトの操作 + * パラメーターを操作することで + * エフェクトの表示状態を制御できます。 + * 具体的には各サブプラグインのヘルプを参照してください。 + * + * ■ゲームオブジェクトとスプライトの対応 + * フィルターパラメーターマップを持つゲームオブジェクトおよび + * 対応するスプライトは以下の通りです。 + * ・Game_Screen : Spriteset_Base + * ・Game_Character : Sprite_Character + * ・Game_Picture : Sprite_Picture + * ・Game_Battler : Sprite_Battler + * + * ■利用規約 + * MITライセンスのもと、商用利用、改変、再配布が可能です。 + * ただし冒頭のコメントは削除や改変をしないでください。 + * これを利用したことによるいかなる損害にも作者は責任を負いません。 + * サポートは期待しないでください><。 + */ + +/*: + * @plugindesc Shader filter 1.0.0 + * Visual effect by shader filter + * @author Sanshiro https://github.com/rev2nym + * @help + * - Overview + * This plugin provides visual effect functions with shader filter. + * This is a plugin that loads the shader code written in GLSL + * from an external file and reflects it as a visual effect on the game screen. + * + * Note that this plugin functions as the core plugin of + * the shader filter system. + * In addition to this plugin, sub plugins are necessary + * to display the visual effect. + * + * - External file of GLSL shader code + * This plugin uses external files in which GLSL code is described. + * The GLSL shader code is placed in the "glsl" folder. + * Do not to delete or change "glsl" folder. + * + * - Basic mechanism + * Each sprites watch each game objects. + * In this plugin, when a filter parameter object is registered + * in the filter parameter map of the game object, + * the sprite that watches it creates a filter for itself + * and reflects it as a visual effect on the game screen display. + * In other words, you can display a visual effect + * by registering a filter parameter object in the game object. + * + * For the sake of explanation, change it as follows. + * Filter parameter map → FPMap + * Filter parameter object → FPObject + * + * - Basic procedure + * It is used in the following procedure. + * 1. Create and register FPObject + * 2. Operate effect + * 3. Delete FPObject + * + * - Basic operations + * - Operation on FPMap + *      - Create and register FPObject + *      - Get FPObject + *      - Delete FPObject + * - Effect operation + *      - Depends on filter type + *        It is an operation such as fadein/fadeout. + *        Operate by calling FPObject processing. + *        Specifically, refer to the help of each sub plugin. + * + * - Operation on FPMap + * FPMap is a data structure composed of keys and values + * for game objects to hold FPObjects. + * When registering parameters in the parameter map, + * the sprite creates a filter for itself + * and reflects it on the screen. + * + * - Create and register FPObject: set() + * By registering the filterID and FPObject in the FPMap of the game object, + * register each value to be used for the filter. + * + * Example: + * $gameScreen.glslFilterParamMap().set( + * 'filterId', // Filter ID + * new GLSLFilterParam() // FPObject + * ); + * + * - Get FPObject: get() + * You can get the FPObject by specifying filterID + * from the FPMap of the game object. + * + * Example: + * $gameScreen.glslFilterParamMap().get( + *     'filterId' // Filter ID + * ); + * + * - Delete FPObject: delete() + * Delete the FPObject by specifying the filterID + * from the FPMap of the game object. + * + * Example: + * $gameScreen.glslFilterParamMap().delete( + *     'filterId' // Filter ID + * ); + * + * - Confirm existence of FPObject: has() + * In the parameter map of the game object + * Check whether the FPObject of the filter ID specified + * in the FPMap of the game object exists. + * If it exists returns true, otherwise returns false. + * + * Example: + * $gameScreen.glslFilterParamMap().has( + *     'filterId' // Filter ID + * ); + * + * - Effect operation + * You can control the effect display state by operating the parameters. + * Specifically refer to the help of each sub plugin. + * + * - Correspondence between game objects and sprites + * Game objects with FPMap and their corresponding sprites are as follows. + * - Game Screen: Spriteset_Base + * - Game_Character: Sprite_Character + * - Game_Picture: Sprite_Picture + * - Game_Battler: Sprite_Battler + * + * - Terms of use + * Under the MIT license, + * commercial use, modification, redistribution is possible. + * However, please do not delete or modify the comment at the beginning. + * The author is not responsible for any damage caused by using this. + * And please do not expect support. X( + */ + +var Imported = Imported || {}; +Imported.SAN_ShaderFilter = true; + +var Sanshiro = Sanshiro || {}; +Sanshiro.ShaderFilter = Sanshiro.ShaderFilter || {}; +Sanshiro.ShaderFilter.version = '1.0.0'; + +(function() { +'use strict'; + +//----------------------------------------------------------------------------- +// SpritePresenter +// +// スプライトプレゼンター + +window.SpritePresenter = function SpritePresenter() { + throw new Error('This is a static class'); +}; + +// シーン +SpritePresenter.scene = function() { + return SceneManager._scene; +}; + +// マップシーン判定 +SpritePresenter.isScene = function(sceneClass) { + return this.scene() instanceof sceneClass; +}; + +// スプライトセット +SpritePresenter.spriteset = function() { + return SceneManager._scene._spriteset; +}; + +// スプライトセットベーススプライト +SpritePresenter.spritesetBase = function() { + return SceneManager._scene._spriteset._baseSprite; +}; + +// プレイヤー +SpritePresenter.player = function() { + if (!this.isScene(Scene_Map)) { + return undefined; + } + return SceneManager._scene._spriteset._characterSprites.find( + function(sprite) { + return sprite._character instanceof Game_Player; + } + ); +}; + +// イベント +SpritePresenter.event = function(eventId) { + if (!this.isScene(Scene_Map)) { + return undefined; + } + return SceneManager._scene._spriteset._characterSprites.find( + function(sprite) { + return ( + sprite._character instanceof Game_Event && + sprite._character.eventId() === eventId + ); + } + ); +}; + +// フォロワー +SpritePresenter.follower = function(memberIndex) { + if (!this.isScene(Scene_Map)) { + return undefined; + } + return SceneManager._scene._spriteset._characterSprites.find( + function(sprite) { + return ( + sprite._character instanceof Game_Follower && + sprite._character._memberIndex === memberIndex + ); + } + ); +}; + +// ピクチャ +SpritePresenter.picture = function(pictureId) { + return SceneManager._scene._spriteset._pictureContainer.children.find( + function(sprite) { + return sprite._pictureId === pictureId; + } + ); +}; + +// タイルマップ +SpritePresenter.tilemap = function() { + return SceneManager._scene._spriteset._tilemap; +}; + +// 遠景 +SpritePresenter.parallax = function() { + return SceneManager._scene._spriteset._parallax; +}; + +//----------------------------------------------------------------------------- +// Game_Screen +// +// スクリーン + +// オブジェクト初期化 +var _Game_Screen_initialize = + Game_Screen.prototype.initialize; +Game_Screen.prototype.initialize = function() { + _Game_Screen_initialize.apply(this, arguments); + this.initGLSLFilterParamMap(); +}; + +// GLSLフィルターパラメーターマップの初期化 +Game_Screen.prototype.initGLSLFilterParamMap = function() { + this._glslFilterParamMap = new GLSLFilterParamMap(); +}; + +// GLSLフィルターパラメーターマップ +Game_Screen.prototype.glslFilterParamMap = function() { + return this._glslFilterParamMap; +}; + +// フレーム更新 +var _Game_Screen_update = + Game_Screen.prototype.update; +Game_Screen.prototype.update = function() { + _Game_Screen_update.apply(this, arguments); + this.updateGlslFilterParamMap(); +}; + +// GLSLフィルターパラメーターマップのフレーム更新 +Game_Screen.prototype.updateGlslFilterParamMap = function() { + this._glslFilterParamMap.update(); +}; + +//----------------------------------------------------------------------------- +// Game_Character +// +// キャラクター + +// オブジェクト初期化 +var _Game_Character_initialize = + Game_Character.prototype.initialize; +Game_Character.prototype.initialize = function() { + _Game_Character_initialize.apply(this, arguments); + this.initGLSLFilterParamMap(); +}; + +// GLSLフィルターパラメーターマップの初期化 +Game_Character.prototype.initGLSLFilterParamMap = function() { + this._glslFilterParamMap = new GLSLFilterParamMap(); +}; + +// GLSLフィルターパラメーターマップ +Game_Character.prototype.glslFilterParamMap = function() { + return this._glslFilterParamMap; +}; + +// フレーム更新 +var _Game_Character_update = + Game_Character.prototype.update; +Game_Character.prototype.update = function() { + _Game_Character_update.apply(this, arguments); + this.updateGlslFilterParamMap(); +}; + +// GLSLフィルターパラメーターマップのフレーム更新 +Game_Character.prototype.updateGlslFilterParamMap = function() { + this._glslFilterParamMap.update(); +}; + +//----------------------------------------------------------------------------- +// Game_Picture +// +// ピクチャ + +// オブジェクト初期化 +var _Game_Picture_initialize = + Game_Picture.prototype.initialize; +Game_Picture.prototype.initialize = function() { + _Game_Picture_initialize.apply(this, arguments); + this.initGLSLFilterParamMap(); +}; + +// GLSLフィルターパラメーターマップの初期化 +Game_Picture.prototype.initGLSLFilterParamMap = function() { + this._glslFilterParamMap = new GLSLFilterParamMap(); +}; + +// GLSLフィルターパラメーターマップ +Game_Picture.prototype.glslFilterParamMap = function() { + return this._glslFilterParamMap; +}; + +// フレーム更新 +var _Game_Picture_update = + Game_Picture.prototype.update; +Game_Picture.prototype.update = function() { + _Game_Picture_update.apply(this, arguments); + this.updateGlslFilterParamMap(); +}; + +// GLSLフィルターパラメーターマップのフレーム更新 +Game_Picture.prototype.updateGlslFilterParamMap = function() { + this._glslFilterParamMap.update(); +}; + +//----------------------------------------------------------------------------- +// Game_Battler +// +// バトラー + +// オブジェクト初期化 +var _Game_Battler_initialize = + Game_Battler.prototype.initialize; +Game_Battler.prototype.initialize = function() { + _Game_Battler_initialize.apply(this, arguments); + this.initGLSLFilterParamMap(); +}; + +// GLSLフィルターパラメーターマップの初期化 +Game_Battler.prototype.initGLSLFilterParamMap = function() { + this._glslFilterParamMap = new GLSLFilterParamMap(); +}; + +// GLSLフィルターパラメーターマップ +Game_Battler.prototype.glslFilterParamMap = function() { + return this._glslFilterParamMap; +}; + +// フレーム更新 +var _Game_Battler_update = + Game_Battler.prototype.update; +Game_Battler.prototype.update = function() { + _Game_Battler_update.apply(this, arguments); + this.updateGlslFilterParamMap(); +}; + +// GLSLフィルターパラメーターマップのフレーム更新 +Game_Battler.prototype.updateGlslFilterParamMap = function() { + this._glslFilterParamMap.update(); +}; + +//----------------------------------------------------------------------------- +// Sprite +// +// スプライト + +// ダミーフィルター +// filters の最終の要素のフィルターの座標が上下反転する挙動を回避するためのダミー +Sprite._dummyFilter = null; + +// ダミーフィルター +Sprite.prototype.dummyFilter = function() { + if (!Sprite._dummyFilter) { + Sprite._dummyFilter = new PIXI.Filter(); + } + return Sprite._dummyFilter; +}; + +// オブジェクト初期化 +var _Sprite_initialize = + Sprite.prototype.initialize; +Sprite.prototype.initialize = function() { + _Sprite_initialize.apply(this, arguments); + this._glslFiltersLoading = []; +}; + +// フレーム更新 +var _Sprite_update = + Sprite.prototype.update; +Sprite.prototype.update = function() { + _Sprite_update.call(this); + this.updateGLSLFilters(); +}; + +// GLSLフィルターのフレーム更新 +Sprite.prototype.updateGLSLFilters = function() { + this.refreshGLSLFilters(); + this.glslFilters().forEach( + function(filter) { + filter.update(); + } + ); +}; + +// GLSLフィルターリストのリフレッシュ +Sprite.prototype.refreshGLSLFilters = function() { + if (!this.glslFilterParamMap()) { + return; + } + this.cleanGLSLFilters(); + this.assortGLSLFilters(); +}; + +// 不要なフィルターの除去 +Sprite.prototype.cleanGLSLFilters = function() { + if (!this.filters) { + return; + } + var filterParamMapParams = this.glslFilterParamMap().values(); + this.filters = this.filters.filter( + function(filter) { + return ( + !this.isGLSLFilter(filter) ? true : + filterParamMapParams.indexOf(filter.param()) !== -1 ? true : + false + ); + }, this + ); +}; + +// 必要なフィルターの追加 +Sprite.prototype.assortGLSLFilters = function() { + var filterParams = this.glslFilterParams(); + var filterParamMapParams = this.glslFilterParamMap().values(); + filterParamMapParams.forEach( + function(filterMapParam) { + if (filterParams.indexOf(filterMapParam) !== -1) { + return; + } + var filterClass = filterMapParam.filterClass(); + var filter = new filterClass(this, filterMapParam); + filter.addLoadHandler(this.onFilterLoaded.bind(this, filter)); + filter.load(); + this._glslFiltersLoading.push(filter); + }, this + ); +}; + +// GLSLフィルターロードハンドラー +Sprite.prototype.onFilterLoaded = function(filter) { + this.filters = !!this.filters ? this.filters : []; + this.filters = this.filters.filter( + function(filter) { + return filter !== this.dummyFilter(); + }, this + ); + this.filters = this.filters.concat([filter, this.dummyFilter()]); + this._glslFiltersLoading = this._glslFiltersLoading.filter( + function(filterLoading) { + return filterLoading !== filter; + } + ); +}; + +// GLSLフィルター判定 +Sprite.prototype.isGLSLFilter = function(filter) { + return filter instanceof GLSLFilter; +}; + +// GLSLフィルターパラメーターリスト +Sprite.prototype.glslFilterParams = function() { + var params = []; + params = params.concat( + this.glslFilters().map( + function(filter) { + return filter.param(); + } + ) + ); + params = params.concat( + this._glslFiltersLoading.map( + function(filter) { + return filter.param(); + } + ) + ); + return params; +}; + +// GLSLフィルターリスト +Sprite.prototype.glslFilters = function() { + return (!!this.filters ? + this.filters.filter( + function(filter) { + return this.isGLSLFilter(filter); + }, this + ) : + [] + ); +}; + +// GLSLフィルターパラメーターマップ +Sprite.prototype.glslFilterParamMap = function() { + return null; +}; + +//----------------------------------------------------------------------------- +// Spriteset_Base +// +// ベーススプライトセット + +// GLSLフィルターパラメーターマップ +Spriteset_Base.prototype.glslFilterParamMap = function() { + return $gameScreen.glslFilterParamMap(); +}; + +//----------------------------------------------------------------------------- +// Sprite_Character +// +// キャラクタースプライト + +// GLSLフィルターパラメーターマップ +Sprite_Character.prototype.glslFilterParamMap = function() { + return this._character.glslFilterParamMap(); +}; + +//----------------------------------------------------------------------------- +// Sprite_Picture +// +// ピクチャスプライト + +// GLSLフィルターパラメーターマップ +Sprite_Picture.prototype.glslFilterParamMap = function() { + var picture = this.picture(); + return (!!picture ? + this.picture().glslFilterParamMap() : + undefined + ); +}; + +//----------------------------------------------------------------------------- +// Sprite_Battler +// +// バトラースプライト + +// GLSLフィルターパラメーターマップ +Sprite_Battler.prototype.glslFilterParamMap = function() { + return (!!this._battler ? + this._battler.glslFilterParamMap() : + null + ); +}; + +// GLSLフィルターのフレーム更新 +Sprite_Battler.prototype.updateGLSLFilters = function() { + if (!this._battler) { + this.filters = []; + return; + } + Sprite.prototype.updateGLSLFilters.apply(this, arguments); +}; + +//----------------------------------------------------------------------------- +// GLSLFilter +// +// GLSLフィルター + +window.GLSLFilter = function GLSLFilter() { + this.initialize.apply(this, arguments); +}; + +GLSLFilter.prototype = + Object.create(PIXI.Filter.prototype); +GLSLFilter.prototype.constructor = + GLSLFilter; + +// オブジェクト初期化 +GLSLFilter.prototype.initialize = function(sprite, param) { + this._sprite = sprite; + this._param = param; + this._loadHandlers = []; + this._ready = false; + this.initMembers(); + this.initVertSrcLoader(); + this.initFragSrcLoader(); +}; + +// バーテックスシェーダーファイル名 +GLSLFilter.prototype.vertName = function() { + return ''; +}; + +// バーテックスシェーダー拡張子 +GLSLFilter.prototype.vertExt = function() { + return '.txt'; +}; + +// フラグメントシェーダーファイル名 +GLSLFilter.prototype.fragName = function() { + return ''; +}; + +// フラグメントシェーダー拡張子 +GLSLFilter.prototype.fragExt = function() { + return '.txt'; +}; + +// シェーダーディレクトリ名 +GLSLFilter.prototype.dirName = function() { + return 'glsl/'; +}; + +// バーテックスローダーの初期化 +GLSLFilter.prototype.initVertSrcLoader = function() { + this._vertUrl = this.generateURL(this.vertName(), this.vertExt()); + this._vertSrcLoader = new GLSLSourceLoader(this._vertUrl); + this._vertSrcLoader.addLoadHandler(this.onVertLoaded.bind(this)); +}; + +// フラグメントローダーの初期化 +GLSLFilter.prototype.initFragSrcLoader = function() { + this._fragUrl = this.generateURL(this.fragName(), this.fragExt()); + this._fragSrcLoader = new GLSLSourceLoader(this._fragUrl); + this._fragSrcLoader.addLoadHandler(this.onFragLoaded.bind(this)); +}; + +// URL生成 +GLSLFilter.prototype.generateURL = function(name, ext) { + return (!!name ? + this.dirName() + name + ext : + null + ); +}; + +// バーテックスロードハンドラ +GLSLFilter.prototype.onVertLoaded = function() { + if (this._fragSrcLoader.isReady()) { + this.onLoad(); + } +}; + +// フラグメントロードハンドラ +GLSLFilter.prototype.onFragLoaded = function() { + if (this._vertSrcLoader.isReady()) { + this.onLoad(); + } +}; + +// ロードハンドラ +GLSLFilter.prototype.onLoad = function() { + this.setupFilter(); + this._loadHandlers.forEach( + function(handler) { + handler(); + } + ); + this._ready = true; +}; + +// ロード +GLSLFilter.prototype.load = function() { + this._vertSrcLoader.load(); + this._fragSrcLoader.load(); +}; + +// メンバ変数の初期化 +GLSLFilter.prototype.initMembers = function() { +}; + +// ロードハンドラーの追加 +GLSLFilter.prototype.addLoadHandler = function(handler) { + this._loadHandlers.push(handler); +}; + +// PIXIフィルターのセットアップ +GLSLFilter.prototype.setupFilter = function() { + PIXI.Filter.call( + this, + this.vertexSource(), + this.fragmentSource(), + this.defaultUniforms() + ); +}; + +// バーテックスソース +GLSLFilter.prototype.vertexSource = function() { + return this._vertSrcLoader.source(); +}; + +// フラグメントソース +GLSLFilter.prototype.fragmentSource = function() { + return this._fragSrcLoader.source(); +}; + +// ユニフォーム初期値 +GLSLFilter.prototype.defaultUniforms = function() { + var uniforms = {}; + return uniforms; +}; + +// パラメーター +GLSLFilter.prototype.param = function() { + return this._param; +}; + +// レディ判定 +GLSLFilter.prototype.isReady = function() { + return this._ready; +}; + +// フレーム更新 +GLSLFilter.prototype.update = function() { + this.updateUniforms(); +}; + +// ユニフォームのフレーム更新 +GLSLFilter.prototype.updateUniforms = function() { +}; + +// スプライト幅 +GLSLFilter.prototype.spriteWidth = function() { + return this._sprite.width || Graphics.width; +}; + +// スプライト高さ +GLSLFilter.prototype.spriteHeight = function() { + return this._sprite.height || Graphics.height; +}; + +// スプライトX座標 +GLSLFilter.prototype.spriteX = function() { + return (!!this._sprite.anchor ? + this._sprite.x - this._sprite.width * this._sprite.anchor.x : + this._sprite.x + ); +}; + +// スプライトY座標 +GLSLFilter.prototype.spriteY = function() { + return (!!this._sprite.anchor ? + this._sprite.y - this._sprite.width * this._sprite.anchor.y : + this._sprite.y + ); +}; + +//----------------------------------------------------------------------------- +// GLSLSourceLoader +// +// GLSLソースローダー + +window.GLSLSourceLoader = function GLSLSourceLoader() { + this.initialize.apply(this, arguments); +}; + +// オブジェクト初期化 +GLSLSourceLoader.prototype.initialize = function(url) { + this._url = url; + this._source = null; + this._loadHandlers = []; + this._errorHandlers = []; + this._ready = false; +}; + +// ロード +GLSLSourceLoader.prototype.load = function() { + if (!this._url) { + this._ready = true; + return; + } + var xhr = new XMLHttpRequest(); + xhr.open('GET', this._url); + xhr.overrideMimeType('text'); + xhr.onload = this.onLoad.bind(this, xhr); + xhr.onerror = this.onError.bind(this, xhr); + xhr.send(); +}; + +// ロードハンドラー +GLSLSourceLoader.prototype.onLoad = function(xhr) { + this._source = xhr.responseText; + this._loadHandlers.forEach( + function(loadHander) { + loadHander(); + } + ); + this._ready = true; +}; + +// レディ判定 +GLSLSourceLoader.prototype.isReady = function() { + return this._ready; +}; + +// ロードハンドラーの追加 +GLSLSourceLoader.prototype.addLoadHandler = function(handler) { + this._loadHandlers.push(handler); +}; + +// エラーハンドラー +GLSLSourceLoader.prototype.onError = function(xhr) { + this._errorHandlers.forEach( + function(errorHander) { + errorHander(xhr); + } + ); + throw new Error('Failed to load: ' + xhr.responseURL); +}; + +// エラーハンドラーの追加 +GLSLSourceLoader.prototype.addErrorHandler = function(handler) { + this._errorHandlers.push(handler); +}; + +// ソースコード +GLSLSourceLoader.prototype.source = function() { + return this._source; +}; + +//----------------------------------------------------------------------------- +// GLSLFilterParamMap +// +// GLSLフィルターパラメーターマップ + +window.GLSLFilterParamMap = function GLSLFilterParamMap() { + this.initialize.apply(this, arguments); +}; + +// オブジェクト初期化 +GLSLFilterParamMap.prototype.initialize = function() { + this._map = {}; +}; + +// クリア +GLSLFilterParamMap.prototype.clear = function() { + this._map = {}; +}; + +// 削除 +GLSLFilterParamMap.prototype.delete = function(key) { + delete this._map[key]; +}; + +// 追加 +GLSLFilterParamMap.prototype.set = function(key, value) { + this._map[key] = value; +}; + +// 取得 +GLSLFilterParamMap.prototype.get = function(key) { + return this._map[key]; +}; + +// 存在判定 +GLSLFilterParamMap.prototype.has = function(key) { + return !!this._map[key]; +}; + +// キーリスト +GLSLFilterParamMap.prototype.keys = function() { + return Object.keys(this._map); +}; + +// パラメータリスト +GLSLFilterParamMap.prototype.values = function() { + return Object.values(this._map); +}; + +// キー +GLSLFilterParamMap.prototype.key = function(value) { + var entries = Object.entries(this._map); + var entry = entries.find( + function(entry) { + return entry[1] === value; + } + ); + return !!entry ? entry[0] : undefined; +}; + +// 除去 +GLSLFilterParamMap.prototype.remove = function(value) { + var key = this.key(value); + this.delete(key); +}; + +// フレーム更新 +GLSLFilterParamMap.prototype.update = function() { + this.values().forEach( + function(value) { + value.update(); + } + ); +}; + +//----------------------------------------------------------------------------- +// GLSLFilterParam +// +// GLSLフィルターパラメーター + +window.GLSLFilterParam = function GLSLFilterParam() { + this.initialize.apply(this, arguments); +}; + +// オブジェクト初期化 +GLSLFilterParam.prototype.initialize = function(param) { + this.initMembers(param || {}); +}; + +// メンバー変数の初期化 +GLSLFilterParam.prototype.initMembers = function(param) { +}; + +// フィルタークラス +GLSLFilterParam.prototype.filterClass = function() { + return GLSLFilter; +}; + +// フレーム更新 +GLSLFilterParam.prototype.update = function() { +}; + +})(); diff --git a/js/plugins/SAN_ShaderFilterCharaHeatHaze.js b/js/plugins/SAN_ShaderFilterCharaHeatHaze.js new file mode 100644 index 0000000..0812ba0 --- /dev/null +++ b/js/plugins/SAN_ShaderFilterCharaHeatHaze.js @@ -0,0 +1,676 @@ +//============================================================================= +// SAN_ShaderFilterCharaHeatHaze.js +//============================================================================= +// Copyright (c) 2018 Sanshiro +// Released under the MIT license +// http://opensource.org/licenses/mit-license.php +//============================================================================= + +/*:ja + * @plugindesc キャラクター陽炎エフェクトフィルター 1.0.0 + * キャラクターの周囲に陽炎のエフェクトを表示するフィルターです。 + * @author Sanshiro https://github.com/rev2nym + * @help + * ■概要 + * キャラクターの周囲に陽炎のエフェクトを表示するフィルターです。 + * このプラグインはシェーダーフィルターシステムのサブプラグインです。 + * + * ■前提のコアプラグイン + * このプラグインは前提のコアプラグインとして + * 併せて配布される「SAN_ShaderFilter.js」を使用します。 + * あらかじめ導入してください。 + * + * ■シェーダーコードファイル + * このプラグインはシェーダーコードファイルとして + * 「SAN_CharaHeatHazeFrag.txt」を使用します。 + * 「glsl」フォルダにあらかじめ配置してください。 + * + * ■基本的な仕組み + * 基本的な仕組みはコアプラグインのヘルプを参照してください。 + * + * ■パラメータの作成 + * 次のスクリプトコマンドでパラメーターを作成します。 + * 例: + * new GLSLCharaHeatHazeFilterParam({ + * speed: 1.0, // エフェクトスピード + * fadeFrame: 60, // フェードフレームカウント + * fadeState: 'fadedOut', // フェード状態 + * charaType: 'player', // キャラクタータイプ + * charaId: 1, // キャラクターID + * pitch: 1.0, // エフェクトピッチ + * innerRadius: 24.0, // エフェクト内径 + * outerRadius: 72.0, // エフェクト外径 + * strength: 1.0, // エフェクト強度 + * color: {r: 2.0, g: 1.0, b: 1.0} // エフェクト色 + * }); + * + * それぞれの項目は順不同かつ省略可能です。 + * また設定値ごと省略することもできます。 + * 例: + * new GLSLCharaHeatHazeFilterParam(); + * + * ・エフェクトスピード:speed + * エフェクトのスピードです。 + * 数値が0.0に近づくほど遅くなります。 + * マイナスの値も設定できます。 + * 省略可能です。省略した場合は 1.0 が設定されます。 + * + * ・フェードフレームカウント:fadeFrame + * フェードイン、フェードアウトに要するフレーム数です。 + * 省略可能です。省略した場合は 60 が設定されます。 + * + * ・フェード状態:fadeState + * フェードの状態を表します。 + * 'fadingIn'(フェードイン中)、'fadedIn'(フェードイン完了)、 + * 'fadingOut'(フェードアウト中)、'fadedOut'(フェードアウト完了)の + * 4つの状態を取り得ます。 + * 'fadingIn' を設定した場合は即座にフェードインを開始します。 + * 省略可能です。省略した場合は 'fadedOut' が設定されます。 + * + * ・キャラクタータイプ:charaType + * エフェクトの中心となるキャラクターのタイプを指定します。 + * 'player'(プレイヤー)、'follower'(フォロワー)、'event'(イベント)の + * 3つのタイプから指定することが可能です。 + * 省略可能です。省略した場合は 'player' が設定されます。 + * + * ・キャラクターID:charaId + * エフェクトの中心となるキャラクターのIDを指定します。 + * キャラクタータイプで 'follower' を指定した場合は + * フォロワーインデックス(パーティの2人目のIDが1)が + * 'event' を指定した場合はイベントIDが対応します。 + * 省略可能です。省略した場合は 1 が設定されます。 + * + * ・エフェクトピッチ:pitch + * エフェクトのピッチを指定します。 + * この数値が大きくなるほどエフェクトの紋様が細かくなります。 + * 省略可能です。省略した場合は 1.0 が設定されます。 + * + * ・エフェクト内径:innerRadius + * エフェクトの内径をピクセル単位で設定します。 + * この数値より小さい範囲はドーナツの穴のようにエフェクトが表示されません。 + * 省略可能です。省略した場合は 24.0 が設定されます。 + * + * ・エフェクト外径:outerRadius + * エフェクトの外径をピクセル単位で設定します。 + * この数値より大きい範囲はエフェクトが表示されません。 + * 省略可能です。省略した場合は 72.0 が設定されます。 + * + * ・エフェクト強度:strength + * エフェクトの強度を設定します。 + * この数値が大きくなるほどエフェクトによる画面の歪みが強くなります。 + * 省略可能です。省略した場合は 1.0 が設定されます。 + * + * ・エフェクト色:color + * エフェクトの色をRGBで設定します。 + * 省略可能です。省略した場合は {r: 2.0, g: 1.0, b: 1.0} が設定されます。 + * + * ■パラメーターの登録 + * 次のスクリプトコマンドでパラメーターマップへパラメーターを登録します。 + * 例: + * $gameScreen.glslFilterParamMap().set( + * 'playerHeatHaze', // フィルターID + * new GLSLCharaHeatHazeFilterParam() // フィルターパラメーター + * ); + * + * その他のパラメーターマップの操作はコアプラグインのヘルプを参照してください。 + * + * ■パラメーターの操作 + * ・エフェクトのフェードイン:fadeIn() + * 例: + * $gameScreen.glslFilterParamMap().get( + * 'playerHeatHaze' // フィルターID + * ).fadeIn(); + * + * ・エフェクトのフェードアウト:fadeOut() + * 例: + * $gameScreen.glslFilterParamMap().get( + * 'playerHeatHaze' // フィルターID + * ).fadeOut(); + * + * ・エフェクトの即時表示:show() + * 例: + * $gameScreen.glslFilterParamMap().get( + * 'playerHeatHaze' // フィルターID + * ).show(); + * + * ・エフェクトの即時非表示:hide() + * 例: + * $gameScreen.glslFilterParamMap().get( + * 'playerHeatHaze' // フィルターID + * ).hide(); + * + * ■利用規約 + * MITライセンスのもと、商用利用、改変、再配布が可能です。 + * ただし冒頭のコメントは削除や改変をしないでください。 + * これを利用したことによるいかなる損害にも作者は責任を負いません。 + * サポートは期待しないでください><。 + */ + +/*: + * @plugindesc Character heat haze effect filter 1.0.0 + * Effect filter which displays the effect of the heat haze around the character. + * @author Sanshiro https://github.com/rev2nym + * @help + * - Overview + * This pulugin provides an effect filter that displays + * the effect of heat haze around the character. + * This plugin is a sub plugin of the shader filter system. + * + * - Prerequisite core plugin + * This plugin uses "SAN_ShaderFilter.js" distributed together + * as a prerequisite core plugin. + * install in advance it. + * + * - Shader code file + * This plugin uses "SAN_CharaHeatHazeFrag.txt" as a shader code file. + * Put it in the "glsl" folder beforehand. + * + * - Basic mechanism + * Refer to the core plugin help for the basic mechanism. + * + * - Create FPObject (Filter Parameter Object) + * Create the FPObject with the following script command. + * + * Example: + * new GLSLCharaHeatHazeFilterParam({ + *     speed: 1.0, // Effect speed + *     fadeFrame: 60, // Fade frame count + *     fadeState: 'fadedOut', // Fade state + *     charaType: 'player', // Character type + *     charaId: 1, // CharacterID + *     pitch: 1.0, // Effect pitch + *     innerRadius: 24.0, // Effect inner radius + *     outerRadius: 72.0, // Effect outer radius + *     strength: 1.0, // Effect strength + *     color: {r: 2.0, g: 1.0, b: 1.0} // Effect color + * }); + * + * Each item is out of order and can be omitted. + * And all items can also be omitted. + * + * Example: + * new GLSLCharaHeatHazeFilterParam(); + * + * - Effect speed: speed + * This is the speed of the effect. + * The closer the number is to 0.0, the slower it will be. + * You can also set a negative value. + * This is optional. If omitted, 1.0 is set. + * + * - Fade frame count: fadeFrame + * The count of frames required for fadein and fadeout. + * This is optional. If omitted, 60 is set. + * + * - Fade state: fadeState + * Represents the state of the fade. + * This can take four states + * 'fadingIn' (in fadingin), 'fadedIn' (fadein completed), + * 'fadingOut' (in fadingout), 'fadedOut' (fadeout completed) + * If 'fadingIn' is set, fadein starts immediately. + * This is optional. If omitted, 'fadedOut' is set. + * + * - Character type: charaType + * This specifies the type of character that is the center of the effect. + * This is possible to specify from three types of + * 'player', 'follower', 'event'. + * This is optional. If omitted, 'player' is set. + * + * - Character ID: charaId + * This specifies the ID of the character that is the center of the effect. + * If 'follower' is specified for the character type, + * the follower index corresponds (the ID of the 2nd actor in the party is 1), + * if 'event' is specified, the event ID corresponds. + * This is optional. If omitted, 1 is set. + * + * - Effect pitch: pitch + * This specifies the pitch of the effect. + * The greater the number, the finer the pattern of the effect. + * This is optional. If omitted, 1.0 is set. + * + * - Effect inner radius: innerRadius + * This sets the inner radius of the effect in pixels. + * If the range is smaller than this number, + * effects will not be displayed like donut holes. + * This is optional. If omitted, 24.0 is set. + * + * · Effect outer radius: outerRadius + * This sets the outer radius of the effect in pixels. + * Effects are not displayed in the range larger than this number. + * This is optional. If omitted, 72.0 is set. + * + * - Effect strength: strength + * This sets the strength of the effect. + * The higher the value, the stronger the screen distortion due to the effect. + * This is optional. If omitted, 1.0 is set. + * + * - Effect color: color + * This sets the effect color with RGB. + * This is optional. If omitted, {r: 2.0, g: 1.0, b: 1.0} is set. + * + * - Register FPObject (Filter Parameter Object) + * Register the FPObject in the FPMap with the following script command. + * + * Example: + * $gameScreen.glslFilterParamMap().set( + *     'playerHeatHaze', // Filter ID + *     new GLSLCharaHeatHazeFilterParam() // FPObject + * ); + * + * For other FPMap operation, see the core plugin help. + * + * - Effect operation commands + * + * - Fadein effect: fadeIn() + * Example: + * $gameScreen.glslFilterParamMap().get( + *     'playerHeatHaze' // Filter ID + * ).fadeIn(); + * + * - Fadeout effect: fadeOut() + * Example: + * $gameScreen.glslFilterParamMap().get( + *     'playerHeatHaze' // Filter ID + * ).fadeOut(); + * + * - Immediate display of effects: show() + * Example: + * $gameScreen.glslFilterParamMap().get( + *     'playerHeatHaze' // Filter ID + * ).show(); + * + * - Immediate hide of effects: hide() + * Example: + * $gameScreen.glslFilterParamMap().get( + *     'playerHeatHaze' // Filter ID + * ).hide(); + * + * - Terms of use + * Under the MIT license, + * commercial use, modification, redistribution is possible. + * However, please do not delete or modify the comment at the beginning. + * The author is not responsible for any damage caused by using this. + * And please do not expect support. X( + */ + +var Imported = Imported || {}; +Imported.SAN_ShaderFilterCharaHeatHaze = true; + +var Sanshiro = Sanshiro || {}; +Sanshiro.ShaderFilterCharaHeatHaze = Sanshiro.ShaderFilterCharaHeatHaze || {}; +Sanshiro.ShaderFilterCharaHeatHaze.version = '1.0.0'; + +(function() { +'use strict'; + +//----------------------------------------------------------------------------- +// GLSLCharaHeatHazeFilter +// +// GLSLキャラクター陽炎フィルター + +window.GLSLCharaHeatHazeFilter = + function GLSLCharaHeatHazeFilter() +{ + this.initialize.apply(this, arguments); +}; + +GLSLCharaHeatHazeFilter.prototype = + Object.create(GLSLFilter.prototype); +GLSLCharaHeatHazeFilter.prototype.constructor = + GLSLCharaHeatHazeFilter; + +// バーテックスシェーダーファイル名 +GLSLCharaHeatHazeFilter.prototype.vertName = function() { + return ''; +}; + +// フラグメントシェーダーファイル名 +GLSLCharaHeatHazeFilter.prototype.fragName = function() { + return 'SAN_CharaHeatHazeFrag'; +}; + +// キャラクタースプライト +GLSLCharaHeatHazeFilter.prototype.characterSprite = function() { + if (!this._characterSprite) { + this.refreshCharacterSprite(); + } + return this._characterSprite; +}; + +// キャラクタースプライトのリフレッシュ +GLSLCharaHeatHazeFilter.prototype.refreshCharacterSprite = function() { + var type = this._param.charaType(); + var id = this._param.charaId(); + this._characterSprite = ( + type === 'player' ? SpritePresenter.player() : + type === 'event' ? SpritePresenter.event(id) : + type === 'follower' ? SpritePresenter.follower(id) : + null + ); +}; + +// キャラクタースプライトのX座標 +GLSLCharaHeatHazeFilter.prototype.characterX = function() { + var sprite = this.characterSprite(); + return ( + sprite.x - + sprite.width * sprite.anchor.x + + sprite.width / 2.0 + + 4.0 + ); +}; + +// キャラクタースプライトのY座標 +GLSLCharaHeatHazeFilter.prototype.characterY = function() { + var sprite = this.characterSprite(); + if (sprite._characterName === "") { + return ( + sprite.y - + $gameMap.tileHeight() / 2.0 + + 8.0 + ); + } + return ( + sprite.y - + sprite.height * sprite.anchor.y + + sprite.height / 2.0 + + 4.0 + ); +}; + +// 描画X座標 +GLSLCharaHeatHazeFilter.prototype.targetX = function() { + return this.characterX(); +}; + +// 描画Y座標 +GLSLCharaHeatHazeFilter.prototype.targetY = function() { + return this.characterY(); +}; + +// 時間 +GLSLCharaHeatHazeFilter.prototype.time = function() { + return this._param.time(); +}; + +// フェード率 +GLSLCharaHeatHazeFilter.prototype.fadeRate = function() { + return this._param.fadeRate(); +}; + +// PIXIフィルターのセットアップ +GLSLCharaHeatHazeFilter.prototype.setupFilter = function() { + if (!this.characterSprite()) { + return; + } + GLSLFilter.prototype.setupFilter.apply(this, arguments); +}; + +// ユニフォーム初期値 +GLSLCharaHeatHazeFilter.prototype.defaultUniforms = function() { + var uniforms = GLSLFilter.prototype.defaultUniforms.apply(this, arguments); + uniforms.uTime = { + type: 'other', + value: this.time() + }; + uniforms.uFadeRate = { + type: 'other', + value: this.fadeRate() + }; + uniforms.uResolution = { + type: 'vec2', + value: { + x: this.spriteWidth(), + y: this.spriteHeight() + } + }; + uniforms.uPosition = { + type: 'vec2', + value: { + x: this.targetX(), + y: this.targetY() + } + }; + uniforms.uPitch = { + type: 'other', + value: this._param.pitch() + }; + uniforms.uInnerRadius = { + type: 'other', + value: this._param.innerRadius() + }; + uniforms.uOuterRadius = { + type: 'other', + value: this._param.outerRadius() + }; + uniforms.uStrength = { + type: 'other', + value: this._param.strength() + }; + uniforms.uR = { + type: 'other', + value: this._param.r() + }; + uniforms.uG = { + type: 'other', + value: this._param.g() + }; + uniforms.uB = { + type: 'other', + value: this._param.b() + }; + return uniforms; +}; + +// フレーム更新 +GLSLCharaHeatHazeFilter.prototype.update = function() { + if (!this.characterSprite()) { + return; + } + GLSLFilter.prototype.update.apply(this, arguments); +}; + +// ユニフォームのフレーム更新 +GLSLCharaHeatHazeFilter.prototype.updateUniforms = function() { + GLSLFilter.prototype.updateUniforms.apply(this, arguments); + this.uniforms.uTime = this.time(); + this.uniforms.uFadeRate = this.fadeRate(); + this.uniforms.uResolution.x = this.spriteWidth(); + this.uniforms.uResolution.y = this.spriteHeight(); + this.uniforms.uPosition.x = this.targetX(); + this.uniforms.uPosition.y = this.targetY(); +}; + +//----------------------------------------------------------------------------- +// GLSLCharaHeatHazeFilterParam +// +// GLSLキャラクター陽炎フィルターパラメーター + +window.GLSLCharaHeatHazeFilterParam = + function GLSLCharaHeatHazeFilterParam() +{ + this.initialize.apply(this, arguments); +}; + +GLSLCharaHeatHazeFilterParam.prototype = + Object.create(GLSLFilterParam.prototype); +GLSLCharaHeatHazeFilterParam.prototype.constructor = + GLSLCharaHeatHazeFilterParam; + +// メンバー変数の初期化 +GLSLCharaHeatHazeFilterParam.prototype.initMembers = function(param) { + GLSLFilterParam.prototype.initMembers.apply(this, arguments); + this._time = 0.0; + this._fadeRate = 0.0; + this._speed = + param.hasOwnProperty('speed') ? param.speed : 1.0; + this._fadeFrame = + param.hasOwnProperty('fadeFrame') ? param.fadeFrame : 60; + this._fadeState = + param.hasOwnProperty('fadeState') ? param.fadeState : 'fadedOut'; + this._charaType = + param.hasOwnProperty('charaType') ? param.charaType : 'player'; + this._charaId = + param.hasOwnProperty('charaId') ? param.charaId : 1; + this._pitch = + param.hasOwnProperty('pitch') ? param.pitch : 1.0; + this._innerRadius = + param.hasOwnProperty('innerRadius') ? param.innerRadius : 24.0; + this._outerRadius = + param.hasOwnProperty('outerRadius') ? param.outerRadius : 72.0; + this._strength = + param.hasOwnProperty('strength') ? param.strength : 1.0; + this._color = + param.hasOwnProperty('color') ? param.color : {r: 2.0, g: 1.0, b: 1.0}; + this._character = this.character(); +}; + +// フィルタークラス +GLSLCharaHeatHazeFilterParam.prototype.filterClass = function() { + return GLSLCharaHeatHazeFilter; +}; + +// 時間 +GLSLCharaHeatHazeFilterParam.prototype.time = function() { + return this._time; +}; + +// フェード率 +GLSLCharaHeatHazeFilterParam.prototype.fadeRate = function() { + return this._fadeRate; +}; + +// キャラクタータイプ +GLSLCharaHeatHazeFilterParam.prototype.charaType = function() { + return this._charaType; +}; + +// キャラクターID +GLSLCharaHeatHazeFilterParam.prototype.charaId = function() { + return this._charaId; +}; + +// エフェクトピッチ +GLSLCharaHeatHazeFilterParam.prototype.pitch = function() { + return this._pitch; +}; + +// エフェクト内径 +GLSLCharaHeatHazeFilterParam.prototype.innerRadius = function() { + return this._innerRadius; +}; + +// エフェクト外径 +GLSLCharaHeatHazeFilterParam.prototype.outerRadius = function() { + return this._outerRadius; +}; + +// エフェクト強度 +GLSLCharaHeatHazeFilterParam.prototype.strength = function() { + return this._strength; +}; + +// エフェクト色R成分 +GLSLCharaHeatHazeFilterParam.prototype.r = function() { + return this._color.r; +}; + +// エフェクト色G成分 +GLSLCharaHeatHazeFilterParam.prototype.g = function() { + return this._color.g; +}; + +// エフェクト色B成分 +GLSLCharaHeatHazeFilterParam.prototype.b = function() { + return this._color.b; +}; + +// キャラクター +GLSLCharaHeatHazeFilterParam.prototype.character = function() { + return ( + this._charaType === 'player' ? $gamePlayer : + this._charaType === 'event' ? $gameMap.event(this._charaId) : + this._charaType === 'follower' ? $gamePlayer.followers().follower(this._charaId - 1) : + null + ); +}; + +// フレーム更新 +GLSLCharaHeatHazeFilterParam.prototype.update = function() { + GLSLFilterParam.prototype.update.apply(this, arguments); + this.checkCharacter(); + this.updateTime(); + this.updateFade(); +}; + +// キャラクターの確認 +GLSLCharaHeatHazeFilterParam.prototype.checkCharacter = function() { + if (this._character !== this.character()) { + $gameScreen.glslFilterParamMap().remove(this); + } +}; + +// 時間のフレーム更新 +GLSLCharaHeatHazeFilterParam.prototype.updateTime = function() { + this._time += this.timeGain(); +}; + +// 時間増加量(秒) +GLSLCharaHeatHazeFilterParam.prototype.timeGain = function() { + return 1.0 / 60.0 * this._speed; +}; + +// フェードのフレーム更新 +GLSLCharaHeatHazeFilterParam.prototype.updateFade = function() { + if (this._fadeState === 'fadingIn') { + this.updateFadingIn(); + } else if (this._fadeState === 'fadingOut') { + this.updateFadingOut(); + } +}; + +// フェードイン中のフレーム更新 +GLSLCharaHeatHazeFilterParam.prototype.updateFadingIn = function() { + this._fadeRate += this.fadeRateGain(); + if (this._fadeRate >= 1.0) { + this._fadeRate = 1.0 + this._fadeState = 'fadedIn'; + } +}; + +// フェードアウト中のフレーム更新 +GLSLCharaHeatHazeFilterParam.prototype.updateFadingOut = function() { + this._fadeRate -= this.fadeRateGain(); + if (this._fadeRate <= 0.0) { + this._fadeRate = 0.0; + this._fadeState = 'fadedOut'; + } +}; + +// フェード率変化量 +GLSLCharaHeatHazeFilterParam.prototype.fadeRateGain = function() { + return 1.0 / this._fadeFrame; +}; + +// フェードイン +GLSLCharaHeatHazeFilterParam.prototype.fadeIn = function() { + this._fadeState = 'fadingIn'; +}; + +// フェードアウト +GLSLCharaHeatHazeFilterParam.prototype.fadeOut = function() { + this._fadeState = 'fadingOut'; +}; + +// 即時表示 +GLSLCharaHeatHazeFilterParam.prototype.show = function() { + this._fadeRate = 1.0; + this._fadeState = 'fadedIn'; +}; + +// 即時消去 +GLSLCharaHeatHazeFilterParam.prototype.hide = function() { + this._fadeRate = 0.0; + this._fadeState = 'fadedOut'; +}; + +})(); \ No newline at end of file diff --git a/js/plugins/SAN_ShaderFilterCharaRipple.js b/js/plugins/SAN_ShaderFilterCharaRipple.js new file mode 100644 index 0000000..e945b04 --- /dev/null +++ b/js/plugins/SAN_ShaderFilterCharaRipple.js @@ -0,0 +1,676 @@ +//============================================================================= +// SAN_ShaderFilterCharaRipple.js +//============================================================================= +// Copyright (c) 2018 Sanshiro +// Released under the MIT license +// http://opensource.org/licenses/mit-license.php +//============================================================================= + +/*:ja + * @plugindesc キャラクター波紋エフェクトフィルター 1.0.0 + * キャラクターの周囲に波紋のエフェクトを表示するフィルターです。 + * @author Sanshiro https://github.com/rev2nym + * @help + * ■概要 + * キャラクターの周囲に波紋のエフェクトを表示するフィルターです。 + * このプラグインはシェーダーフィルターシステムのサブプラグインです。 + * + * ■前提のコアプラグイン + * このプラグインは前提のコアプラグインとして + * 併せて配布される「SAN_ShaderFilter.js」を使用します。 + * あらかじめ導入してください。 + * + * ■シェーダーコードファイル + * このプラグインはシェーダーコードファイルとして + * 「SAN_CharaRippleFrag.txt」を使用します。 + * 「glsl」フォルダにあらかじめ配置してください。 + * + * ■基本的な仕組み + * 基本的な仕組みはコアプラグインのヘルプを参照してください。 + * + * ■パラメータの作成 + * 次のスクリプトコマンドでパラメーターを作成します。 + * 例: + * new GLSLCharaRippleFilterParam({ + * speed: 1.0, // エフェクトスピード + * fadeFrame: 60, // フェードフレームカウント + * fadeState: 'fadedOut', // フェード状態 + * charaType: 'player', // キャラクタータイプ + * charaId: 1, // キャラクターID + * pitch: 1.0, // エフェクトピッチ + * innerRadius: 24.0, // エフェクト内径 + * outerRadius: 72.0, // エフェクト外径 + * strength: 1.0, // エフェクト強度 + * color: {r: 1.0, g: 1.0, b: 2.0} // エフェクト色 + * }); + * + * それぞれの項目は順不同かつ省略可能です。 + * また設定値ごと省略することもできます。 + * 例: + * new GLSLCharaRippleFilterParam(); + * + * ・エフェクトスピード:speed + * エフェクトのスピードです。 + * 数値が0.0に近づくほど遅くなります。 + * マイナスの値も設定できます。 + * 省略可能です。省略した場合は 1.0 が設定されます。 + * + * ・フェードフレームカウント:fadeFrame + * フェードイン、フェードアウトに要するフレーム数です。 + * 省略可能です。省略した場合は 60 が設定されます。 + * + * ・フェード状態:fadeState + * フェードの状態を表します。 + * 'fadingIn'(フェードイン中)、'fadedIn'(フェードイン完了)、 + * 'fadingOut'(フェードアウト中)、'fadedOut'(フェードアウト完了)の + * 4つの状態を取り得ます。 + * 'fadingIn' を設定した場合は即座にフェードインを開始します。 + * 省略可能です。省略した場合は 'fadedOut' が設定されます。 + * + * ・キャラクタータイプ:charaType + * エフェクトの中心となるキャラクターのタイプを指定します。 + * 'player'(プレイヤー)、'follower'(フォロワー)、'event'(イベント)の + * 3つのタイプから指定することが可能です。 + * 省略可能です。省略した場合は 'player' が設定されます。 + * + * ・キャラクターID:charaId + * エフェクトの中心となるキャラクターのIDを指定します。 + * キャラクタータイプで 'follower' を指定した場合は + * フォロワーインデックス(パーティの2人目のIDが1)が + * 'event' を指定した場合はイベントIDが対応します。 + * 省略可能です。省略した場合は 1 が設定されます。 + * + * ・エフェクトピッチ:pitch + * エフェクトのピッチを指定します。 + * この数値が大きくなるほどエフェクトの紋様が細かくなります。 + * 省略可能です。省略した場合は 1.0 が設定されます。 + * + * ・エフェクト内径:innerRadius + * エフェクトの内径をピクセル単位で設定します。 + * この数値より小さい範囲はドーナツの穴のようにエフェクトが表示されません。 + * 省略可能です。省略した場合は 24.0 が設定されます。 + * + * ・エフェクト外径:outerRadius + * エフェクトの外径をピクセル単位で設定します。 + * この数値より大きい範囲はエフェクトが表示されません。 + * 省略可能です。省略した場合は 72.0 が設定されます。 + * + * ・エフェクト強度:strength + * エフェクトの強度を設定します。 + * この数値が大きくなるほどエフェクトによる画面の歪みが強くなります。 + * 省略可能です。省略した場合は 1.0 が設定されます。 + * + * ・エフェクト色:color + * エフェクトの色をRGBで設定します。 + * 省略可能です。省略した場合は {r: 1.0, g: 1.0, b: 2.0} が設定されます。 + * + * ■パラメーターの登録 + * 次のスクリプトコマンドでパラメーターマップへパラメーターを登録します。 + * 例: + * $gameScreen.glslFilterParamMap().set( + * 'playerRipple', // フィルターID + * new GLSLCharaRippleFilterParam() // フィルターパラメーター + * ); + * + * その他のパラメーターマップの操作はコアプラグインのヘルプを参照してください。 + * + * ■パラメーターの操作 + * ・エフェクトのフェードイン:fadeIn() + * 例: + * $gameScreen.glslFilterParamMap().get( + * 'playerRipple' // フィルターID + * ).fadeIn(); + * + * ・エフェクトのフェードアウト:fadeOut() + * 例: + * $gameScreen.glslFilterParamMap().get( + * 'playerRipple' // フィルターID + * ).fadeOut(); + * + * ・エフェクトの即時表示:show() + * 例: + * $gameScreen.glslFilterParamMap().get( + * 'playerRipple' // フィルターID + * ).show(); + * + * ・エフェクトの即時非表示:hide() + * 例: + * $gameScreen.glslFilterParamMap().get( + * 'playerRipple' // フィルターID + * ).hide(); + * + * ■利用規約 + * MITライセンスのもと、商用利用、改変、再配布が可能です。 + * ただし冒頭のコメントは削除や改変をしないでください。 + * これを利用したことによるいかなる損害にも作者は責任を負いません。 + * サポートは期待しないでください><。 + */ + +/*: + * @plugindesc Character ripple effect filter 1.0.0 + * Effect filter which displays the effect of the ripple around the character. + * @author Sanshiro https://github.com/rev2nym + * @help + * - Overview + * This pulugin provides an effect filter that displays + * the effect of ripple around the character. + * This plugin is a sub plugin of the shader filter system. + * + * - Prerequisite core plugin + * This plugin uses "SAN_ShaderFilter.js" distributed together + * as a prerequisite core plugin. + * install in advance it. + * + * - Shader code file + * This plugin uses "SAN_CharaRippleFrag.txt" as a shader code file. + * Put it in the "glsl" folder beforehand. + * + * - Basic mechanism + * Refer to the core plugin help for the basic mechanism. + * + * - Create FPObject (Filter Parameter Object) + * Create the FPObject with the following script command. + * + * Example: + * new GLSLCharaRippleFilterParam({ + *     speed: 1.0, // Effect speed + *     fadeFrame: 60, // Fade frame count + *     fadeState: 'fadedOut', // Fade state + *     charaType: 'player', // Character type + *     charaId: 1, // CharacterID + *     pitch: 1.0, // Effect pitch + *     innerRadius: 24.0, // Effect inner radius + *     outerRadius: 72.0, // Effect outer radius + *     strength: 1.0, // Effect strength + *     color: {r: 2.0, g: 1.0, b: 1.0} // Effect color + * }); + * + * Each item is out of order and can be omitted. + * And all items can also be omitted. + * + * Example: + * new GLSLCharaRippleFilterParam(); + * + * - Effect speed: speed + * This is the speed of the effect. + * The closer the number is to 0.0, the slower it will be. + * You can also set a negative value. + * This is optional. If omitted, 1.0 is set. + * + * - Fade frame count: fadeFrame + * The count of frames required for fadein and fadeout. + * This is optional. If omitted, 60 is set. + * + * - Fade state: fadeState + * Represents the state of the fade. + * This can take four states + * 'fadingIn' (in fadingin), 'fadedIn' (fadein completed), + * 'fadingOut' (in fadingout), 'fadedOut' (fadeout completed) + * If 'fadingIn' is set, fadein starts immediately. + * This is optional. If omitted, 'fadedOut' is set. + * + * - Character type: charaType + * This specifies the type of character that is the center of the effect. + * This is possible to specify from three types of + * 'player', 'follower', 'event'. + * This is optional. If omitted, 'player' is set. + * + * - Character ID: charaId + * This specifies the ID of the character that is the center of the effect. + * If 'follower' is specified for the character type, + * the follower index corresponds (the ID of the 2nd actor in the party is 1), + * if 'event' is specified, the event ID corresponds. + * This is optional. If omitted, 1 is set. + * + * - Effect pitch: pitch + * This specifies the pitch of the effect. + * The greater the number, the finer the pattern of the effect. + * This is optional. If omitted, 1.0 is set. + * + * - Effect inner radius: innerRadius + * This sets the inner radius of the effect in pixels. + * If the range is smaller than this number, + * effects will not be displayed like donut holes. + * This is optional. If omitted, 24.0 is set. + * + * · Effect outer radius: outerRadius + * This sets the outer radius of the effect in pixels. + * Effects are not displayed in the range larger than this number. + * This is optional. If omitted, 72.0 is set. + * + * - Effect strength: strength + * This sets the strength of the effect. + * The higher the value, the stronger the screen distortion due to the effect. + * This is optional. If omitted, 1.0 is set. + * + * - Effect color: color + * This sets the effect color with RGB. + * This is optional. If omitted, {r: 2.0, g: 1.0, b: 1.0} is set. + * + * - Register FPObject (Filter Parameter Object) + * Register the FPObject in the FPMap with the following script command. + * + * Example: + * $gameScreen.glslFilterParamMap().set( + *     'playerRipple', // Filter ID + *     new GLSLCharaRippleFilterParam() // FPObject + * ); + * + * For other FPMap operation, see the core plugin help. + * + * - Effect operation commands + * + * - Fadein effect: fadeIn() + * Example: + * $gameScreen.glslFilterParamMap().get( + *     'playerRipple' // Filter ID + * ).fadeIn(); + * + * - Fadeout effect: fadeOut() + * Example: + * $gameScreen.glslFilterParamMap().get( + *     'playerRipple' // Filter ID + * ).fadeOut(); + * + * - Immediate display of effects: show() + * Example: + * $gameScreen.glslFilterParamMap().get( + *     'playerRipple' // Filter ID + * ).show(); + * + * - Immediate hide of effects: hide() + * Example: + * $gameScreen.glslFilterParamMap().get( + *     'playerRipple' // Filter ID + * ).hide(); + * + * - Terms of use + * Under the MIT license, + * commercial use, modification, redistribution is possible. + * However, please do not delete or modify the comment at the beginning. + * The author is not responsible for any damage caused by using this. + * And please do not expect support. X( + */ + +var Imported = Imported || {}; +Imported.SAN_ShaderFilterCharaRipple = true; + +var Sanshiro = Sanshiro || {}; +Sanshiro.ShaderFilterCharaRipple = Sanshiro.ShaderFilterCharaRipple || {}; +Sanshiro.ShaderFilterCharaRipple.version = '1.0.0'; + +(function() { +'use strict'; + +//----------------------------------------------------------------------------- +// GLSLCharaRippleFilter +// +// GLSLキャラクター波紋フィルター + +window.GLSLCharaRippleFilter = + function GLSLCharaRippleFilter() +{ + this.initialize.apply(this, arguments); +}; + +GLSLCharaRippleFilter.prototype = + Object.create(GLSLFilter.prototype); +GLSLCharaRippleFilter.prototype.constructor = + GLSLCharaRippleFilter; + +// バーテックスシェーダーファイル名 +GLSLCharaRippleFilter.prototype.vertName = function() { + return ''; +}; + +// フラグメントシェーダーファイル名 +GLSLCharaRippleFilter.prototype.fragName = function() { + return 'SAN_CharaRippleFrag'; +}; + +// キャラクタースプライト +GLSLCharaRippleFilter.prototype.characterSprite = function() { + if (!this._characterSprite) { + this.refreshCharacterSprite(); + } + return this._characterSprite; +}; + +// キャラクタースプライトのリフレッシュ +GLSLCharaRippleFilter.prototype.refreshCharacterSprite = function() { + var type = this._param.charaType(); + var id = this._param.charaId(); + this._characterSprite = ( + type === 'player' ? SpritePresenter.player() : + type === 'event' ? SpritePresenter.event(id) : + type === 'follower' ? SpritePresenter.follower(id) : + null + ); +}; + +// キャラクタースプライトのX座標 +GLSLCharaRippleFilter.prototype.characterX = function() { + var sprite = this.characterSprite(); + return ( + sprite.x - + sprite.width * sprite.anchor.x + + sprite.width / 2.0 + + 4.0 + ); +}; + +// キャラクタースプライトのY座標 +GLSLCharaRippleFilter.prototype.characterY = function() { + var sprite = this.characterSprite(); + if (sprite._characterName === "") { + return ( + sprite.y - + $gameMap.tileHeight() / 2.0 + + 8.0 + ); + } + return ( + sprite.y - + sprite.height * sprite.anchor.y + + sprite.height / 2.0 + + 4.0 + ); +}; + +// 描画X座標 +GLSLCharaRippleFilter.prototype.targetX = function() { + return this.characterX(); +}; + +// 描画Y座標 +GLSLCharaRippleFilter.prototype.targetY = function() { + return this.characterY(); +}; + +// 時間 +GLSLCharaRippleFilter.prototype.time = function() { + return this._param.time(); +}; + +// フェード率 +GLSLCharaRippleFilter.prototype.fadeRate = function() { + return this._param.fadeRate(); +}; + +// PIXIフィルターのセットアップ +GLSLCharaRippleFilter.prototype.setupFilter = function() { + if (!this.characterSprite()) { + return; + } + GLSLFilter.prototype.setupFilter.apply(this, arguments); +}; + +// ユニフォーム初期値 +GLSLCharaRippleFilter.prototype.defaultUniforms = function() { + var uniforms = GLSLFilter.prototype.defaultUniforms.apply(this, arguments); + uniforms.uTime = { + type: 'other', + value: this.time() + }; + uniforms.uFadeRate = { + type: 'other', + value: this.fadeRate() + }; + uniforms.uResolution = { + type: 'vec2', + value: { + x: this.spriteWidth(), + y: this.spriteHeight() + } + }; + uniforms.uPosition = { + type: 'vec2', + value: { + x: this.targetX(), + y: this.targetY() + } + }; + uniforms.uPitch = { + type: 'other', + value: this._param.pitch() + }; + uniforms.uInnerRadius = { + type: 'other', + value: this._param.innerRadius() + }; + uniforms.uOuterRadius = { + type: 'other', + value: this._param.outerRadius() + }; + uniforms.uStrength = { + type: 'other', + value: this._param.strength() + }; + uniforms.uR = { + type: 'other', + value: this._param.r() + }; + uniforms.uG = { + type: 'other', + value: this._param.g() + }; + uniforms.uB = { + type: 'other', + value: this._param.b() + }; + return uniforms; +}; + +// フレーム更新 +GLSLCharaRippleFilter.prototype.update = function() { + if (!this.characterSprite()) { + return; + } + GLSLFilter.prototype.update.apply(this, arguments); +}; + +// ユニフォームのフレーム更新 +GLSLCharaRippleFilter.prototype.updateUniforms = function() { + GLSLFilter.prototype.updateUniforms.apply(this, arguments); + this.uniforms.uTime = this.time(); + this.uniforms.uFadeRate = this.fadeRate(); + this.uniforms.uResolution.x = this.spriteWidth(); + this.uniforms.uResolution.y = this.spriteHeight(); + this.uniforms.uPosition.x = this.targetX(); + this.uniforms.uPosition.y = this.targetY(); +}; + +//----------------------------------------------------------------------------- +// GLSLCharaRippleFilterParam +// +// GLSLキャラクター波紋フィルターパラメーター + +window.GLSLCharaRippleFilterParam = + function GLSLCharaRippleFilterParam() +{ + this.initialize.apply(this, arguments); +}; + +GLSLCharaRippleFilterParam.prototype = + Object.create(GLSLFilterParam.prototype); +GLSLCharaRippleFilterParam.prototype.constructor = + GLSLCharaRippleFilterParam; + +// メンバー変数の初期化 +GLSLCharaRippleFilterParam.prototype.initMembers = function(param) { + GLSLFilterParam.prototype.initMembers.apply(this, arguments); + this._time = 0.0; + this._fadeRate = 0.0; + this._speed = + param.hasOwnProperty('speed') ? param.speed : 1.0; + this._fadeFrame = + param.hasOwnProperty('fadeFrame') ? param.fadeFrame : 60; + this._fadeState = + param.hasOwnProperty('fadeState') ? param.fadeState : 'fadedOut'; + this._charaType = + param.hasOwnProperty('charaType') ? param.charaType : 'player'; + this._charaId = + param.hasOwnProperty('charaId') ? param.charaId : 1; + this._pitch = + param.hasOwnProperty('pitch') ? param.pitch : 1.0; + this._innerRadius = + param.hasOwnProperty('innerRadius') ? param.innerRadius : 24.0; + this._outerRadius = + param.hasOwnProperty('outerRadius') ? param.outerRadius : 72.0; + this._strength = + param.hasOwnProperty('strength') ? param.strength : 1.0; + this._color = + param.hasOwnProperty('color') ? param.color : {r: 1.0, g: 1.0, b: 2.0}; + this._character = this.character(); +}; + +// フィルタークラス +GLSLCharaRippleFilterParam.prototype.filterClass = function() { + return GLSLCharaRippleFilter; +}; + +// 時間 +GLSLCharaRippleFilterParam.prototype.time = function() { + return this._time; +}; + +// フェード率 +GLSLCharaRippleFilterParam.prototype.fadeRate = function() { + return this._fadeRate; +}; + +// キャラクタータイプ +GLSLCharaRippleFilterParam.prototype.charaType = function() { + return this._charaType; +}; + +// キャラクターID +GLSLCharaRippleFilterParam.prototype.charaId = function() { + return this._charaId; +}; + +// エフェクトピッチ +GLSLCharaRippleFilterParam.prototype.pitch = function() { + return this._pitch; +}; + +// エフェクト内径 +GLSLCharaRippleFilterParam.prototype.innerRadius = function() { + return this._innerRadius; +}; + +// エフェクト外径 +GLSLCharaRippleFilterParam.prototype.outerRadius = function() { + return this._outerRadius; +}; + +// エフェクト強度 +GLSLCharaRippleFilterParam.prototype.strength = function() { + return this._strength; +}; + +// エフェクト色R成分 +GLSLCharaRippleFilterParam.prototype.r = function() { + return this._color.r; +}; + +// エフェクト色G成分 +GLSLCharaRippleFilterParam.prototype.g = function() { + return this._color.g; +}; + +// エフェクト色B成分 +GLSLCharaRippleFilterParam.prototype.b = function() { + return this._color.b; +}; + +// キャラクター +GLSLCharaRippleFilterParam.prototype.character = function() { + return ( + this._charaType === 'player' ? $gamePlayer : + this._charaType === 'event' ? $gameMap.event(this._charaId) : + this._charaType === 'follower' ? $gamePlayer.followers().follower(this._charaId - 1) : + null + ); +}; + +// フレーム更新 +GLSLCharaRippleFilterParam.prototype.update = function() { + GLSLFilterParam.prototype.update.apply(this, arguments); + this.checkCharacter(); + this.updateTime(); + this.updateFade(); +}; + +// キャラクターの確認 +GLSLCharaRippleFilterParam.prototype.checkCharacter = function() { + if (this._character !== this.character()) { + $gameScreen.glslFilterParamMap().remove(this); + } +}; + +// 時間のフレーム更新 +GLSLCharaRippleFilterParam.prototype.updateTime = function() { + this._time += this.timeGain(); +}; + +// 時間増加量(秒) +GLSLCharaRippleFilterParam.prototype.timeGain = function() { + return 1.0 / 60.0 * this._speed; +}; + +// フェードのフレーム更新 +GLSLCharaRippleFilterParam.prototype.updateFade = function() { + if (this._fadeState === 'fadingIn') { + this.updateFadingIn(); + } else if (this._fadeState === 'fadingOut') { + this.updateFadingOut(); + } +}; + +// フェードイン中のフレーム更新 +GLSLCharaRippleFilterParam.prototype.updateFadingIn = function() { + this._fadeRate += this.fadeRateGain(); + if (this._fadeRate >= 1.0) { + this._fadeRate = 1.0 + this._fadeState = 'fadedIn'; + } +}; + +// フェードアウト中のフレーム更新 +GLSLCharaRippleFilterParam.prototype.updateFadingOut = function() { + this._fadeRate -= this.fadeRateGain(); + if (this._fadeRate <= 0.0) { + this._fadeRate = 0.0; + this._fadeState = 'fadedOut'; + } +}; + +// フェード率変化量 +GLSLCharaRippleFilterParam.prototype.fadeRateGain = function() { + return 1.0 / this._fadeFrame; +}; + +// フェードイン +GLSLCharaRippleFilterParam.prototype.fadeIn = function() { + this._fadeState = 'fadingIn'; +}; + +// フェードアウト +GLSLCharaRippleFilterParam.prototype.fadeOut = function() { + this._fadeState = 'fadingOut'; +}; + +// 即時表示 +GLSLCharaRippleFilterParam.prototype.show = function() { + this._fadeRate = 1.0; + this._fadeState = 'fadedIn'; +}; + +// 即時非表示 +GLSLCharaRippleFilterParam.prototype.hide = function() { + this._fadeRate = 0.0; + this._fadeState = 'fadedOut'; +}; + +})(); diff --git a/js/plugins/SAN_ShaderFilterScanLine.js b/js/plugins/SAN_ShaderFilterScanLine.js new file mode 100644 index 0000000..4934d88 --- /dev/null +++ b/js/plugins/SAN_ShaderFilterScanLine.js @@ -0,0 +1,392 @@ +//============================================================================= +// SAN_ShaderFilterScanLine.js +//============================================================================= +// Copyright (c) 2018 Sanshiro +// Released under the MIT license +// http://opensource.org/licenses/mit-license.php +//============================================================================= + +/*:ja + * @plugindesc 走査線エフェクトフィルター 1.0.0 + * スプライトに走査線のエフェクトを表示するフィルターです。 + * @author Sanshiro https://github.com/rev2nym + * @help + * ■概要 + * スプライトに走査線のエフェクトを表示するフィルターです。 + * このプラグインはシェーダーフィルターシステムのサブプラグインです。 + * + * ■前提のコアプラグイン + * このプラグインは前提のコアプラグインとして + * 併せて配布される「SAN_ShaderFilter.js」を使用します。 + * あらかじめ導入してください。 + * + * ■シェーダーコードファイル + * このプラグインはシェーダーコードファイルとして + * 「SAN_ScanLineFrag.txt」を使用します。 + * 「glsl」フォルダにあらかじめ配置してください。 + * + * ■基本的な仕組み + * 基本的な仕組みはコアプラグインのヘルプを参照してください。 + * + * ■パラメータの作成 + * 次のスクリプトコマンドでパラメーターを作成します。 + * 例: + * new GLSLScanLineFilterParam({ + * speed: 1.0, // エフェクトスピード + * fadeFrame: 60, // フェードフレームカウント + * fadeState: 'fadedOut' // フェード状態 + * }); + * + * それぞれの項目は順不同かつ省略可能です。 + * また設定値ごと省略することもできます。 + * 例: + * new GLSLScanLineFilterParam(); + * + * ・エフェクトスピード:speed + * エフェクトのスピードです。 + * 数値が0.0に近づくほど遅くなります。 + * マイナスの値も設定できます。 + * 省略可能です。省略した場合は 1.0 が設定されます。 + * + * ・フェードフレームカウント:fadeFrame + * フェードイン、フェードアウトに要するフレーム数です。 + * 省略可能です。省略した場合は 60 が設定されます。 + * + * ・フェード状態:fadeState + * フェードの状態を表します。 + * 'fadingIn'(フェードイン中)、'fadedIn'(フェードイン完了)、 + * 'fadingOut'(フェードアウト中)、'fadedOut'(フェードアウト完了)の + * 4つの状態を取り得ます。 + * 'fadingIn' を設定した場合は即座にフェードインを開始します。 + * 省略可能です。省略した場合は 'fadedOut' が設定されます。 + * + * ■パラメーターの登録 + * 次のスクリプトコマンドでパラメーターマップへパラメーターを登録します。 + * 例: + * $gamePlayer.glslFilterParamMap().set( + * 'playerScanLine', // フィルターID + * new GLSLScanLineFilterParam() // フィルターパラメーター + * ); + * + * その他のパラメーターマップの操作はコアプラグインのヘルプを参照してください。 + * + * ■パラメーターの操作 + * ・エフェクトのフェードイン:fadeIn() + * 例: + * $gamePlayer.glslFilterParamMap().get( + * 'playerScanLine' // フィルターID + * ).fadeIn(); + * + * ・エフェクトのフェードアウト:fadeOut() + * 例: + * $gamePlayer.glslFilterParamMap().get( + * 'playerScanLine' // フィルターID + * ).fadeOut(); + * + * ・エフェクトの即時表示:show() + * 例: + * $gamePlayer.glslFilterParamMap().get( + * 'playerScanLine' // フィルターID + * ).show(); + * + * ・エフェクトの即時非表示:hide() + * 例: + * $gamePlayer.glslFilterParamMap().get( + * 'playerScanLine' // フィルターID + * ).hide(); + * + * ■利用規約 + * MITライセンスのもと、商用利用、改変、再配布が可能です。 + * ただし冒頭のコメントは削除や改変をしないでください。 + * これを利用したことによるいかなる損害にも作者は責任を負いません。 + * サポートは期待しないでください><。 + */ + +/*: + * @plugindesc Scan line effect filter 1.0.0 + * Effect filter that displays the scan line on the sprite. + * @author Sanshiro https://github.com/rev2nym + * @help + * - Overview + * This pulugin provides an effect filter that displays + * the effect of scan line. + * This plugin is a sub plugin of the shader filter system. + * + * - Prerequisite core plugin + * This plugin uses "SAN_ShaderFilter.js" distributed together + * as a prerequisite core plugin. + * install in advance it. + * + * - Shader code file + * This plugin uses "SAN_CharaScanLineFrag.txt" as a shader code file. + * Put it in the "glsl" folder beforehand. + * + * - Basic mechanism + * Refer to the core plugin help for the basic mechanism. + * + * - Create FPObject (Filter Parameter Object) + * Create the FPObject with the following script command. + * + * Example: + * new GLSLScanLineFilterParam({ + * speed: 1.0, // Effect speed + * fadeFrame: 60, // Fade frame count + * fadeState: 'fadedOut' // Fade state + * }); + * + * Each item is out of order and can be omitted. + * And all items can also be omitted. + * + * Example: + * new GLSLScanLineFilterParam(); + * + * - Effect speed: speed + * This is the speed of the effect. + * The closer the number is to 0.0, the slower it will be. + * You can also set a negative value. + * This is optional. If omitted, 1.0 is set. + * + * - Fade frame count: fadeFrame + * The count of frames required for fadein and fadeout. + * This is optional. If omitted, 60 is set. + * + * - Fade state: fadeState + * Represents the state of the fade. + * This can take four states + * 'fadingIn' (in fadingin), 'fadedIn' (fadein completed), + * 'fadingOut' (in fadingout), 'fadedOut' (fadeout completed) + * If 'fadingIn' is set, fadein starts immediately. + * This is optional. If omitted, 'fadedOut' is set. + * + * - Register FPObject (Filter Parameter Object) + * Register the FPObject in the FPMap with the following script command. + * + * Example: + * $gamePlayer.glslFilterParamMap().set( + * 'playerScanLine', // Filter ID + * new GLSLScanLineFilterParam() // FPObject + * ); + * + * For other FPMap operation, see the core plugin help. + * + * - Effect operation commands + * + * - Fadein effect: fadeIn() + * Example: + * $gamePlayer.glslFilterParamMap().get( + *     'playerScanLine' // Filter ID + * ).fadeIn(); + * + * - Fadeout effect: fadeOut() + * Example: + * $gamePlayer.glslFilterParamMap().get( + *     'playerScanLine' // Filter ID + * ).fadeOut(); + * + * - Immediate display of effects: show() + * Example: + * $gamePlayer.glslFilterParamMap().get( + *     'playerScanLine' // Filter ID + * ).show(); + * + * - Immediate hide of effects: hide() + * Example: + * $gamePlayer.glslFilterParamMap().get( + *     'playerScanLine' // Filter ID + * ).hide(); + * + * + * - Terms of use + * Under the MIT license, + * commercial use, modification, redistribution is possible. + * However, please do not delete or modify the comment at the beginning. + * The author is not responsible for any damage caused by using this. + * And please do not expect support. X( + */ + +var Imported = Imported || {}; +Imported.SAN_ShaderFilterScanLine = true; + +var Sanshiro = Sanshiro || {}; +Sanshiro.ShaderFilterScanLine = Sanshiro.ShaderFilterScanLine || {}; +Sanshiro.ShaderFilterScanLine.version = '1.0.0'; + +(function() { +'use strict'; + +//----------------------------------------------------------------------------- +// GLSLScanLineFilter +// +// GLSL走査線フィルター + +window.GLSLScanLineFilter = function GLSLScanLineFilter() { + this.initialize.apply(this, arguments); +}; + +GLSLScanLineFilter.prototype = + Object.create(GLSLFilter.prototype); +GLSLScanLineFilter.prototype.constructor = + GLSLScanLineFilter; + +// バーテックスシェーダーファイル名 +GLSLScanLineFilter.prototype.vertName = function() { + return ''; +}; + +// フラグメントシェーダーファイル名 +GLSLScanLineFilter.prototype.fragName = function() { + return 'SAN_ScanLineFrag'; +}; + +// 時間 +GLSLScanLineFilter.prototype.time = function() { + return this._param.time(); +}; + +// フェード率 +GLSLScanLineFilter.prototype.fadeRate = function() { + return this._param.fadeRate(); +}; + +// ユニフォーム初期値 +GLSLScanLineFilter.prototype.defaultUniforms = function() { + var uniforms = GLSLFilter.prototype.defaultUniforms.apply(this, arguments); + uniforms.uTime = { + type: 'other', + value: this.time() + }; + uniforms.uFadeRate = { + type: 'other', + value: this.fadeRate() + }; + uniforms.uResolution = { + type: 'vec2', + value: { + x: this.spriteWidth(), + y: this.spriteHeight() + } + }; + return uniforms; +}; + +// ユニフォームのフレーム更新 +GLSLScanLineFilter.prototype.updateUniforms = function() { + GLSLFilter.prototype.updateUniforms.apply(this, arguments); + this.uniforms.uTime = this.time(); + this.uniforms.uFadeRate = this.fadeRate(); +}; + +//----------------------------------------------------------------------------- +// GLSLScanLineFilterParam +// +// GLSLキャラクター走査線フィルターパラメーター + +window.GLSLScanLineFilterParam = function GLSLScanLineFilterParam() { + this.initialize.apply(this, arguments); +}; + +GLSLScanLineFilterParam.prototype = + Object.create(GLSLFilterParam.prototype); +GLSLScanLineFilterParam.prototype.constructor = + GLSLScanLineFilterParam; + +// メンバー変数の初期化 +GLSLScanLineFilterParam.prototype.initMembers = function(param) { + GLSLFilterParam.prototype.initMembers.apply(this, arguments); + this._time = 0.0; + this._fadeRate = 0.0; + this._speed = + param.hasOwnProperty('speed') ? param.speed : 1.0; + this._fadeFrame = + param.hasOwnProperty('fadeFrame') ? param.fadeFrame : 60; + this._fadeState = + param.hasOwnProperty('fadeState') ? param.fadeState : 'fadedOut'; +}; + +// フィルタークラス +GLSLScanLineFilterParam.prototype.filterClass = function() { + return GLSLScanLineFilter; +}; + +// 時間 +GLSLScanLineFilterParam.prototype.time = function() { + return this._time; +}; + +// フェード率 +GLSLScanLineFilterParam.prototype.fadeRate = function() { + return this._fadeRate; +}; + +// フレーム更新 +GLSLScanLineFilterParam.prototype.update = function() { + GLSLFilterParam.prototype.update.apply(this, arguments); + this.updateTime(); + this.updateFade(); +}; + +// 時間のフレーム更新 +GLSLScanLineFilterParam.prototype.updateTime = function() { + this._time += this.timeGain(); +}; + +// 時間増加量(秒) +GLSLScanLineFilterParam.prototype.timeGain = function() { + return 1.0 / 60.0 * this._speed; +}; + +// フェードのフレーム更新 +GLSLScanLineFilterParam.prototype.updateFade = function() { + if (this._fadeState === 'fadingIn') { + this.updateFadingIn(); + } else if (this._fadeState === 'fadingOut') { + this.updateFadingOut(); + } +}; + +// フェードイン中のフレーム更新 +GLSLScanLineFilterParam.prototype.updateFadingIn = function() { + this._fadeRate += this.fadeRateGain(); + if (this._fadeRate >= 1.0) { + this._fadeRate = 1.0 + this._fadeState = 'fadedIn'; + } +}; + +// フェードアウト中のフレーム更新 +GLSLScanLineFilterParam.prototype.updateFadingOut = function() { + this._fadeRate -= this.fadeRateGain(); + if (this._fadeRate <= 0.0) { + this._fadeRate = 0.0; + this._fadeState = 'fadedOut'; + } +}; + +// フェード率変化量 +GLSLScanLineFilterParam.prototype.fadeRateGain = function() { + return 1.0 / this._fadeFrame; +}; + +// フェードイン +GLSLScanLineFilterParam.prototype.fadeIn = function() { + this._fadeState = 'fadingIn'; +}; + +// フェードアウト +GLSLScanLineFilterParam.prototype.fadeOut = function() { + this._fadeState = 'fadingOut'; +}; + +// 即時表示 +GLSLScanLineFilterParam.prototype.show = function() { + this._fadeRate = 1.0; + this._fadeState = 'fadedIn'; +}; + +// 即時非表示 +GLSLScanLineFilterParam.prototype.hide = function() { + this._fadeRate = 0.0; + this._fadeState = 'fadedOut'; +}; + +})(); \ No newline at end of file diff --git a/js/plugins/SVActorPosition.js b/js/plugins/SVActorPosition.js new file mode 100644 index 0000000..7195a53 --- /dev/null +++ b/js/plugins/SVActorPosition.js @@ -0,0 +1,268 @@ +//============================================================================= +// SVActorPosition.js +//============================================================================= + +/*: + * @plugindesc Change actors' position on screen at sideview battle. + * @author Sasuke KANNAZUKI + * + * @param actor1 Xpos + * @desc X position of actor1's center. (default:600) + * @default 600 + * + * @param actor1 Ypos + * @desc Y position of actor1's bottom. (default:280) + * @default 280 + * + * @param actor2 Xpos + * @desc X position of actor2's center. (default:632) + * @default 632 + * + * @param actor2 Ypos + * @desc Y position of actor2's bottom. (default:328) + * @default 328 + * + * @param actor3 Xpos + * @desc X position of actor3's center. (default:664) + * @default 664 + * + * @param actor3 Ypos + * @desc Y position of actor3's bottom. (default:376) + * @default 376 + * + * @param actor4 Xpos + * @desc X position of actor4's center. (default:696) + * @default 696 + * + * @param actor4 Ypos + * @desc Y position of actor4's bottom. (default:424) + * @default 424 + * + * @help + * This plugin assumes the use of diffrent (from specified) size SV actor graphics. + * + * Plugin Command: + * SVActorPosition arg0 arg1 arg2 + * arg0 must be '1', '2', '3', or '4'. + * arg1 must be 'X' or 'Y'. + * arg2 must be the value of coordinate position. + * + * ex. + * SVActorPosition 1 X 640 # set sideview actor 1's X position 640. + * SVActorPosition 4 Y 472 # set sideview actor 4's Y position 472. + * + * configuration at Actor's note: + * + * Weapon animation's height of the sideview actor. + * In this case, Y position is heigher 12px by the defalut. + * - It also accepts minus value, + * because it assumes when you make smaller actor. + * - If this isn't written, default value 0 is used. + * + * Weapon animation's X position is automatically corrected + * according to the actor graphics size. + * If you feel it isn't natural, you can optimize the X position. + * + * In this case weapon animation moves right 20 pixels. + * If the value is minus, animation moves left. + */ +/*:ja + * @plugindesc サイドビュー戦闘においてアクター達の画面表示位置を設定します。 + * @author 神無月サスケ + * + * @param actor1 Xpos + * @desc アクター1の中心のX座標です。(初期値:600) + * @default 600 + * + * @param actor1 Ypos + * @desc アクター1の足元のY座標です。(初期値:280) + * @default 280 + * + * @param actor2 Xpos + * @desc アクター2の中心のX座標です。(初期値:632) + * @default 632 + * + * @param actor2 Ypos + * @desc アクター2の足元のY座標です。(初期値:328) + * @default 328 + * + * @param actor3 Xpos + * @desc アクター3の中心のX座標です。(初期値:664) + * @default 664 + * + * @param actor3 Ypos + * @desc アクター3の足元のY座標です。(初期値:376) + * @default 376 + * + * @param actor4 Xpos + * @desc アクター4の中心のX座標です。(初期値:696) + * @default 696 + * + * @param actor4 Ypos + * @desc アクター4の足元のY座標です。(初期値:424) + * @default 424 + * + * @help + * このプラグインは、標準素材とは異なったサイズのSVアクター画像での使用を + * 想定しています。 + * + * プラグインコマンドの書式: + * SVActorPosition arg0 arg1 arg2 + * arg0 は '1', '2', '3', か '4' にします。 + * arg1 は 'X' か 'Y' にします。 + * arg2 は 座標の値にします。 + * ex. + * SVActorPosition 1 X 640 # SV画面のアクター1のX座標を640にします。 + * SVActorPosition 4 Y 472 # SV画面のアクター4のY座標を472にします。 + * + * アクターのメモによる設定: + * + * サイドビューアクターの武器アニメの表示Y座標の高さを設定します。 + * この例では、通常より12ピクセル高い位置に表示されます。 + * - 標準より小さなアクター画像の作成を想定して、マイナス値も受け付けます。 + * - 記述を省略した場合、デフォルトの0が採用されます。 + * + * 武器アニメのX座標は、アクター画像のサイズによって自動的に補正されます。 + * もしそれで不自然な場合は、以下の書式でメモに書いてください。 + * + * サイドビューアクターの武器アニメの表示X座標を右寄りに補正します。 + * この例では、通常より20ピクセル右位置に表示されます。 + * マイナス値にすることで、左寄りの表示も可能です。 + */ + +(function() { + + var parameters = PluginManager.parameters('SVActorPosition'); + var SVActor1X = Number(parameters['actor1 Xpos'] || 600); + var SVActor2X = Number(parameters['actor2 Xpos'] || 632); + var SVActor3X = Number(parameters['actor3 Xpos'] || 664); + var SVActor4X = Number(parameters['actor4 Xpos'] || 696); + var SVActor1Y = Number(parameters['actor1 Ypos'] || 280); + var SVActor2Y = Number(parameters['actor2 Ypos'] || 328); + var SVActor3Y = Number(parameters['actor3 Ypos'] || 376); + var SVActor4Y = Number(parameters['actor4 Ypos'] || 424); + + // -------------------- + // process plugin commands + // -------------------- + var _Game_Interpreter_pluginCommand = + Game_Interpreter.prototype.pluginCommand; + Game_Interpreter.prototype.pluginCommand = function(command, args) { + _Game_Interpreter_pluginCommand.call(this, command, args); + if (command === 'SVActorPosition') { + // check whether sv array is already defined or not + if(!$gameSystem.svActorArrayDefined()){ + $gameSystem.defineSvActorArray(); + } + // inspect and process parameters + var value = Number(args[2]); + if(value){ + switch(args[0]){ + case '1': + if(args[1] === 'x' || args[1] === 'X'){ + $gameSystem.svActorX[0] = value; + } else if(args[1] === 'y' || args[1] === 'Y'){ + $gameSystem.svActorY[0] = value; + } + break; + case '2': + if(args[1] === 'x' || args[1] === 'X'){ + $gameSystem.svActorX[1] = value; + } else if(args[1] === 'y'|| args[1] === 'Y'){ + $gameSystem.svActorY[1] = value; + } + break; + case '3': + if(args[1] === 'x' || args[1] === 'X'){ + $gameSystem.svActorX[2] = value; + } else if(args[1] === 'y'|| args[1] === 'Y'){ + $gameSystem.svActorY[2] = value; + } + break; + case '4': + if(args[1] === 'x' || args[1] === 'X'){ + $gameSystem.svActorX[3] = value; + } else if(args[1] === 'y'|| args[1] === 'Y'){ + $gameSystem.svActorY[3] = value; + } + } + } + } + }; + + // -------------------- + // define arrays for save sv actors' position + // -------------------- + var _Game_System_initialize = Game_System.prototype.initialize; + Game_System.prototype.initialize = function() { + _Game_System_initialize.call(this); + this.defineSvActorArray(); + }; + + Game_System.prototype.defineSvActorArray = function() { + this.svActorX = [null, null, null, null]; + this.svActorY = [null, null, null, null]; + }; + + Game_System.prototype.svActorArrayDefined = function() { + return !!this.svActorX; + }; + + // -------------------- + // set actors' position (overwrited) + // -------------------- + Sprite_Actor.prototype.setActorHome = function(index) { + // check whether sv array is already defined or not + if(!$gameSystem.svActorArrayDefined()){ + $gameSystem.defineSvActorArray(); + } + // set default values + var x = 600 + index * 32; + var y = 280 + index * 48; + // apply option values + switch(index) { + case 0: + x = $gameSystem.svActorX[0] || SVActor1X; + y = $gameSystem.svActorY[0] || SVActor1Y; + break; + case 1: + x = $gameSystem.svActorX[1] || SVActor2X; + y = $gameSystem.svActorY[1] || SVActor2Y; + break; + case 2: + x = $gameSystem.svActorX[2] || SVActor3X; + y = $gameSystem.svActorY[2] || SVActor3Y; + break; + case 3: + x = $gameSystem.svActorX[3] || SVActor4X; + y = $gameSystem.svActorY[3] || SVActor4Y; + } + // set position + this.setHome(x, y); + }; + + // -------------------- + // set weapon animation's position + // -------------------- + var _Sprite_Weapon_setup = Sprite_Weapon.prototype.setup; + Sprite_Weapon.prototype.setup = function(weaponImageId) { + _Sprite_Weapon_setup.call(this, weaponImageId); + this.setPosition(); + }; + + Sprite_Weapon.prototype.setPosition = function() { + // set X position by actor sprite size + var actorBitmap = this.parent._mainSprite.bitmap; + var actorSpriteWidth = actorBitmap ? actorBitmap.width / 9 : 64; + this.x = -16 - (actorSpriteWidth - 64) / 2; + // set Y default position + this.y = 0; + // change X,Y position by actor's note + var battler = this.parent._battler; + if(battler){ + this.x += (Number(battler.actor().meta.SVWeaponRight) || 0); + this.y -= (Number(battler.actor().meta.SVWeaponHeight) || 0); + } + }; + +})(); diff --git a/js/plugins/ScreenResolution.js b/js/plugins/ScreenResolution.js new file mode 100644 index 0000000..7c7599f --- /dev/null +++ b/js/plugins/ScreenResolution.js @@ -0,0 +1,79 @@ +//============================================================================= +// Yanfly Engine Plugins - Screen Resolution +// ScreenResolution.js +// Version: 1.00 +//============================================================================= + +var Imported = Imported || {}; +Imported.ScreenResolution = true; + +var Yanfly = Yanfly || {}; +Yanfly.ScrRes = Yanfly.ScrRes || {}; + +//============================================================================= + /*: + * @plugindesc v1.00 Change your game's screen resolution to your liking! + * @author Yanfly Engine Plugins + * + * @param Screen Width + * @desc Adjusts the width of the screen. . + * Default: 816 + * @default 816 + * + * @param Screen Height + * @desc Adjusts the height of the screen. . + * Default: 624 + * @default 624 + * + * @help + * Adjust the parameters to change the size of how you want your game's + * screen resolution to appear. + */ + /*:ja + * @plugindesc ゲームスクリーンの解像度を好きなように変更することができます + * @author Yanfly Engine Plugins + * + * @param Screen Width + * @desc スクリーンの横幅を調整します . + * Default: 816 + * @default 816 + * + * @param Screen Height + * @desc スクリーンの縦幅を調整します . + * Default: 624 + * @default 624 + * + * @help + * パラメータを調整して、ゲームスクリーンの解像度を変更することができます。 + * + */ + + +//============================================================================= + +Yanfly.Parameters = PluginManager.parameters('ScreenResolution'); + +//============================================================================= +// Scene_Manager +//============================================================================= + +SceneManager._screenWidth = Number(Yanfly.Parameters['Screen Width'] || 816); +SceneManager._screenHeight = Number(Yanfly.Parameters['Screen Height'] || 624); +SceneManager._boxWidth = Number(Yanfly.Parameters['Screen Width'] || 816); +SceneManager._boxHeight = Number(Yanfly.Parameters['Screen Height'] || 624); + +Yanfly.ScrRes.SceneManager_run = SceneManager.run; +SceneManager.run = function(sceneClass) { + Yanfly.ScrRes.SceneManager_run.call(this, sceneClass); + if (Utils.isMobileDevice()) return; + if (Utils.isMobileSafari()) return; + if (Utils.isAndroidChrome()) return; + var resizeWidth = Graphics.boxWidth - window.innerWidth; + var resizeHeight = Graphics.boxHeight - window.innerHeight; + window.moveBy(-1 * resizeWidth / 2, -1 * resizeHeight / 2); + window.resizeBy(resizeWidth, resizeHeight); +}; + +//============================================================================= +// End of File +//============================================================================= diff --git a/js/plugins/SwitchOnLoad.js b/js/plugins/SwitchOnLoad.js new file mode 100644 index 0000000..5cd400d --- /dev/null +++ b/js/plugins/SwitchOnLoad.js @@ -0,0 +1,38 @@ +//============================================================================= +// SwitchOnLoad.js +//============================================================================= + +/*: + * @plugindesc Turns ON the specified switch when loading a game. + * @author Yoji Ojima + * + * @param Switch ID + * @desc The ID of the switch to be turned ON when loading a game. + * @default 0 + * + * @help This plugin does not provide plugin commands. + */ + +/*:ja + * @plugindesc ゲームをロードしたときに指定のスイッチをONにします。 + * @author Yoji Ojima + * + * @param Variable ID + * @desc ゲームをロードしたときにONにするスイッチのIDです。 + * @default 0 + * + * @help このプラグインには、プラグインコマンドはありません。 + */ + +(function() { + + var parameters = PluginManager.parameters('SwitchOnLoad'); + var switchId = Number(parameters['Switch ID'] || 0); + + var _Scene_Load_onLoadSuccess = Scene_Load.prototype.onLoadSuccess; + Scene_Load.prototype.onLoadSuccess = function() { + _Scene_Load_onLoadSuccess.call(this); + $gameSwitches.setValue(switchId, true); + }; + +})(); diff --git a/js/plugins/TextDecoration.js b/js/plugins/TextDecoration.js new file mode 100644 index 0000000..d00e303 --- /dev/null +++ b/js/plugins/TextDecoration.js @@ -0,0 +1,87 @@ +//============================================================================= +// TextDecoration.js +//============================================================================= + +/*: + * @plugindesc Changes the decoration method for window texts. + * @author Yoji Ojima + * + * @param Mode + * @desc The decoration mode. 0: Outline, 1: Shadow + * @default 0 + * + * @param Red + * @desc The R value of the decoration color. (0-255) + * @default 0 + * + * @param Green + * @desc The G value of the decoration color. (0-255) + * @default 0 + * + * @param Blue + * @desc The B value of the decoration color. (0-255) + * @default 0 + * + * @param Alpha + * @desc The opacity of the decoration. (0-255) + * @default 128 + * + * @help This plugin does not provide plugin commands. + */ + +/*:ja + * @plugindesc ウィンドウテキストの装飾方法を変更します。 + * @author Yoji Ojima + * + * @param Mode + * @desc 装飾モードです。0: 縁取り、1: 影 + * @default 0 + * + * @param Red + * @desc 装飾色のR値です。(0-255) + * @default 0 + * + * @param Green + * @desc 装飾色のG値です。(0-255) + * @default 0 + * + * @param Blue + * @desc 装飾色のB値です。(0-255) + * @default 0 + * + * @param Alpha + * @desc 装飾色の不透明度です。(0-255) + * @default 128 + * + * @help このプラグインには、プラグインコマンドはありません。 + */ + +(function() { + + var parameters = PluginManager.parameters('TextDecoration'); + var mode = Number(parameters['Mode'] || 0); + var red = Number(parameters['Red'] || 0); + var green = Number(parameters['Green'] || 0); + var blue = Number(parameters['Blue'] || 0); + var alpha = Number(parameters['Alpha'] || 128); + + var _Window_Base_resetFontSettings = Window_Base.prototype.resetFontSettings; + Window_Base.prototype.resetFontSettings = function() { + _Window_Base_resetFontSettings.call(this); + this.contents.outlineColor = + 'rgba(%1,%2,%3,%4)'.format(red, green, blue, alpha / 255); + this.contents.decorationMode = mode; + }; + + var _Bitmap_drawTextOutline = Bitmap.prototype._drawTextOutline; + Bitmap.prototype._drawTextOutline = function(text, tx, ty, maxWidth) { + if (this.decorationMode === 1) { + var context = this._context; + context.fillStyle = this.outlineColor; + context.fillText(text, tx + 2, ty + 2, maxWidth); + } else { + _Bitmap_drawTextOutline.call(this, text, tx, ty, maxWidth); + } + }; + +})(); diff --git a/js/plugins/TinyGetInfoWnd.js b/js/plugins/TinyGetInfoWnd.js new file mode 100644 index 0000000..fba1f4c --- /dev/null +++ b/js/plugins/TinyGetInfoWnd.js @@ -0,0 +1,817 @@ +//============================================================================= +// TinyGetInfoWnd.js Ver1.1.1 +//============================================================================= +// [Release Note] +// 2015 Nov 15 : Ver1.0.0 - First Release +// 2017 Mar 01 : Ver1.1.0 - Update several specifications +// 2018 Aug 25 : Ver1.1.1 - Enable to set duration of info window + +/*: + * @plugindesc Display tiny window of gaining/losing items info(Ver 1.1.1) + * @author Sasuke KANNAZUKI (thx to Momomaru) + * + * @param Event Command Switch + * @desc If the switch on, display window when change an item number by an + * event command + * @default 104 + * + * @param Y position type + * @desc Windows' position. 0:top 1:bottom + * @default 0 + * + * @param Window Duration + * @desc How many frames to display the info window (1sec=60frames, default=200) + * @default 200 + * + * @param Display Loss + * @desc Whether display item loss (1:display 0:not display) + * @default 1 + * + * @param Display at Battle + * @desc Whether display not only map also at battle(1: yes 0:no) + * @defalut 1 + * + * @param textGainItem + * @desc title text display on the window when gain item(s). + * %1 is replaced to the item's kind(weapon/armor/item/money). + * @default You got %1 + * + * @param textLoseItem + * @desc title text display on the window when lose item(s). + * %1 is replaced to the item's kind(weapon/armor/item/money). + * @default You lost %1 + * + * @param wordMoney + * @desc the word that represents the kind 'money' + * @default money + * + * @param iconMoney + * @desc the icon ID that represents the kind 'money' + * @default 360 + * + * @param Item SE filename + * @desc the filename of the SE that plays when you gain item(s). + * note: It doesn't play when you lose item(s). + * @default Chime2 + * @require 1 + * @dir audio/se/ + * @type file + * + * @param Item SE volume + * @desc the volume of the SE that plays when you gain item(s). + * @default 90 + * + * @param Item SE pitch + * @desc the pitch of the SE that plays when you gain item(s). + * @default 100 + * + * @param Weapon SE filename + * @desc the filename of the SE that plays when you gain weapon(s). + * note: It doesn't play when you lose weapon(s). + * @default Equip1 + * @require 1 + * @dir audio/se/ + * @type file + * + * @param Weapon SE volume + * @desc the volume of the SE that plays when you gain weapon(s). + * @default 100 + * + * @param Weapon SE pitch + * @desc the pitch of the SE that plays when you gain weapon(s). + * @default 100 + * + * @param Armor SE filename + * @desc the filename of the SE that plays when you gain armor(s). + * note: It doesn't play when you lose armor(s). + * @default Evasion2 + * @require 1 + * @dir audio/se/ + * @type file + * + * @param Armor SE volume + * @desc the volume of the SE that plays when you gain armor(s). + * @default 100 + * + * @param Armor SE pitch + * @desc the pitch of the SE that plays when you gain armor(s). + * @default 100 + * + * @param Money SE filename + * @desc the filename of the SE that plays when you gain money. + * note: It doesn't play when you lose money. + * @default Coin + * @require 1 + * @dir audio/se/ + * @type file + * + * @param Money SE volume + * @desc the volume of the SE that plays when you gain money. + * @default 100 + * + * @param Money SE pitch + * @desc the pitch of the SE that plays when you gain money. + * @default 100 + * @help + * Plugin Commands: + * TinyGetInfoWnd duration arg1 + * Change the info window duration to arg1 frames. + * At default, duration is 200 frames. + * ex. + * TinyGetInfoWnd duration 200 # set the default duration + * TinyGetInfoWnd duration 300 # set 300 frames + * TinyGetInfoWnd duration V1 # set the number of variable #1. + * + * TinyGetInfoWnd arg0 arg1 arg2 arg3 + * arg0 must be 'item', 'weapon', 'armor', or 'money'. + * arg1 must be the ID of the item(or equipment), (when money, the value), + * or 'V' + number(ex. 'V20') where the number is the variable ID for item ID. + * arg2 must be 'gain' or 'lose'. (default value is 'gain'). + * at 'money', this is ignored. + * arg3 must be the number of gain/lose. (defalut value is 1). + * at 'money', this is ignored. + * (arg3 also accepts the same notation as the arg1 like 'V15') + * ex. + * TinyGetInfoWnd weapon 14 gain 2 # gain 2 weapons whose id is 14. + * TinyGetInfoWnd armor 20 lose 1 # lose an armor whose id is 20. + * (if you equip the armor, it will not be lost.) + * TinyGetInfoWnd item 7 # gain an item whose id is 7. + * (default value, arg2='gain' and arg3='1' is applied.) + * TinyGetInfoWnd item V10 gain 3 # gain 3 items whose ID is variable #10. + * TinyGetInfoWnd money 100 # gain 100G + * TinyGetInfoWnd money -100 # lose 100G + * + * note description: + * : the_explanation is displayed when gain or lose + * the item. If it isn't written down, the first line of the item's + * description is displayed. + * + * Item lost is not more than the party has. + * When you have only 3 and execute 'lose 5' for the item, + * it will display 'lost 3'. + * When you have the item none, even if execute 'lose', do not display window. + * + * [Copyright] + * This plugin is based on a Momomaru's RGSS2 script specification. + * Thanks to Momomaru. + * + * [License] + * this plugin is released under MIT license. + * http://opensource.org/licenses/mit-license.php + * + */ +/*:ja + * @plugindesc アイテムの入手/消失を小さなウィンドウで表示します。(Ver1.1.1) + * @author 神無月サスケ (原案:ももまる) + * + * @param Event Command Switch + * @desc このスイッチがONの時、イベントコマンド「アイテム/武器/防具/所持金の増減」を行った時にウィンドウが表示されます + * @default 104 + * + * @param Y position type + * @desc 複数のウィンドウを並べる位置です。0:上部 1:下部 + * @default 0 + * + * @param Window Duration + * @desc ウィンドウを表示するフレーム数です。1秒=60フレーム。(デフォルト:200) + * @default 200 + * + * @param Display Loss + * @desc 消失時にウィンドウを表示するか (1:する 0:しない) + * @default 1 + * + * @param Display at Battle + * @desc 戦闘中にもウィンドウを表示するか(1:する 0:しない) + * @defalut 1 + * + * @param textGainItem + * @desc アイテムを入手した時に表示するタイトルです。 + * %1がアイテム種別(アイテム/武器/防具/お金)に置き換わります。 + * @default %1入手! + * + * @param textLoseItem + * @desc アイテムを消失した時に表示するタイトルです。 + * %1がアイテム種別(アイテム/武器/防具/お金)に置き換わります。 + * @default %1消失……。 + * + * @param wordMoney + * @desc アイテム種別の「お金」をあらわす文字列です + * @default お金 + * + * @param iconMoney + * @desc お金入手/消失時に表示するアイコンIDです + * @default 360 + * + * @param Item SE filename + * @desc アイテムを入手した時に演奏されるSEのファイル名です。 + * 注意:消失した時は演奏されません。 + * @default Evasion1 + * @require 1 + * @dir audio/se/ + * @type file + * + * @param Item SE volume + * @desc アイテムを入手した時に演奏されるSEのボリュームです。 + * @default 100 + * + * @param Item SE pitch + * @desc アイテムを入手した時に演奏されるSEのピッチです。 + * @default 100 + * + * @param Weapon SE filename + * @desc 武器を入手した時に演奏されるSEのファイル名です。 + * 注意:消失した時は演奏されません。 + * @default Equip1 + * @require 1 + * @dir audio/se/ + * @type file + * + * @param Weapon SE volume + * @desc 武器を入手した時に演奏されるSEのボリュームです。 + * @default 100 + * + * @param Weapon SE pitch + * @desc 武器を入手した時に演奏されるSEのピッチです。 + * @default 100 + * + * @param Armor SE filename + * @desc 防具を入手した時に演奏されるSEのファイル名です。 + * 注意:消失した時は演奏されません。 + * @default Evasion2 + * @require 1 + * @dir audio/se/ + * @type file + * + * @param Armor SE volume + * @desc 防具を入手した時に演奏されるSEのボリュームです。 + * @default 100 + * + * @param Armor SE pitch + * @desc 防具を入手した時に演奏されるSEのピッチです。 + * @default 100 + * + * @param Money SE filename + * @desc お金を入手した時に演奏されるSEのファイル名です。 + * 注意:消失した時は演奏されません。 + * @default Coin + * @require 1 + * @dir audio/se/ + * @type file + * + * @param Money SE volume + * @desc お金を入手した時に演奏されるSEのボリュームです。 + * @default 100 + * + * @param Money SE pitch + * @desc お金を入手した時に演奏されるSEのピッチです。 + * @default 100 + * + * @help + * プラグインコマンドの書式: + * TinyGetInfoWnd duration arg1 + * ウィンドウの表示フレーム数を変更します(1秒=60フレーム)。 + * デフォルトでは200フレームです。 + * ex. + * TinyGetInfoWnd duration 200 # 200フレームにセット + * TinyGetInfoWnd duration 300 # 300フレームにセット + * TinyGetInfoWnd duration V1 # 変数1番の値にセット + * + * TinyGetInfoWnd arg0 arg1 arg2 arg3 + * arg0 は item, weapon, armor, money のいずれかにします。 + * arg1 は アイテム(または武器防具)のID、(お金の時は金額) + * または V20 のようにVで始まる数字にします。 + * 後者の場合数字の番号(ここでは20)の変数の値がID(または金額)になります。 + * arg2 は gain, lose のいずれかにします。(省略時はgain) + * お金の時は指定しません。 + * arg3 は 個数にします。(省略時は1, arg2を省略してarg3を書くことは出来ません) + * お金の時は指定しません。 + * (arg3 でも arg1 と同等の、V15 のような Vで始まる記法が利用可能です) + * ex. + * TinyGetInfoWnd weapon 14 gain 2 # ID14の武器を2個得る。 + * TinyGetInfoWnd armor 20 lose 1 # ID20の鎧を1個失う + * (ただし装備していた場合は失わない) + * TinyGetInfoWnd item 7 # ID7のアイテムを1個得る。 + * (パラメータを省略したので、arg2はgainに、arg3は1になります。) + * TinyGetInfoWnd item V10 gain 3 # 変数10番の値のIDのアイテムを3個得る。 + * TinyGetInfoWnd money 100 # 100G入手 + * TinyGetInfoWnd money -100 # 100G失う + * + * メモの書式: + * : the_explanation の文章が、アイテムの説明として + * 入手/消失時に表示されます。省略した場合は、アイテムの説明の1行目が + * 表示されます。 + * + * アイテムの消失は、所持している数に関連します。 + * 例えば5個消失コマンドを実行して、3個しか持っていない場合「3個消失」と + * 表示されます。また、該当アイテムをひとつも持っていない場合は、 + * 消失ウィンドウは表示されません。 + * + * ■謝辞 + * このプラグインは、ももまる様のRGSS2素材の仕様をベースに作られました。 + * ももまる様に謝意を示します。 + * + * ■ライセンス表記 + * このプラグインは MIT ライセンスで配布されます。 + * ご自由にお使いください。 + * http://opensource.org/licenses/mit-license.php + * + */ + +(function() { + // + // process parameters + // + var parameters = PluginManager.parameters('TinyGetInfoWnd'); + var dispSwitchID = Number(parameters['Event Command Switch'] || 22); + var yPosType = Number(parameters['Y position type'] || 1); + var wndDuration = Number(parameters['Window Duration'] || 200); + var isDisplayLoss = !!Number(parameters['Display Loss']); + var isDisplayBattle = !!Number(parameters['Display at Battle']); + var wordMoney = parameters['wordMoney'] || 'money'; + var iconMoney = Number(parameters['iconMoney'] || 360); + var textGainItem = parameters['textGainItem'] || 'You got %1'; + var textLoseItem = parameters['textLoseItem'] || 'You lost %1'; + var seFilename = parameters['Item SE filename'] || 'Evasion1'; + var seVolume = Number(parameters['Item SE volume'] || 100); + var sePitch = Number(parameters['Item SE pitch'] || 100); + var seWeaponFilename = parameters['Weapon SE filename'] || 'Equip1'; + var seWeaponVolume = Number(parameters['Weapon SE volume'] || 100); + var seWeaponPitch = Number(parameters['Weapon SE pitch'] || 100); + var seArmorFilename = parameters['Armor SE filename'] || 'Evasion2'; + var seArmorVolume = Number(parameters['Armor SE volume'] || 100); + var seArmorPitch = Number(parameters['Armor SE pitch'] || 100); + var seMoneyFilename = parameters['Money SE filename'] || 'Coin'; + var seMoneyVolume = Number(parameters['Money SE volume'] || 100); + var seMoneyPitch = Number(parameters['Money SE pitch'] || 100); + + // + // process plugin commands + // + var _Game_Interpreter_pluginCommand = + Game_Interpreter.prototype.pluginCommand; + Game_Interpreter.prototype.pluginCommand = function(command, args) { + _Game_Interpreter_pluginCommand.call(this, command, args); + if (command === 'TinyGetInfoWnd') { + // find args[1] + var itemId = 0; + var reg = (/^V([0-9]+)/i).exec(args[1]); + if(reg){ + itemId = $gameVariables.value(Number(reg[1])) || 0; + } else { + itemId = Number(args[1]) || 0; + } + // find args[3] + var itemNumber = 0; + reg = (/^V([0-9]+)/i).exec(args[3]); + if(reg){ + itemNumber = $gameVariables.value(Number(reg[1])) || 1; + } else { + itemNumber = Number(args[3]) || 1; + } + // get current spriteset + var spriteSet = null; + if(!$gameParty.inBattle() || isDisplayBattle){ + spriteSet = SceneManager._scene._spriteset; + } + // parse parameters + switch(args[0]) { + case 'duration': + $gameSystem.tinyWndDuration = itemId; + break; + case 'item': + if(!!$dataItems[itemId] && !!spriteSet) { + switch(args[2]) { + case 'gain': + case undefined: + // gain item process + var text = textGainItem.format(TextManager.item); + spriteSet.addGetInfoWindow(itemId, 0, text, itemNumber); + break; + case 'lose': + // lose item process + var text = textLoseItem.format(TextManager.item); + spriteSet.addGetInfoWindow(itemId, 0, text, -itemNumber); + break; + } + } + break; + case 'weapon': + if(!!$dataWeapons[itemId] && !!spriteSet) { + switch(args[2]) { + case 'gain': + case undefined: + // gain weapon process + var text = textGainItem.format(TextManager.weapon); + spriteSet.addGetInfoWindow(itemId, 1, text, itemNumber); + break; + case 'lose': + // lose weapon process + var text = textLoseItem.format(TextManager.weapon); + spriteSet.addGetInfoWindow(itemId, 1, text, -itemNumber); + break; + } + } + break; + case 'armor': + if(!!$dataArmors[itemId] && !!spriteSet) { + switch(args[2]) { + case 'gain': + case undefined: + // gain armor process + var text = textGainItem.format(TextManager.armor); + spriteSet.addGetInfoWindow(itemId, 2, text, itemNumber); + break; + case 'lose': + // lose armor process + var text = textLoseItem.format(TextManager.armor); + spriteSet.addGetInfoWindow(itemId, 2, text, -itemNumber); + break; + } + } + break; + case 'money': + if(!!spriteSet) { + var text; + if(itemId >= 0) { + text = textGainItem.format(wordMoney); + } else { + text = textLoseItem.format(wordMoney); + } + spriteSet.addGetInfoWindow(0, 3, text, itemId); + } + } + } + }; + + // + // set variables + // + var _Game_Temp_initialize = Game_Temp.prototype.initialize; + Game_Temp.prototype.initialize = function() { + _Game_Temp_initialize.call(this); + this.getInfoOccupied = []; + }; + + // + // process spriteset + // + var _Spriteset_Base_initialize = Spriteset_Base.prototype.initialize; + Spriteset_Base.prototype.initialize = function () { + this.getInfoWndFactory = []; + this.getInfoWnds = []; + $gameTemp.getInfoOccupied = []; + _Spriteset_Base_initialize.call(this); + }; + + Spriteset_Base.prototype.createInfoWindow = function(id, type, text, value) { + if(this.getInfoWndFactory.length > 0) { + return this.getInfoWndFactory.shift().setup(id, type, text, value); + } else { + return new Window_GetInfo(id, type, text, value); + } + }; + + Spriteset_Base.prototype.addGetInfoWindow = function(id, type, text, value) { + var window = this.createInfoWindow(id, type, text, value); + this.getInfoWnds.push(window); + SceneManager._scene.addChild(window); + }; + + Spriteset_Base.prototype.removeGetInfoWindow = function(window) { + $gameTemp.getInfoOccupied[window.index] = null; + SceneManager._scene.removeChild(window); + this.getInfoWndFactory.push(window.reset()); + }; + + Spriteset_Base.prototype.removeAllGetInfoWindows = function() { + for(var i = 0; i < this.getInfoWnds.length; i++) { + this.removeGetInfoWindow(this.getInfoWnds[i]); + } + this.getInfoWnds = []; + }; + + var _Spriteset_Base_update = Spriteset_Base.prototype.update; + Spriteset_Base.prototype.update = function() { + _Spriteset_Base_update.call(this); + this.updateGetInfoWindow(); + }; + + Spriteset_Base.prototype.updateGetInfoWindow = function() { + var s = this; + this.getInfoWnds = this.getInfoWnds.filter(function (window) { + if (window.needDispose()) { + s.removeGetInfoWindow(window); + return false; + } + return true; + }); + }; + + // + // delete all tiny windows before battle + // + var _Scene_Map_startEncounterEffect = + Scene_Map.prototype.startEncounterEffect; + Scene_Map.prototype.startEncounterEffect = function() { + this._spriteset.removeAllGetInfoWindows(); + _Scene_Map_startEncounterEffect.call(this); + }; + + // ------------------------------------------------------------------------- + // Window_GetInfo + // + // The tiny window to display item gain/lose situation on map. + + function Window_GetInfo(){ + this.initialize.apply(this, arguments); + } + + Window_GetInfo.prototype = Object.create(Window_Base.prototype); + Window_GetInfo.prototype.constructor = Window_GetInfo; + + Window_GetInfo.prototype.initialize = function(id, type, text, value) { + Window_Base.prototype.initialize.call(this, -24, 0, 864, 105); + this.reset(); + this.setup(id, type, text, value); + }; + + Window_GetInfo.prototype.reset = function() { + this.disposed = false; + this.opacity = 0; + this.backOpacity = 0; + this.contentsOpacity = 0; + this.count = 0; + this.contents.clear(); + if ($gameSystem.tinyWndDuration != null) { + wndDuration = $gameSystem.tinyWndDuration; + } + return this; + }; + + Window_GetInfo.prototype.setup = function(id, type, text, value) { + value = this.getRealValue(type, id, value); + this.gainItem(type, id, value); + this.setPosition(value); + this.drawContents(id, type, text, value); + this.playSE(type, value); + this.update(); + return this; + }; + + Window_GetInfo.prototype.determineItem = function(type, id) { + var data = ''; + switch(type) { + case 0: + data = $dataItems[id]; + break; + case 1: + data = $dataWeapons[id]; + break; + case 2: + data = $dataArmors[id]; + break; + } + return data; + }; + + Window_GetInfo.prototype.description = function(data) { + if(data.meta.info) { + return data.meta.info; + } + return data.description.replace(/[\r\n]+.*/m, ""); + }; + + Window_GetInfo.prototype.getRealValue = function(type, id, value) { + var data = this.determineItem(type, id); + // check number (whether the party has the number of item to lose) + if(type >= 0 && type <= 2) { + if(value < 0) { + if(-value > $gameParty.numItems(data)){ + value = -$gameParty.numItems(data); + } + } + } else if (type === 3) { + if(value < 0) { + if(-value > $gameParty.gold()){ + value = -$gameParty.gold(); + } + } + } + return value; + }; + + Window_GetInfo.prototype.gainItem = function(type, id, value) { + var data = this.determineItem(type, id); + if(type >= 0 && type <= 2) { + $gameParty.gainItem(data, value); + } else if(type === 3) { + $gameParty.gainGold(value); + } + }; + + Window_GetInfo.prototype.setPosition = function(value) { + if (value === 0 || (value < 0 && !isDisplayLoss)) { + return; + } + this.index = $gameTemp.getInfoOccupied.indexOf(null); + if(this.index === -1) { + this.index = $gameTemp.getInfoOccupied.length; + } + $gameTemp.getInfoOccupied[this.index] = true; + // set Y position + if(yPosType === 0){ + this.y = this.index * 60; + } else { + this.y = 520 - (this.index * 60); + } + }; + + Window_GetInfo.prototype.drawContents = function(id, type, text, value) { + if (value === 0 || (value < 0 && !isDisplayLoss)) { + return; + } + var data = this.determineItem(type, id); + // fill background + this.contents.paintOpacity = 160; + this.contents.fontSize = 28; + this.contents.fillRect(0, 21, 816, 36, '#000000'); + // draw item name, number, description + if(type >= 0 && type <= 2) { + this.contents.paintOpacity = 255; + this.changeTextColor(this.normalColor()); + if(value < 0){ + this.contents.paintOpacity = 160; + } + this.drawItemName(data, 6, 21, 300); + this.drawText('\xd7', 306, 21, 24, 'center'); + this.drawText(String(Math.abs(value)), 330, 21, 32, 'right'); + this.changeTextColor(this.normalColor()); + this.drawText(this.description(data), 384, 21, 432, 'left'); + } else if (type === 3) { + this.contents.paintOpacity = 255; + this.changeTextColor(this.normalColor()); + if(value < 0){ + this.contents.paintOpacity = 160; + } + this.drawIcon(iconMoney, 6, 21); + var mainText = String(Math.abs(value)) + $dataSystem.currencyUnit; + this.drawText(mainText, 44, 21, 180, 'right'); + } + // draw guide string + this.contents.paintOpacity = 160; + this.contents.fontSize = 20; + this.contents.fillRect(0, 0, this.textWidth(text) + 6, 22, '#000000'); + this.contents.paintOpacity = 255; + this.changeTextColor(this.normalColor()); + this.drawText(text, 6, -8, 510, 'left'); + }; + + Window_GetInfo.prototype.playSE = function(type, value) { + if (value <= 0) { // play when gain, not play when lose. + return; + } + switch(type) { + case 0: // item + if(seFilename) { + var audio = {name:seFilename, volume:seVolume, pitch:sePitch}; + AudioManager.playSe(audio); + } + break; + case 1: // weapon + if(seWeaponFilename) { + var audio = {name:seWeaponFilename, volume:seWeaponVolume, + pitch:seWeaponPitch}; + AudioManager.playSe(audio); + } + break; + case 2: // armor + if(seArmorFilename) { + var audio = {name:seArmorFilename, volume:seArmorVolume, + pitch:seArmorPitch}; + AudioManager.playSe(audio); + } + break; + case 3: // money + if(seMoneyFilename) { + var audio = {name:seMoneyFilename, volume:seMoneyVolume, + pitch:seMoneyPitch}; + AudioManager.playSe(audio); + } + break; + default: // not supported + break; + } + }; + + Window_GetInfo.prototype.update = function() { + Window_Base.prototype.update.call(this); + if(++this.count < wndDuration) { + this.contentsOpacity += 32; + } else { + if(yPosType === 0){ + this.y -= 2; + } else { + this.y += 2; + } + this.contentsOpacity -= 32; + } + }; + + Window_GetInfo.prototype.needDispose = function() { + return this.contentsOpacity === 0; + }; + + // + // interpreter commands + // *** note *** : To prevent multiple exection of operateValue, + // not to alias but overwriting functions. + + + // Change Gold + Game_Interpreter.prototype.command125 = function() { + var value = this.operateValue(this._params[0], this._params[1], + this._params[2]); + if ($gameSwitches.value(dispSwitchID) && + (!$gameParty.inBattle() || isDisplayBattle) && + value != 0) { + var text = ''; + var spriteSet = SceneManager._scene._spriteset; + if(value > 0){ + text = textGainItem.format(wordMoney); + } else { + text = textLoseItem.format(wordMoney); + } + spriteSet.addGetInfoWindow(0, 3, text, value); + } else { + $gameParty.gainGold(value); + } + return true; + }; + + + // Change Items + Game_Interpreter.prototype.command126 = function() { + var value = this.operateValue(this._params[1], this._params[2], + this._params[3]); + if($gameSwitches.value(dispSwitchID) && + (!$gameParty.inBattle() || isDisplayBattle) && + value != 0) { + var text = ''; + var spriteSet = SceneManager._scene._spriteset; + if(value > 0){ + text = textGainItem.format(TextManager.item); + } else { + text = textLoseItem.format(TextManager.item); + } + spriteSet.addGetInfoWindow(this._params[0], 0, text, value); + } else { + $gameParty.gainItem($dataItems[this._params[0]], value); + } + return true; + }; + + // Change Weapons + Game_Interpreter.prototype.command127 = function() { + var value = this.operateValue(this._params[1], this._params[2], + this._params[3]); + if($gameSwitches.value(dispSwitchID) && + (!$gameParty.inBattle() || isDisplayBattle) && + value != 0) { + var text = ''; + var spriteSet = SceneManager._scene._spriteset; + if(value > 0){ + text = textGainItem.format(TextManager.weapon); + } else { + text = textLoseItem.format(TextManager.weapon); + } + spriteSet.addGetInfoWindow(this._params[0], 1, text, value); + } else { + $gameParty.gainItem($dataWeapons[this._params[0]], value, + this._params[4]); + } + return true; + }; + + // Change Armors + Game_Interpreter.prototype.command128 = function() { + var value = this.operateValue(this._params[1], this._params[2], + this._params[3]); + if($gameSwitches.value(dispSwitchID) && + (!$gameParty.inBattle() || isDisplayBattle) && + value != 0) { + var text = ''; + var spriteSet = SceneManager._scene._spriteset; + if(value > 0){ + text = textGainItem.format(TextManager.armor); + } else { + text = textLoseItem.format(TextManager.armor); + } + spriteSet.addGetInfoWindow(this._params[0], 2, text, value); + } else { + $gameParty.gainItem($dataArmors[this._params[0]], value, + this._params[4]); + } + return true; + }; + +})(); diff --git a/js/plugins/WindowChange.js b/js/plugins/WindowChange.js new file mode 100644 index 0000000..d92b31a --- /dev/null +++ b/js/plugins/WindowChange.js @@ -0,0 +1,56 @@ +//============================================================================= +// WindowChange.js +//============================================================================= + +/*: + * @plugindesc Changes the windowskin image in the game. + * @author Yoji Ojima + * + * @help + * + * Plugin Command: + * WindowChange Window2 # Change windowskin to 'Window2.png' + */ + +/*:ja + * @plugindesc ゲーム内でウィンドウスキンを変更します。 + * @author Yoji Ojima + * + * @help + * + * プラグインコマンド: + * WindowChange Window2 # ウィンドウスキンを「Window2.png」に変更 + */ + +(function() { + + var parameters = PluginManager.parameters('WindowChange'); + + var _Game_Interpreter_pluginCommand = + Game_Interpreter.prototype.pluginCommand; + Game_Interpreter.prototype.pluginCommand = function(command, args) { + _Game_Interpreter_pluginCommand.call(this, command, args); + if (command === 'WindowChange') { + var name = String(args[0] || 'Window'); + $gameSystem.windowskinName = name; + ImageManager.loadSystem(name); + this.setWaitMode('image'); + } + }; + + Window_Base.prototype.loadWindowskin = function() { + this._windowskinName = $gameSystem.windowskinName || 'Window'; + this.windowskin = ImageManager.loadSystem(this._windowskinName); + }; + + var _Window_Base_update = Window_Base.prototype.update; + Window_Base.prototype.update = function() { + _Window_Base_update.call(this); + if ($gameSystem.windowskinName) { + if (this._windowskinName !== $gameSystem.windowskinName) { + this.loadWindowskin(); + } + } + }; + +})(); diff --git a/js/plugins/WindowIdentifier.js b/js/plugins/WindowIdentifier.js new file mode 100644 index 0000000..bcc26a9 --- /dev/null +++ b/js/plugins/WindowIdentifier.js @@ -0,0 +1,76 @@ +//============================================================================= +// Window Identifier +// by Shaz (based on Ace script by Rhyme) +// Last Updated: 2015.11.18 +//============================================================================= + +/*: + * @plugindesc Shows the name of the windows while holding CTRL. + * @author Shaz, Rhyme + * + * @param Font Size + * @desc Font Size for window names + * @default 28 + * + * @param Font Color + * @desc Color of text for window names (based on windowskin) + * @default 0 + * + * @help + * + * Hold the CTRL key in a scene to have window names pop up. + * Remember to disable this on your game's final release! + * + */ +/*:ja + * @plugindesc CTRLを押している間、ウィンドウ名を表示させます。 + * @author Shaz, Rhyme + * + * @param Font Size + * @desc ウィンドウ名のフォントサイズを指定します。 + * @default 28 + * + * @param Font Color + * @desc ウィンドウ名テキストのカラーを指定します。(ウィンドウスキンに基づく) + * @default 0 + * + * @help + * + * CTRLキーを押している間、ウィンドウ名がポップアップします。 + * テストプレイや前後のエディットに役立つプラグインです。 + * 特別なコマンドなどは不要で、プラグインをONにするだけで有効になります。 + * + * ゲームの最終版を配布する前に、消すのを忘れないようにしてくださいね! + * + */ + +(function() { + + var parameters = PluginManager.parameters('WindowIdentifier'); + var fontSize = parseInt(parameters['Font Size'] || 28); + var fontColor = parseInt(parameters['Font Color'] || 0); + + _Window_Base_createContents = Window_Base.prototype.createContents; + Window_Base.prototype.createContents = function() { + _Window_Base_createContents.call(this); + if (!this._windowName) { + this._windowName = new Sprite(); + this._windowName.bitmap = new Bitmap(500, this.lineHeight()); + this._windowName.bitmap.fontSize = fontSize; + this._windowName.bitmap.textColor = fontColor; + this._windowName.bitmap.drawText(this.constructor.toString().match(/function (\w*)/)[1], this.standardPadding(), this.standardPadding(), 500, 0); + this.addChild(this._windowName); + this._windowName.opacity = 0; + } + }; + + _Window_Base_update = Window_Base.prototype.update; + Window_Base.prototype.update = function() { + _Window_Base_update.call(this); + if (Input.isPressed('control')) { + this._windowName.opacity += 16; + } else { + this._windowName.opacity -= 16; + } + }; +})(); diff --git a/js/plugins/YED_AuraState.js b/js/plugins/YED_AuraState.js new file mode 100644 index 0000000..c588163 --- /dev/null +++ b/js/plugins/YED_AuraState.js @@ -0,0 +1,324 @@ +/*: + * Yami Engine Delta - Aura State + * + * @plugindesc v1.0.0 This plugin allows user to create an aura where nearby battlers will receive states based on the aura. + * @author Yami Engine Delta [Dr.Yami] + * + * @help + * States Notetags + * + * + * This aura will add state X to all allies. + * + * + * This aura will add state X to all enemies. + */ + +/** + * @namespace AuraState + * @memberof YED + */ + +var YED = YED || {}; + +// init AuraState module +YED.AuraState = {}; + +/* globals YED: false */ + +(function($AuraState) { + /** + * Enum for RegExp, used to notetags + * + * @readonly + * @enum {RegExp} + * @memberof YED.AuraState + */ + var Regexp = { + /** + * Aura for allies + */ + ALLIES_AURA: //i, + + /** + * Aura for enemies + */ + ENEMIES_AURA: //i + }; + + $AuraState.Regexp = Regexp; +}(YED.AuraState)); + +/* globals YED: false */ + +(function($AuraState) { + /** + * Shorten Dependencies + */ + var Regexp = $AuraState.Regexp; + + /** + * Contains utility tools for module. + * + * @namespace Utils + * @memberof YED.AuraState + */ + var Utils = {}; + + /** + * Process notetag function. + * Should be called with DataManager as current object. + * + * @function processNotetag + * @memberof YED.AuraState.Utils + */ + Utils.processNotetags = function() { + var group = $dataStates, // shorten group name + obj, + notedata, line; + + for (var i = 1; i < group.length; i++) { + obj = group[i]; + notedata = obj.note.split(/[\r\n]+/); + + Utils._processProperties.call(this, obj); + Utils._processMethods.call(this, obj); + + for (var n = 0; n < notedata.length; n++) { + line = notedata[n]; + Utils._processNotetag.call(this, obj, line); + } + } + }; + + /** + * Add new properties into object. + * + * @function _processProperties + * @memberof YED.AuraState.Utils + * @param {Object} obj Data object + * @private + */ + Utils._processProperties = function(obj) { + obj._auraState = {}; + + obj._auraState.allies = []; + obj._auraState.enemies = []; + }; + + /** + * Add new methods into object. + * + * @function _processMethods + * @memberof YED.AuraState.Utils + * @param {Object} obj Data object + * @private + */ + Utils._processMethods = function(obj) { + obj.getAuraState = Utils.getAuraState; + obj.isAuraState = Utils.isAuraState; + }; + + /** + * Process notetag for object. + * + * @function _processNotetag + * @memberof YED.AuraState.Utils + * @param {Object} obj Data object + * @param {String} notetag Notetag + * @private + */ + Utils._processNotetag = function(obj, notetag) { + var match; + + match = notetag.match(Regexp.ALLIES_AURA); + if (match) { + obj._auraState.allies.push(Number(match[1])); + } + + match = notetag.match(Regexp.ENEMIES_AURA); + if (match) { + obj._auraState.enemies.push(Number(match[1])); + } + }; + + /** + * Get aura state infos. + * + * @function getAuraState + * @memberof YED.AuraState.Utils + * @return {Object} + */ + Utils.getAuraState = function() { + return this._auraState; + }; + + /** + * Get aura state flag. + * + * @function isAuraState + * @memberof YED.AuraState.Utils + * @return {Boolean} + */ + Utils.isAuraState = function() { + return this._auraState.allies.length > 0 + || this._auraState.enemies.length > 0; + }; + + $AuraState.Utils = Utils; +}(YED.AuraState)); + +/* globals YED: false */ + +/** + * Pre-processes and notetag parsing + */ +(function($AuraState) { + /** + * Shorten Dependencies + */ + var Utils = $AuraState.Utils; + + /** + * Aliasing methods + */ + var _DataManager_isDatabaseLoaded = DataManager.isDatabaseLoaded; + + /** + * Extending: DataManager.isDatabaseLoaded + * + * Add notetags and parameters processing for module. + */ + DataManager.isDatabaseLoaded = function() { + var loaded = _DataManager_isDatabaseLoaded.call(this); + + if (!loaded) { + return false; + } + + Utils.processNotetags.call(DataManager); + + return true; + }; +}(YED.AuraState)); + +(function() { + /** + * Aliasing methods + */ + var _Game_Battler_initMembers + = Game_Battler.prototype.initMembers; + var _Game_Battler_refresh + = Game_Battler.prototype.refresh; + + Game_Battler.prototype.initMembers = function() { + _Game_Battler_initMembers.call(this); + + this._auraStates = []; + }; + + Game_Battler.prototype.auraStates = function() { + return this._auraStates.map(function(id) { + return $dataStates[id]; + }); + }; + + Game_Battler.prototype.updateAuraState = function() { + this._updateInactiveAura(); + this._updateActiveAura(); + }; + + Game_Battler.prototype._updateInactiveAura = function() { + var state, + ids = [], + index, + alliesAura, enemiesAura, + i; + + var removeStateParty = function(id) { + $gameParty.members().forEach(function(actor) { + actor.removeState(id); + }); + }; + + var removeStateTroop = function(id) { + $gameTroop.members().forEach(function(enemy) { + enemy.removeState(id); + }); + }; + + for (i = 0; i < this._auraStates.length; i++) { + if (this.isStateAffected(this._auraStates[i])) { + continue; + } + + state = $dataStates[this._auraStates[i]]; + + alliesAura = state.getAuraState().allies; + enemiesAura = state.getAuraState().enemies; + + alliesAura.forEach(removeStateParty); + enemiesAura.forEach(removeStateTroop); + + ids.push(this._auraStates[i]); + } + + for (i = 0; i < ids.length; i++) { + index = this._auraStates.indexOf(ids[i]); + + if (index > -1) { + this._auraStates.splice(index, 1); + } + } + }; + + Game_Battler.prototype._updateActiveAura = function() { + var states = this.states(), + alliesAura, enemiesAura, + state; + + var addStateParty = function(id) { + $gameParty.members().forEach(function(actor) { + actor.addState(id); + }); + }; + + var addStateTroop = function(id) { + $gameTroop.members().forEach(function(enemy) { + enemy.addState(id); + }); + }; + + for (var i = 0; i < states.length; i++) { + if (!states[i].isAuraState()) { + continue; + } + + if (this._auraStates.indexOf(states[i].id) > -1) { + continue; + } + + this._auraStates.push(states[i].id); + + state = states[i]; + + alliesAura = state.getAuraState().allies; + enemiesAura = state.getAuraState().enemies; + + alliesAura.forEach(addStateParty); + enemiesAura.forEach(addStateTroop); + } + }; + + Game_Battler.prototype.refresh = function() { + _Game_Battler_refresh.call(this); + + $gameParty.members().forEach(function(actor) { + actor.updateAuraState(); + }); + + $gameTroop.members().forEach(function(enemy) { + enemy.updateAuraState(); + }); + }; +}()); diff --git a/js/plugins/YED_EnemyPosition.js b/js/plugins/YED_EnemyPosition.js new file mode 100644 index 0000000..906cca2 --- /dev/null +++ b/js/plugins/YED_EnemyPosition.js @@ -0,0 +1,266 @@ +/*: + * Yami Engine Delta - Enemy Position + * + * @plugindesc v1.0.0 This plugin moves enemy sprites to certain positions or by offsets in battle. Works well for bigger resolution. + * @author Yami Engine Delta [Dr.Yami] + * + * @help + * Enemy Notetags + * + * To move enemy sprite to position X, use this notetag (with N is a number): + * + * + * To move enemy sprite to position Y, use this notetag (with N is a number): + * + * + * To move enemy sprite by an offset of X, use this notetag (with N is a number): + * + * + * To move enemy sprite by an offset of Y, use this notetag (with N is a number): + * + */ + +/** + * @namespace EnemyPosition + * @memberof YED + */ + +var YED = YED || {}; + +// init EnemyPosition module +YED.EnemyPosition = {}; + +/* globals YED: false */ + +(function($EnemyPosition) { + /** + * Enum for RegExp, used to notetags + * + * @readonly + * @enum {RegExp} + * @memberof YED.EnemyPosition + */ + var Regexp = { + /** + * Offset X + */ + POSITION_X: /<(?:Position X):[ ]*([-]?\d+)>/i, + + /** + * Offset X + */ + POSITION_Y: /<(?:Position Y):[ ]*([-]?\d+)>/i, + + /** + * Offset X + */ + OFFSET_X: /<(?:Position Offset X):[ ]*([-]?\d+)>/i, + + /** + * Offset Y + */ + OFFSET_Y: /<(?:Position Offset Y):[ ]*([-]?\d+)>/i + }; + + $EnemyPosition.Regexp = Regexp; +}(YED.EnemyPosition)); + +/* globals YED: false */ + +(function($EnemyPosition) { + /** + * Shorten Dependencies + */ + var Regexp = $EnemyPosition.Regexp; + + /** + * Contains utility tools for module. + * + * @namespace Utils + * @memberof YED.EnemyPosition + */ + var Utils = {}; + + /** + * Process notetag function. + * Should be called with DataManager as current object. + * + * @function processNotetag + * @memberof YED.EnemyPosition.Utils + */ + Utils.processNotetags = function() { + var group = $dataEnemies, // shorten group name + obj, + notedata, line; + + for (var i = 1; i < group.length; i++) { + obj = group[i]; + notedata = obj.note.split(/[\r\n]+/); + + Utils._processProperties.call(this, obj); + Utils._processMethods.call(this, obj); + + for (var n = 0; n < notedata.length; n++) { + line = notedata[n]; + Utils._processNotetag.call(this, obj, line); + } + } + }; + + /** + * Add new properties into object. + * + * @function _processProperties + * @memberof YED.EnemyPosition.Utils + * @param {Object} obj Data object + * @private + */ + Utils._processProperties = function(obj) { + obj._positionX = null; + obj._positionY = null; + + obj._positionOffsetX = 0; + obj._positionOffsetY = 0; + }; + + /** + * Add new methods into object. + * + * @function _processMethods + * @memberof YED.EnemyPosition.Utils + * @param {Object} obj Data object + * @private + */ + Utils._processMethods = function(obj) { + obj.getPosition = Utils.getPosition; + obj.getPositionOffsets = Utils.getPositionOffsets; + }; + + /** + * Process notetag for object. + * + * @function _processNotetag + * @memberof YED.EnemyPosition.Utils + * @param {Object} obj Data object + * @param {String} notetag Notetag + * @private + */ + Utils._processNotetag = function(obj, notetag) { + var match; + + match = notetag.match(Regexp.POSITION_X); + if (match) { + obj._positionX = Number(match[1]); + } + + match = notetag.match(Regexp.POSITION_Y); + if (match) { + obj._positionY = Number(match[1]); + } + + match = notetag.match(Regexp.OFFSET_X); + if (match) { + obj._positionOffsetX = Number(match[1]); + } + + match = notetag.match(Regexp.OFFSET_Y); + if (match) { + obj._positionOffsetY = Number(match[1]); + } + }; + + /** + * Get position. + * + * @function getPosition + * @memberof YED.EnemyPosition.Utils + * @return {Object} {x,y} + */ + Utils.getPosition = function() { + var result = {}; + + result.x = this._positionX; + result.y = this._positionY; + + return result; + }; + + /** + * Get position offsets. + * + * @function getPositionOffsets + * @memberof YED.EnemyPosition.Utils + * @return {Object} {x,y} + */ + Utils.getPositionOffsets = function() { + var result = {}; + + result.x = this._positionOffsetX; + result.y = this._positionOffsetY; + + return result; + }; + + $EnemyPosition.Utils = Utils; +}(YED.EnemyPosition)); + +/* globals YED: false */ + +/** + * Pre-processes and notetag parsing + */ +(function($EnemyPosition) { + /** + * Shorten Dependencies + */ + var Utils = $EnemyPosition.Utils; + + /** + * Aliasing methods + */ + var _DataManager_isDatabaseLoaded = DataManager.isDatabaseLoaded; + + /** + * Extending: DataManager.isDatabaseLoaded + * + * Add notetags and parameters processing for module. + */ + DataManager.isDatabaseLoaded = function() { + var loaded = _DataManager_isDatabaseLoaded.call(this); + + if (!loaded) { + return false; + } + + Utils.processNotetags.call(DataManager); + + return true; + }; +}(YED.EnemyPosition)); + +(function() { + var _Game_Enemy_screenX = Game_Enemy.prototype.screenX; + var _Game_Enemy_screenY = Game_Enemy.prototype.screenY; + + Game_Enemy.prototype.screenX = function() { + var result, + position = this.enemy().getPosition(), + offsets = this.enemy().getPositionOffsets(); + + result = position.x || _Game_Enemy_screenX.call(this); + result = result + offsets.x; + + return result; + }; + + Game_Enemy.prototype.screenY = function() { + var result, + position = this.enemy().getPosition(), + offsets = this.enemy().getPositionOffsets(); + + result = position.y || _Game_Enemy_screenY.call(this); + result = result + offsets.y; + + return result; + }; +}()); diff --git a/js/plugins/YED_Hospital.js b/js/plugins/YED_Hospital.js new file mode 100644 index 0000000..d8982d9 --- /dev/null +++ b/js/plugins/YED_Hospital.js @@ -0,0 +1,1317 @@ +/*: + * Yami Engine Delta - Hospital + * + * @plugindesc Provides hospital feature, where party spend their money for + * recovery. + * @author Yami Engine Delta [Dr.Yami] + * + * @param [Default Price] + * @default + * + * @param HP Price + * @desc Needed money for each missing HP point. + * @default 10 + * + * @param MP Price + * @desc Needed money for each missing MP point. + * @default 20 + * + * @param State Price + * @desc Needed money for removing each state. + * @default 100 + * + * @param [Visual Setting] + * @default + * + * @param Nurse Face + * @desc Nurse Face in Hospital Scene. + * Faceset, Index + * @default People4, 1 + * + * @param Nurse Name + * @desc Nurse Name, uses for displaying message. + * @default Loli + * + * @param Nurse Message + * @desc Nurse Greeting Message + * @default Hello,\nHow can I halp you? + * + * @param Heal One Help + * @desc Text to display on Help Window for Heal One command. + * @default Heals members individually. + * + * @param Heal All Help (Treat) + * @desc Text to display on Help Window for Heal All command if + * someone needs treatment. + * @default Heals all members at cost %1G. + * + * @param Heal All Help (Healthy) + * @desc Text to display on Help Window for Heal All command if the + * party is healthy. + * @default All members are healthy. + * + * @param Exit Help + * @desc Text to display on Help Window for Exit command. + * @default Go out. + * + * @param Actor Help (Treat) + * @desc Text to display on Help Window for actor selection if needs + * treatment. + * @default %1 needs treatment. + * + * @param Actor Help (Healthy) + * @desc Text to display on Help Window for actor selection if + * is healthy. + * @default %1 is healthy. + * + * @param Heal One Command + * @desc Text to display for Heal One Command. + * @default Heal One + * + * @param Heal All Command + * @desc Text to display for Heal All Command. + * @default Heal All + * + * @param Exit Command + * @desc Text to display for Exit Command. + * @default Exit + * + * @param Text Alignment + * @desc How to align the text for the command window. + * left center right + * @default center + * + * @help + * The following are Plugin Commands you may use with events. + * + * Plugin Command: + * OpenHospital Opens up the Hospital Scene from the field. + */ + +/** + * @namespace Hospital + * @memberof YED + */ +/*:ja + * Yami Engine Delta - Hospital + * + * @plugindesc パーティの回復、支払などの + * 病院機能を追加することができます。 + * @author Yami Engine Delta [Dr.Yami] + * + * @param [Default Price] + * @default + * + * @param HP Price + * @desc HPを1回復するためにかかる費用 + * @default 10 + * + * @param MP Price + * @desc MPを1回復するためにかかる費用 + * @default 20 + * + * @param State Price + * @desc 状態異常を回復するためにかかる費用 + * @default 100 + * + * @param [Visual Setting] + * @default + * + * @param Nurse Face + * @desc 病院のシーンで用いられるナースの顔グラフィック + * Faceset, Index + * @default People4, 1 + * + * @param Nurse Name + * @desc 表示されるナースの名前 + * @default Loli + * + * @param Nurse Message + * @desc ナースの挨拶のセリフ + * @default こんにちは、今日はどうされましたか? + * + * @param Heal One Help + * @desc 個別回復のヘルプウィンドウに表示されるテキスト + * @default メンバーを個別に回復させます + * + * @param Heal All Help (Treat) + * @desc 全員回復のヘルプウィンドウに表示されるテキスト + * @default %1Gを払ってメンバー全員を回復させます + * + * @param Heal All Help (Healthy) + * @desc 全員が回復不要な際、全員回復のヘルプウィンドウに表示されるテキスト + * @default 回復が必要なメンバーが居ません + * + * @param Exit Help + * @desc 退出時のヘルプウィンドウに表示されるテキスト + * @default 外に出る + * + * @param Actor Help (Treat) + * @desc 回復が必要なアクター選択時のヘルプウィンドウに表示されるテキスト + * @default %1は回復が必要だ + * + * @param Actor Help (Healthy) + * @desc 回復が不要なアクター選択時のヘルプウィンドウに表示されるテキスト + * @default %1は回復の必要はない + * + * @param Heal One Command + * @desc 個別回復のコマンドテキスト + * @default 1人を回復する + * + * @param Heal All Command + * @desc 全員回復のコマンドテキスト + * @default 全員を回復する + * + * @param Exit Command + * @desc 退出のコマンドテキスト + * @default Exit + * + * @param Text Alignment + * @desc コマンドウィンドウでのテキストの表示位置を調整します + * left(左) center(中央) right(右) + * @default center + * + * @help + * 以下は、イベントで使えるプラグインコマンドです。 + * + * Plugin Command: + * OpenHospital →フィールドから病院のシーンを開きます + */ + +/** + * @namespace Hospital + * @memberof YED + */ + + +var YED = YED || {}; + +// init Hospital module +YED.Hospital = {}; + +/** + * Contains Windows for module. + * + * @namespace Windows + * @memberof YED.Hospital + */ +YED.Hospital.Windows = {}; + +/** + * Contains Scenes for module. + * + * @namespace Scenes + * @memberof YED.Hospital + */ +YED.Hospital.Scenes = {}; + +/* globals YED: false */ + +(function() { + /** + * Contains utility tools for module. + * + * @namespace Utils + * @memberof YED.Hospital + */ + var Utils = {}; + + /** + * Contains module parsed parameters. + * + * @type {Object} + * @memberOf YED.Hospital.Utils + */ + Utils.parameters = {}; + + /** + * Process parameters function. + * Should be called with DataManager as current object. + * + * @function processParameters + * @memberof YED.Hospital.Utils + */ + Utils.processParameters = function() { + var parameters = PluginManager.parameters('YED_Hospital'), + result = Utils.parameters, + nurseFaceStr = String(parameters['Nurse Face'] || 'People4, 1'), + nurseFace = []; + + nurseFace = nurseFaceStr.split(','); + + result['HP Price'] = + Number(parameters['HP Price'] || 0); + result['MP Price'] = + Number(parameters['MP Price'] || 0); + result['State Price'] = + Number(parameters['State Price'] || 0); + + result['Nurse Face'] = + [nurseFace[0], Number(nurseFace[1])]; + result['Nurse Name'] = + String(parameters['Nurse Name'] || 'Nurse'); + result['Nurse Message'] = + String(parameters['Nurse Message'] || 'Hello!'); + + result['Heal One Help'] = + String(parameters['Heal One Help'] || ''); + result['Heal All Help (Treat)'] = // + String(parameters['Heal All Help (Treat)'] || ''); + result['Heal All Help (Healthy)'] = // + String(parameters['Heal All Help (Healthy)'] || ''); + result['Exit Help'] = + String(parameters['Exit Help'] || ''); + + result['Actor Help (Treat)'] = + String(parameters['Actor Help (Treat)'] || ''); + result['Actor Help (Healthy)'] = + String(parameters['Actor Help (Healthy)'] || ''); + + result['Heal One Command'] = + String(parameters['Heal One Command'] || 'Heal One'); + result['Heal All Command'] = + String(parameters['Heal All Command'] || 'Heal All'); + result['Exit Command'] = + String(parameters['Exit Command'] || 'Exit'); + + result['Text Alignment'] = + String(parameters['Text Alignment'] || 'center'); + result['Text Alignment'] = result['Text Alignment'].toLowerCase(); + }; + + /** + * Go to Hospital Scene. + * Should be called with Game_Interpreter object as current object. + * + * @function gotoHospitalScene + * @memberof YED.Hospital.Utils + */ + Utils.gotoHospitalScene = function() { + var scene = YED.Hospital.Scenes.Hospital; + + SceneManager.push(scene); + }; + + YED.Hospital.Utils = Utils; +}()); + +/* globals YED: false */ + +/** + * Pre-processes and notetag parsing + */ +(function() { + // shorten dependencies + var Utils = YED.Hospital.Utils; + // Aliasing: Scene_Boot.start + var _Scene_Boot_start = Scene_Boot.prototype.start; + + /** + * Extending: Scene_Boot.prototype.start + * + * Add notetags processing for module. + */ + Scene_Boot.prototype.start = function() { + _Scene_Boot_start.call(this); + + Utils.processParameters.call(DataManager); + }; +}()); + +/* globals YED: false */ + +(function() { + /** + * Shorten Dependencies + */ + var Utils = YED.Hospital.Utils; + + /** + * Calculate hospital fees for actor. + * + * @function external:Game_Actor#hospitalFee + * @return {number} Total hospital fees + */ + Game_Actor.prototype.hospitalFee = function() { + var lostHp = Math.max(this.mhp - this._hp, 0), + lostMp = Math.max(this.mmp - this._mp, 0), + fee = 0, + states = this.getHospitalStates(); + + fee = lostHp * this.getHospitalHpFeeRate(); + fee += lostMp * this.getHospitalMpFeeRate(); + + for (var i = 0; i < states.length; i++) { + fee += this.getHospitalStateFeeRate(states[i].id); + } + + return fee; + }; + + /** + * Get hospital fee for each HP lost. + * + * @function external:Game_Actor#getHospitalHpFeeRate + * @return {number} Hospital HP Fee Rate + */ + Game_Actor.prototype.getHospitalHpFeeRate = function() { + return Utils.parameters['HP Price']; + }; + + /** + * Get hospital fee for each MP lost. + * + * @function external:Game_Actor#getHospitalMpFeeRate + * @return {number} Hospital MP Fee Rate + */ + Game_Actor.prototype.getHospitalMpFeeRate = function() { + return Utils.parameters['MP Price']; + }; + + /** + * Get hospital fee for each state to be removed. + * + * @function external:Game_Actor#getHospitalStateFeeRate + * @return {number} Hospital State Fee Rate + */ + Game_Actor.prototype.getHospitalStateFeeRate = function(stateId) { + /* jshint unused:vars */ + return Utils.parameters['State Price']; + }; + + /** + * Get states need to be hospitalized. + * + * @function external:Game_Actor#getHospitalStates + * @return {Object[]} States Array + */ + Game_Actor.prototype.getHospitalStates = function() { + return this.states(); + }; + + /** + * Recover and pay the hospital fee. + * + * @function external:Game_Actor#hospitalize + */ + Game_Actor.prototype.hospitalize = function() { + this._hospitalPay(); + this._hospitalRecover(); + }; + + /** + * Check if actor is healthy. + * + * @function external:Game_Actor#isHealthy + * @return {Boolean} Is healthy + */ + Game_Actor.prototype.isHealthy = function() { + return this._hp >= this.mhp + && this._mp >= this.mmp + && this.getHospitalStates().length === 0; + }; + + /** + * Check if actor needs to be hospitalized. + * + * @function external:Game_Actor#isHospitalizable + * @return {Boolean} Need hospitalize + */ + Game_Actor.prototype.isHospitalizable = function() { + var notHealthy = !this.isHealthy(), + enoughMoney = $gameParty.gold() >= this.hospitalFee(); + + return notHealthy && enoughMoney; + }; + + /** + * Hospital Recover method. + * + * @function external:Game_Actor#_hospitalRecover + * @private + */ + Game_Actor.prototype._hospitalRecover = function() { + var states = this.getHospitalStates(); + + for (var i = 0; i < states.length; i++) { + this.removeState(states[i].id); + } + + this._hp = this.mhp; + this._mp = this.mmp; + }; + + /** + * Hospital Paying Fee method. + * + * @function external:Game_Actor#_hospitalPay + * @private + */ + Game_Actor.prototype._hospitalPay = function() { + $gameParty.loseGold(this.hospitalFee()); + }; +}()); + +(function() { + + /** + * Calculate hospital fees for the whole party. + * + * @function external:Game_Party#hospitalFee + * @return {number} Total hospital fees + */ + Game_Party.prototype.hospitalFee = function() { + var members = this.members(), + fee = 0; + + for (var i = 0; i < members.length; i++) { + fee += members[i].hospitalFee(); + } + + return fee; + }; + + /** + * Recover and pay the hospital fee. + * + * @function external:Game_Party#hospitalize + */ + Game_Party.prototype.hospitalize = function() { + var members = this.members(); + + for (var i = 0; i < members.length; i++) { + members[i].hospitalize(); + } + }; + + /** + * Check if party is healthy. + * + * @function external:Game_Party#isHealthy + * @return {Boolean} Is healthy + */ + Game_Party.prototype.isHealthy = function() { + var members = this.members(); + + for (var i = 0; i < members.length; i++) { + if (!members[i].isHealthy()) { + return false; + } + } + + return true; + }; + + /** + * Check if party needs to be hospitalized. + * + * @function external:Game_Party#isHospitalizable + * @return {Boolean} Need hospitalize + */ + Game_Party.prototype.isHospitalizable = function() { + var members = this.members(); + + if ($gameParty.gold() < this.hospitalFee()) { + return false; + } + + for (var i = 0; i < members.length; i++) { + if (members[i].isHospitalizable()) { + return true; + } + } + + return false; + }; +}()); + +/* globals YED: false */ + +(function() { + /** + * Window shows actors list for hospital. + * + * @class + * @extends external:Window_Selectable + * @memberof YED.Hospital.Windows + * + * @param {number} wx Window X + * @param {number} wy Window Y + * @param {number} [ww] Window Width + * @param {number} wh Window Height + */ + var HospitalActors = function() { + this.initialize.apply(this, arguments); + }; + + /** + * Inherits from Window_Base + */ + HospitalActors.prototype = + Object.create(Window_Selectable.prototype); + HospitalActors.prototype.constructor = HospitalActors; + + /** + * Initialize + * + * @constructs HospitalActors + */ + HospitalActors.prototype.initialize = function(wx, wy, ww, wh) { + ww = ww || this.windowWidth(); + + Window_Selectable.prototype.initialize.call(this, wx, wy, ww, wh); + this.refresh(); + }; + + /** + * Window height for initialize. + * + * @return {number} Window Height + */ + HospitalActors.prototype.windowWidth = function() { + return Graphics.boxWidth; + }; + + /** + * Refresh Window contents. + */ + HospitalActors.prototype.refresh = function() { + this.makeItemList(); + this.createContents(); + this.drawAllItems(); + }; + + /** + * Get actors list. + */ + HospitalActors.prototype.makeItemList = function() { + this._data = $gameParty.members(); + }; + + /** + * Get current actor. + * + * @return {Game_Actor} Current select actor + */ + HospitalActors.prototype.actor = function() { + return this._data[this.index()]; + }; + + /** + * Check if current actor is hospitalizable. + * + * @return {Boolean} Enabled Flag + */ + HospitalActors.prototype.isCurrentItemEnabled = function() { + return this.isEnabled(this.actor()); + }; + + /** + * Check if current actor is hospitalizable. + * + * @return {Boolean} Enabled Flag + */ + HospitalActors.prototype.isEnabled = function(actor) { + return !!actor ? actor.isHospitalizable() : false; + }; + + /** + * Get party current size. + * + * @return {number} Total actors + */ + HospitalActors.prototype.maxItems = function() { + return this._data ? this._data.length : 1; + }; + + /** + * Draw actor status. + * + * @param {number} index Actor Index + */ + HospitalActors.prototype.drawItem = function(index) { + var actor = this._data[index], + rect = this.itemRect(index), + gaugeWidth = 0, + offsetX = 0; + + if (!actor) { + return; + } + + gaugeWidth = this.contentsWidth() + - (168 * 2 + Window_Base._iconWidth * 3 + this.textPadding() * 2); + gaugeWidth = gaugeWidth / 2 - 8; + + offsetX = this.textPadding(); + this.drawActorName(actor, rect.x + offsetX, rect.y, 168); + + offsetX = offsetX + 168; + this.drawActorIcons(actor, rect.x + offsetX, rect.y, Window_Base._iconWidth * 3); + + offsetX = offsetX + Window_Base._iconWidth * 3; + this.drawActorHp(actor, rect.x + offsetX, rect.y, gaugeWidth); + + offsetX = offsetX + gaugeWidth + 8; + this.drawActorMp(actor, rect.x + offsetX, rect.y, gaugeWidth); + + offsetX = offsetX + gaugeWidth; + this.drawActorHospital(actor, rect.x + offsetX, rect.y, 168); + }; + + /** + * Draw actor hospital fees. + * + * @param {Game_Actor} actor Actor + * @param {number} x Draw at X + * @param {number} y Draw at Y + * @param {number} width Limit Text Width + */ + HospitalActors.prototype.drawActorHospital = function(actor, x, y, width) { + width = width || 168; + this.drawCurrencyValue(actor.hospitalFee(), + this.currencyUnit(), x, y, width); + }; + + /** + * Get currency unit. + * + * @return {String} Currency Unit + */ + HospitalActors.prototype.currencyUnit = function() { + return TextManager.currencyUnit; + }; + + /** + * Update help window + */ + HospitalActors.prototype.updateHelp = function() { + var symbol = ''; + + if (!this.actor()) { + return; + } + + symbol = this._getHelpSymbol(); + this._helpWindow.setSymbol(symbol, this.actor()); + }; + + /** + * Get text symbol for displaying help + * + * @private + */ + HospitalActors.prototype._getHelpSymbol = function() { + var symbol = ''; + + if (this.actor().isHealthy()) { + symbol = 'Actor Help (Healthy)'; + } else { + symbol = 'Actor Help (Treat)'; + } + + return symbol; + }; + + YED.Hospital.Windows.HospitalActors = HospitalActors; +}()); + +/* globals YED: false */ + +(function() { + /** + * Shorten Dependencies + */ + var Utils = YED.Hospital.Utils; + + /** + * Window shows nurse face and her messages. + * + * @class + * @extends external:Window_Base + * @memberof YED.Hospital.Windows + * + * @param {number} wx Window X + * @param {number} wy Window Y + * @param {number} ww Window Width + * @param {number} [wh] Window Height + */ + var HospitalNurse = function() { + this.initialize.apply(this, arguments); + }; + + /** + * Inherits from Window_Base + */ + HospitalNurse.prototype = Object.create(Window_Base.prototype); + HospitalNurse.prototype.constructor = HospitalNurse; + + /** + * Initialize + * + * @constructs HospitalNurse + */ + HospitalNurse.prototype.initialize = function(wx, wy, ww, wh) { + wh = wh || this.windowHeight(); + + Window_Base.prototype.initialize.call(this, wx, wy, ww, wh); + this.loadImages(); + this.refresh(); + }; + + /** + * Window height for initialize. + * + * @return {number} Window Height + */ + HospitalNurse.prototype.windowHeight = function() { + return this.fittingHeight(4); + }; + + /** + * Load and cache Faceset for Nurse Face. + */ + HospitalNurse.prototype.loadImages = function() { + var faceName = Utils.parameters['Nurse Face'][0]; + + ImageManager.loadFace(faceName); + }; + + /** + * Refresh window contents. + */ + HospitalNurse.prototype.refresh = function() { + this.contents.clear(); + + this._drawNurseFace(); + this._drawNurseName(); + this._drawNurseMessage(); + }; + + /** + * Draw nurse face. + * + * @private + */ + HospitalNurse.prototype._drawNurseFace = function() { + var faceName = Utils.parameters['Nurse Face'][0], + faceIndex = Utils.parameters['Nurse Face'][1]; + + this.drawFace(faceName, faceIndex, 0, 0); + }; + + /** + * Draw nurse name. + * + * @private + */ + HospitalNurse.prototype._drawNurseName = function() { + var nurseName = Utils.parameters['Nurse Name'], + dx = Window_Base._faceWidth + this.textPadding(); + + this.drawTextEx(nurseName, dx, 0); + }; + + /** + * Draw nurse message. + * + * @private + */ + HospitalNurse.prototype._drawNurseMessage = function() { + var nurseMessage = Utils.parameters['Nurse Message'], + dx = Window_Base._faceWidth + this.textPadding(); + + this.drawTextEx(nurseMessage, dx, this.lineHeight()); + }; + + YED.Hospital.Windows.HospitalNurse = HospitalNurse; +}()); + +/* globals YED: false */ + +(function() { + /** + * Shorten Dependencies + */ + var Utils = YED.Hospital.Utils; + + /** + * Window shows commands for Hospital Scene. + * + * @class + * @extends external:Window_Command + * @memberof YED.Hospital.Windows + * + * @param {number} wx Window X + * @param {number} wy Window Y + * @param {number} [ww] Window Width + * @param {number} [wh] Window Height + */ + var HospitalCommand = function() { + this.initialize.apply(this, arguments); + }; + + /** + * Inherits from Window_Command + */ + HospitalCommand.prototype = Object.create(Window_Command.prototype); + HospitalCommand.prototype.constructor = HospitalCommand; + + /** + * Initialize Window when created. + * + * @constructs HospitalCommand + */ + HospitalCommand.prototype.initialize = function(wx, wy, ww, wh) { + ww = ww || this.windowWidth(); + wh = wh || this.windowHeight(); + + Window_Command.prototype.initialize.call(this, wx, wy); + + this.width = ww; + this.height = wh; + }; + + /** + * Window width for initialize. + * + * @return {number} Window Width + */ + HospitalCommand.prototype.windowWidth = function() { + return 240; + }; + + /** + * Get visible rows for height setting. + * + * @return {number} Rows + */ + HospitalCommand.prototype.numVisibleRows = function() { + return 4; + }; + + /** + * Get text align setting. + * + * @return {String} Align setting + */ + HospitalCommand.prototype.itemTextAlign = function() { + return Utils.parameters['Text Alignment']; + }; + + /** + * Make commands list for Window. + */ + HospitalCommand.prototype.makeCommandList = function() { + this._addHealCommand(); + this._addCustomCommand(); + this._addExitCommand(); + }; + + /** + * Update help window + */ + HospitalCommand.prototype.updateHelp = function() { + var symbol = this._getHelpSymbol(); + this._helpWindow.setSymbol(symbol); + }; + + /** + * Add heal commands to Window. + * + * @private + */ + HospitalCommand.prototype._addHealCommand = function() { + var healOneText = Utils.parameters['Heal One Command'], + healAllText = Utils.parameters['Heal All Command'], + enableHealAll = $gameParty.isHospitalizable(); + + this.addCommand(healOneText, 'healOne', true); + this.addCommand(healAllText, 'healAll', enableHealAll); + }; + + /** + * Add custom commands (for any add-on) to Window. + * + * @private + */ + HospitalCommand.prototype._addCustomCommand = function() { + // made for future add-ons + }; + + /** + * Add exit command to Window. + * + * @private + */ + HospitalCommand.prototype._addExitCommand = function() { + var text = Utils.parameters['Exit Command']; + + this.addCommand(text, 'cancel', true); + }; + + /** + * Get text symbol for displaying help + * + * @private + */ + HospitalCommand.prototype._getHelpSymbol = function() { + var symbol = ''; + + switch (this.currentSymbol()) { + case 'healOne': + symbol = 'Heal One Help'; + break; + case 'healAll': + if ($gameParty.isHealthy()) { + symbol = 'Heal All Help (Healthy)'; + } else { + symbol = 'Heal All Help (Treat)'; + } + break; + case 'cancel': + symbol = 'Exit Help'; + break; + } + + return symbol; + }; + + YED.Hospital.Windows.HospitalCommand = HospitalCommand; +}()); + +/* globals YED: false */ + +(function() { + /** + * Shorten Dependencies + */ + var Utils = YED.Hospital.Utils; + + /** + * Window shows command help. + * + * @class + * @extends external:Window_Help + * @memberof YED.Hospital.Windows + * + * @param {number} wx Window X + * @param {number} wy Window Y + * @param {number} ww Window Width + * @param {number} [wh] Window Height + */ + var HospitalHelp = function() { + this.initialize.apply(this, arguments); + }; + + /** + * Inherits from Window_Help + */ + HospitalHelp.prototype = Object.create(Window_Help.prototype); + HospitalHelp.prototype.constructor = HospitalHelp; + + /** + * Initialize + * + * @constructs HospitalHelp + */ + HospitalHelp.prototype.initialize = function(wx, wy, ww, wh) { + wh = wh || this.windowHeight(); + + Window_Help.prototype.initialize.call(this, 1); + + this.x = wx; + this.y = wy; + this.width = ww; + this.height = wh; + + this._textSymbol = ''; + this._windowCommand = null; + this._windowActors = null; + }; + + /** + * Window height for initialize. + * + * @return {number} Window Height + */ + HospitalHelp.prototype.windowHeight = function() { + return this.fittingHeight(1); + }; + + /** + * Refresh window contents. + */ + HospitalHelp.prototype.refresh = function() { + this.contents.clear(); + this._drawHelpText(); + }; + + /** + * Clear window contents. + */ + HospitalHelp.prototype.clear = function() { + this.setSymbol(''); + }; + + /** + * Set window symbol for formatting texts. + */ + HospitalHelp.prototype.setSymbol = function(symbol, actor) { + this._textSymbol = symbol; + this._actor = actor; + this.refresh(); + }; + + /** + * Get help text. + * + * @return {String} Help Text + * @private + */ + HospitalHelp.prototype._getHelpText = function() { + var text = Utils.parameters[this._textSymbol], + actor = this._actor; + + switch (this._textSymbol) { + case 'Heal All Help (Treat)': + text = text.format($gameParty.hospitalFee()); + break; + case 'Actor Help (Treat)': + text = text.format(actor.name()); + break; + case 'Actor Help (Healthy)': + text = text.format(actor.name()); + break; + } + + return text; + }; + + /** + * Draw help text. + * + * @private + */ + HospitalHelp.prototype._drawHelpText = function() { + var text = ''; + + if (this._textSymbol !== '') { + text = this._getHelpText(); + this.drawTextEx(text, this.textPadding(), 0); + } + }; + + YED.Hospital.Windows.HospitalHelp = HospitalHelp; +}()); + +/* globals YED: false */ + +(function() { + /** + * Shorten Dependencies + */ + var Windows = YED.Hospital.Windows; + + /** + * Scene for Hospital. + * + * @class + * @extends external:Scene_MenuBase + * @memberof YED.Hospital.Scenes + */ + var Hospital = function() { + this.initialize.apply(this, arguments); + }; + + /** + * Inherits from Scene_MenuBase + */ + Hospital.prototype = Object.create(Scene_MenuBase.prototype); + Hospital.prototype.constructor = Hospital; + + /** + * Initialize + * + * @constructs Hospital + */ + Hospital.prototype.initialize = function() { + Scene_MenuBase.prototype.initialize.call(this); + }; + + /** + * Create Windows. + */ + Hospital.prototype.create = function() { + Scene_MenuBase.prototype.create.call(this); + this._createGoldWindow(); + this._createHelpWindow(); + this._createCommandWindow(); + this._createNurseWindow(); + this._createActorsWindow(); + }; + + /** + * Refresh Windows. + */ + Hospital.prototype.start = function() { + Scene_MenuBase.prototype.start.call(this); + this._nurseWindow.refresh(); + }; + + /** + * Create Gold Window. + * + * @private + */ + Hospital.prototype._createGoldWindow = function() { + this._goldWindow = new Window_Gold(0, 0); + this._goldWindow.x = Graphics.boxWidth - this._goldWindow.width; + this._goldWindow.y = Graphics.boxHeight - this._goldWindow.height; + this.addWindow(this._goldWindow); + }; + + /** + * Create Help Window. + * + * @private + */ + Hospital.prototype._createHelpWindow = function() { + var wx = 0, + wy = this._goldWindow.y, + ww = Graphics.boxWidth - this._goldWindow.width; + + this._helpWindow = new Windows.HospitalHelp(wx, wy, ww); + this.addWindow(this._helpWindow); + }; + + /** + * Create Command Window. + * + * @private + */ + Hospital.prototype._createCommandWindow = function() { + this._commandWindow = new Windows.HospitalCommand(0, 0); + this._commandWindow.setHelpWindow(this._helpWindow); + + this._commandWindow.setHandler('healOne', + this._commandHealOne.bind(this)); + this._commandWindow.setHandler('healAll', + this._commandHealAll.bind(this)); + this._commandWindow.setHandler('cancel', + this.popScene.bind(this)); + + this.addWindow(this._commandWindow); + }; + + /** + * Create Nurse Window. + * + * @private + */ + Hospital.prototype._createNurseWindow = function() { + var wx = this._commandWindow.width, + wy = this._commandWindow.y, + ww = Graphics.boxWidth - this._commandWindow.width; + + this._nurseWindow = new Windows.HospitalNurse(wx, wy, ww); + this.addWindow(this._nurseWindow); + }; + + /** + * Create Actors Window. + * + * @private + */ + Hospital.prototype._createActorsWindow = function() { + var wx = 0, + wy = this._commandWindow.height, + wh = Graphics.boxHeight - wy - this._goldWindow.height; + + this._actorsWindow = new Windows.HospitalActors(wx, wy, null, wh); + this._actorsWindow.setHelpWindow(this._helpWindow); + + this._actorsWindow.setHandler('ok', this._onActorOk.bind(this)); + this._actorsWindow.setHandler('cancel', this._onActorCancel.bind(this)); + + this.addWindow(this._actorsWindow); + }; + + /** + * Handler for command healOne + * + * @private + */ + Hospital.prototype._commandHealOne = function() { + this._actorsWindow.activate(); + this._actorsWindow.select(0); + }; + + /** + * Handler for command healAll + * + * @private + */ + Hospital.prototype._commandHealAll = function() { + $gameParty.hospitalize(); + this._actorsWindow.refresh(); + this._goldWindow.refresh(); + this._commandWindow.refresh(); + this._commandWindow.activate(); + }; + + /** + * Handler for actor selection. + * + * @private + */ + Hospital.prototype._onActorOk = function() { + var actor = this._actorsWindow.actor(); + + if (!!actor) { + actor.hospitalize(); + + this._actorsWindow.refresh(); + this._goldWindow.refresh(); + this._commandWindow.refresh(); + this._actorsWindow.activate(); + } + }; + + /** + * Handler for actor cancel. + * + * @private + */ + Hospital.prototype._onActorCancel = function() { + this._commandWindow.activate(); + this._actorsWindow.deselect(); + }; + + YED.Hospital.Scenes.Hospital = Hospital; +}()); + +/* globals YED: false */ + +(function() { + /** + * Aliasing methods + */ + var _Game_Interpreter_pluginCommand = + Game_Interpreter.prototype.pluginCommand; + + /** + * Extending: Game_Interpreter.prototype.pluginCommand + * + * Add go to Hospital Scene Plugin Command. + */ + Game_Interpreter.prototype.pluginCommand = function(command, args) { + // actual initialize + _Game_Interpreter_pluginCommand.call(this, command, args); + + // Hospital Plugin Command + if (command === 'OpenHospital') { + YED.Hospital.Utils.gotoHospitalScene.call(this); + } + }; +}()); diff --git a/js/plugins/YED_InvertTarget.js b/js/plugins/YED_InvertTarget.js new file mode 100644 index 0000000..0a199a3 --- /dev/null +++ b/js/plugins/YED_InvertTarget.js @@ -0,0 +1,380 @@ +/*: + * Yami Engine Delta - Invert Target + * + * @plugindesc v1.0.1 This plugin allows player to use skill on the other team, for example use healing on an enemy. + * @author Yami Engine Delta [Dr.Yami] + * + * @param Invert Keys (Keyboard) + * @desc A list of keyName. + * For example: pageup pagedown + * @default pageup pagedown shift + * + * @param Invert Keys (Gamepad) + * @desc A list of keyName. + * For example: pageup pagedown + * @default pageup pagedown shift + * + * @help + * Compatibility + * --- + * If you use YEP - Battle Engine Core, this plugin should be put above that. + * + * ============================================== + * Item & Skill Notetags + * --- + * + * Make the skill/item cannot be inverted. + */ + +/** + * @namespace InvertTarget + * @memberof YED + */ + +var YED = YED || {}; + +// init InvertTarget module +YED.InvertTarget = {}; + +/* globals YED: false */ + +(function($InvertTarget) { + /** + * Enum for RegExp, used to notetags + * + * @readonly + * @enum {RegExp} + * @memberof YED.InvertTarget + */ + var Regexp = { + /** + * Makes state not single ~ + */ + NOT_INVERT: /<(?:not invert)>/i + }; + + $InvertTarget.Regexp = Regexp; +}(YED.InvertTarget)); + +/* globals YED: false */ + +(function($InvertTarget) { + /** + * Shorten Dependencies + */ + var Regexp = $InvertTarget.Regexp; + + /** + * Contains utility tools for module. + * + * @namespace Utils + * @memberof YED.InvertTarget + */ + var Utils = {}; + + /** + * Contains module parsed parameters. + * + * @type {Object} + * @memberOf YED.InvertTarget.Utils + */ + Utils.parameters = {}; + + /** + * Process parameters function. + * Should be called with DataManager as current object. + * + * @function processParameters + * @memberof YED.InvertTarget.Utils + */ + Utils.processParameters = function() { + var parameters = PluginManager.parameters('YED_InvertTarget'), + result = Utils.parameters; + + result['Invert Keys (Keyboard)'] = + parameters['Invert Keys (Keyboard)'].split(' '); + + result['Invert Keys (Gamepad)'] = + parameters['Invert Keys (Gamepad)'].split(' '); + }; + + /** + * Process notetag function. + * Should be called with DataManager as current object. + * + * @function processNotetag + * @memberof YED.InvertTarget.Utils + */ + Utils.processNotetags = function() { + var groups = [$dataSkills, $dataItems], group, + obj, + notedata, line; + + for (var j = 0; j < groups.length; j++) { + group = groups[j]; + + for (var i = 1; i < group.length; i++) { + obj = group[i]; + notedata = obj.note.split(/[\r\n]+/); + + Utils._processProperties.call(this, obj); + Utils._processMethods.call(this, obj); + + for (var n = 0; n < notedata.length; n++) { + line = notedata[n]; + Utils._processNotetag.call(this, obj, line); + } + } + } + }; + + /** + * Add new properties into object. + * + * @function _processProperties + * @memberof YED.InvertTarget.Utils + * @param {Object} obj Data object + * @private + */ + Utils._processProperties = function(obj) { + obj._invertTarget = true; + }; + + /** + * Add new methods into object. + * + * @function _processMethods + * @memberof YED.InvertTarget.Utils + * @param {Object} obj Data object + * @private + */ + Utils._processMethods = function(obj) { + obj.getInvertTarget = Utils.getInvertTarget; + }; + + /** + * Process notetag for object. + * + * @function _processNotetag + * @memberof YED.InvertTarget.Utils + * @param {Object} obj Data object + * @param {String} notetag Notetag + * @private + */ + Utils._processNotetag = function(obj, notetag) { + var match; + + match = notetag.match(Regexp.NOT_INVERT); + if (match) { + obj._invertTarget = true; + } + }; + + /** + * Get invert target flag. + * + * @function getInvertTarget + * @memberof YED.InvertTarget.Utils + * @return {Boolean} Invertable! + */ + Utils.getInvertTarget = function() { + return !!this._invertTarget; + }; + + $InvertTarget.Utils = Utils; +}(YED.InvertTarget)); + +/* globals YED: false */ + +/** + * Pre-processes and notetag parsing + */ +(function($InvertTarget) { + /** + * Shorten Dependencies + */ + var Utils = $InvertTarget.Utils; + + /** + * Aliasing methods + */ + var _DataManager_isDatabaseLoaded = DataManager.isDatabaseLoaded; + + /** + * Extending: DataManager.isDatabaseLoaded + * + * Add notetags and parameters processing for module. + */ + DataManager.isDatabaseLoaded = function() { + var loaded = _DataManager_isDatabaseLoaded.call(this); + + if (!loaded) { + return false; + } + + Utils.processParameters.call(DataManager); + Utils.processNotetags.call(DataManager); + + return true; + }; +}(YED.InvertTarget)); + +(function() { + /** + * Aliasing methods + */ + var _Game_Action_clear + = Game_Action.prototype.clear; + var _Game_Action_setSkill + = Game_Action.prototype.setSkill; + var _Game_Action_setItem + = Game_Action.prototype.setItem; + var _Game_Action_needsSelection + = Game_Action.prototype.needsSelection; + var _Game_Action_friendsUnit + = Game_Action.prototype.friendsUnit; + var _Game_Action_opponentsUnit + = Game_Action.prototype.opponentsUnit; + + Game_Action.prototype.clear = function() { + _Game_Action_clear.call(this); + + this.clearInvert(); + }; + + Game_Action.prototype.clearInvert = function() { + this._invertTarget = false; + }; + + Game_Action.prototype.toggleInvert = function() { + if (!this.item()) { + return false; + } + + if (!this.item().getInvertTarget()) { + return false; + } + + this._invertTarget = !this._invertTarget; + + return true; + }; + + Game_Action.prototype.setSkill = function(skillId) { + _Game_Action_setSkill.call(this, skillId); + + this.clearInvert(); + }; + + Game_Action.prototype.setItem = function(itemId) { + _Game_Action_setItem.call(this, itemId); + + this.clearInvert(); + }; + + Game_Action.prototype.needsSelection = function() { + var result = _Game_Action_needsSelection.call(this), + forAll = this.checkItemScope([2, 8]); + + return result || forAll; + }; + + Game_Action.prototype.friendsUnit = function() { + var friendsUnit = _Game_Action_friendsUnit.call(this), + opponentsUnit = _Game_Action_opponentsUnit.call(this); + + if (this._invertTarget) { + return opponentsUnit; + } + + return friendsUnit; + }; + + Game_Action.prototype.opponentsUnit = function() { + var friendsUnit = _Game_Action_friendsUnit.call(this), + opponentsUnit = _Game_Action_opponentsUnit.call(this); + + if (this._invertTarget) { + return friendsUnit; + } + + return opponentsUnit; + }; +}()); + +/* globals YED: false */ + +(function($InvertTarget) { + /** + * Aliasing methods + */ + var _Scene_Battle_update + = Scene_Battle.prototype.update; + var _Scene_Battle_startActorCommandSelection + = Scene_Battle.prototype.startActorCommandSelection; + + Scene_Battle.prototype.update = function() { + _Scene_Battle_update.call(this); + + this._updateInvertTarget(); + }; + + Scene_Battle.prototype.startActorCommandSelection = function() { + _Scene_Battle_startActorCommandSelection.call(this); + + BattleManager.inputtingAction().clearInvert(); + }; + + Scene_Battle.prototype._isChoosingTargets = function() { + return (this._actorWindow.active || + this._enemyWindow.active); + }; + + Scene_Battle.prototype._updateInvertTarget = function() { + var keyNameKeyboard + = $InvertTarget.Utils.parameters['Invert Keys (Keyboard)'], + keyNameGamepad + = $InvertTarget.Utils.parameters['Invert Keys (Gamepad)'], + triggered = function(key) { + return Input.isTriggered(key); + }, + input; + + input = BattleManager.inputtingAction(); + + if (!input) { + return; + } + + if (!this._isChoosingTargets()) { + return; + } + + if (!input.item()) { + return; + } + + if (keyNameKeyboard.some(triggered) || + keyNameGamepad.some(triggered)) { + if (!input.toggleInvert()) { + return; + } + + if (this._actorWindow.active) { + this._actorWindow.deactivate(); + this._actorWindow.hide(); + this.selectEnemySelection(); + + return; + } + + if (this._enemyWindow.active) { + this._enemyWindow.deactivate(); + this._enemyWindow.hide(); + this.selectActorSelection(); + + return; + } + } + }; +}(YED.InvertTarget)); diff --git a/js/plugins/YED_LunaBattleConfig.js b/js/plugins/YED_LunaBattleConfig.js new file mode 100644 index 0000000..aef1c00 --- /dev/null +++ b/js/plugins/YED_LunaBattleConfig.js @@ -0,0 +1,655 @@ +/*============================================================================= + * Luna Engine : Battle + * By Archeia and Yami + * Version: 1.0 + * + * Open this in a text editor like Atom, Sublime Text or Notepad++ + * This version is made for the MV release and does not represent the + * final version of Luna Engine MV. + * + *=============================================================================*/ +/*: + * @plugindesc Open this in a text editor like Atom, Sublime Text or Notepad++ + * @author Archeia and Yami + * + * @help + * Open this in a text editor like Atom, Sublime Text or Notepad++ + * This version is made for the MV release and is not the final version of Luna + * Engine as a whole. + * + *---------------------------------------------------------------------------- + * Lunatic Mode: Conditions + *---------------------------------------------------------------------------- + * We only list all custom conditions and relative conditions. + *---------------------------------------------------------------------------- + * + * this.isSelectingActor() + *---------------------------------------------------------------------------- + * Return true when related actor with GUI element is being selected. + * + *---------------------------------------------------------------------------- + * this.isSelectingEnemy() + *---------------------------------------------------------------------------- + * Return true when choosing enemy targets. + * + *---------------------------------------------------------------------------- + * this.isSelectingAction() + *---------------------------------------------------------------------------- + * Return true when choosing skill or item. + * + *---------------------------------------------------------------------------- + * this.actor.isDead() + *---------------------------------------------------------------------------- + * Return true if actor is dead. + * + *---------------------------------------------------------------------------- + * this.actor.hpRate() < X + *---------------------------------------------------------------------------- + * Return true if actor hp rate is less than X. (X <= 1.0) + * + *---------------------------------------------------------------------------- + * this.actor.mpRate() < X + *---------------------------------------------------------------------------- + * The same as above hpRate but for MP. + * + *---------------------------------------------------------------------------- + * this.actor.actorId() === X + *---------------------------------------------------------------------------- + * Return true if actor ID is X. + * + *---------------------------------------------------------------------------- + * this.actor.currentClass().id === X + *---------------------------------------------------------------------------- + * Return true if actor class ID is X. + * + *---------------------------------------------------------------------------- + * Lunatic Mode: Eval Properties + *---------------------------------------------------------------------------- + * + *---------------------------------------------------------------------------- + * this.actor.hp + *---------------------------------------------------------------------------- + * Actor HP. Can be replaced for mp, tp. + * + *---------------------------------------------------------------------------- + * this.actor.mhp + *---------------------------------------------------------------------------- + * Actor max HP. Can be replaced for mp, tp. + * + *---------------------------------------------------------------------------- + * this.actor.name() + *---------------------------------------------------------------------------- + * Actor name. + * + *---------------------------------------------------------------------------- + * this.actor.stateIcons() + *---------------------------------------------------------------------------- + * Get all state icons. + * + */ +/*=============================================================================*/ +/** + * @namespace LunaEngine + */ + +var LunaEngine = LunaEngine || {}; + +/** + * @namespace Battle + * @memberof LunaEngine + */ +LunaEngine.Battle = LunaEngine.Battle || {}; +LunaEngine.Battle.Config = LunaEngine.Battle.Config || {}; +/*=============================================================================*/ +/* globals LunaEngine: false */ +/*=============================================================================*/ + +/*=============================================================================*/ +/* Configuration Area!!! +/*=============================================================================*/ +(function() { + + /*============================================================================= + // Battle Status General Properties + *============================================================================= + * This is the main window of the Actor Battle Status as seen in battle. The area + * where it displays the party's HP/MP/TP/Status/Faceset/Damage Values/etc. + * When you move this around, you affect the entirety of the battle status. + * This does not include Battle Command. + =============================================================================*/ + var HUD = { + /*------------------------------- + * Position + * X = Move the HUD Horizontally. You can use Negative values (e.g. -50) to move it to the opposite direction. + * Y = Move the HUD Vertically. You can use Negative values (e.g. -50) to move it to the opposite direction. + -------------------------------*/ + x: 204, + y: 460, + + /*------------------------------- + * Grid and Size + * This will affect the size of the window that you see in battle. + * Width = The width of the window. + * Height = The height of the window. + * Grid = How many party members are going to be visible in battle. + * Direction = It can be either horizontal or vertical. + -------------------------------*/ + width: 624, + height: 180, + grid: 4, + direction: 'horizontal', + + /*------------------------------- + * Others + * This involves other properties that we added to the Battle Status for customization. + -------------------------------*/ + + /* showAnimation + ------------------------------ + Set as true/false. If true, it will show animations on the actors. + If set to false, it will act like default RM. + -------------------------------*/ + showAnimation: false, // for non-sideview + + /* Background + ------------------------------ + This area is for adding a custom background your battle status. + type = you can either write 'window' or 'image' + + If you select 'image' + ------------------------------ + Since images aren't exactly the same size as your default width and height for the status + (the parameters you set above), you add offsets to them instead. Think of it as nudging + the graphic a bit so it would place itself properly on your screen. This won't affect the + overall placement of all the actor faceset/hp bars/etc. + + * offsetX = nudge the image horizontally. + You can use negative values (e.g. -10) or positive values (e.g. 10) + * offsetY = nudge the image vertically tally. + You can use negative values (e.g. -10) or positive values (e.g. 10) + * filename = the image you wanted to display. Make sure it's in img/system folder. + + If you select 'window' + ------------------------------ + * Width = The width of the window. + * Height = The height of the window. + * windowskin: You can set a different windowskin instead of the default 'Window' graphic. + Just make sure that the new Windowskin is in img/system folder. Put in the filename in + the windowskin: 'filename here' area. + -------------------------------*/ + background: { + type: 'image', + offsetX: -12, + offsetY: -12, + + window: { + width: 648, + height: 204, + + windowskin: 'Window' + }, + + image: { + filename: '' // put into img/system + } + } + }; + + /*============================================================================= + // Battle Status Elements + *============================================================================= + * This is the area where you can edit the following elements of Battle Status: + * Name Display + * Faceset Display + * HP/MP/TP Numbers + * HP/MP/TP Gauges/Bars + * + * Aside from these elements, you can add conditional and eval properties that + * we included in the help section. This is also known as Lunatic Mode. + =============================================================================*/ + var GUISprites = { + spriteFace: { + /*------------------------------- + * GUIFace: Faceset + * This section involves customizing the 'faceset' display of the actors. + * X = Move the HUD Horizontally. You can use Negative values (e.g. -50) to move it to the opposite direction. + * Y = Move the HUD Vertically. You can use Negative values (e.g. -50) to move it to the opposite direction. + * tone = RGBA (Red, Green, Blue, Sat) to add a color overlay on top of the faceset. + * faceName = This is an advanced condition where you can change how it loads an actor image. + Do not touch if you don't know programming or the basic syntaxes visible in RM. + * faceIndex = This is an advanced condition where you can change how it loads an actor image's index. + * A faceset usually has 8 faces in a sheet. From top left, it starts at 0. So think of it as: + 0 1 2 3 + 4 5 6 7 + Do not touch if you don't know programming or the basic syntaxes visible in RM. + -------------------------------*/ + class: 'GUIFace', + + /* Position */ + x: 0, + y: 0, + + /* Color */ + tone: [0,0,0,0], + + /* Basic Properties */ + faceName: '{this.actor.faceName()}', + faceIndex: '{this.actor.faceIndex()}', + + /*------------------------------- + * Lunatic Mode: Conditional Properties + * Refer to the Lunatic Conditions as seen in the header of this script. + * This contain specific examples of how to use the Lunatic Mode conditions. + -------------------------------*/ + conditional: [ + { + condition: 'this.actor.hpRate() < 0.5', + /* Change Actor Faceset Tone when HP is Less than 50% + ------------------------------ + In this conditional's case based on 'properties' the image + will turn into a red tint. + -------------------------------*/ + properties: { + tone: [96,0,0,0] + } + }, + + { + condition: 'this.actor.isDead()', + /* Change Actor Faceset Tone when dead. + ------------------------------ + In this conditional's case based on 'properties' the image + will turn grayscale. + -------------------------------*/ + properties: { + tone: [0,0,0,255] + } + }, + + { + condition: 'this.isSelectingActor()', + /* If an actor is selected... + ------------------------------ + In this conditional's case based on 'properties' the image + it will turn the image slightly white when selected. + -------------------------------*/ + properties: { + tone: [64,64,64,0] + } + }, + + { + condition: 'this.isSelectingEnemy()', + /* If the player is selecting an enemy + ------------------------------ + In this conditional's case based on 'properties' the image + will hide itself until you're done selecting an enemy. + -------------------------------*/ + properties: { + visible: false + } + } + ] + }, // spriteFace + + spriteName: { + /*------------------------------- + * GUIText: Name + * This section involves customizing the 'name' display of the actors. + * X = Move the text horizontally. You can use Negative values (e.g. -50) to move it to the opposite direction. + * Y = Move the text vertically. You can use Negative values (e.g. -50) to move it to the opposite direction. + * tone = RGBS (Red, Green, Blue, Sat) to set a color for the 'name' display + * text = Choose what text to display. It can be an actor's name, class, items, etc. based on the syntax used. + Do not touch unless you know programming or the basic syntaxes present in MV. + * fontFace = the name of the font you want to use. GameFont refers to default. + * fontSize = the size of the font used. 24 is the default number. + * textColor = the color of the font. We use hexadecimal values in this case. For an easier reference check this link: + (http://www.w3schools.com/w3css/w3css_color_palettes.asp) + * outlineColor = the font's outline color. This one uses RGBA (Red, Green, Blue, Alpha) + -------------------------------*/ + class: 'GUIText', + + /* Position */ + x: 0, + y: 0, + + /* Color */ + tone: [0,0,0,0], + + /* Basic Properties */ + text: '{this.actor.name()}', + + fontFace: 'GameFont', + fontSize: '24', + + textColor: '#ffffff', + outlineColor: 'rgba(0,0,0,0.5)', + + /*------------------------------- + * Lunatic Mode: Conditional Properties + * Refer to the Lunatic Conditions as seen in the header of this script. + * This contain specific examples of how to use the Lunatic Mode conditions. + -------------------------------*/ + conditional: [ + { + condition: 'this.actor.hpRate() < 0.5', + /* Change Actor Name Tone when HP is Less than 50% + ------------------------------ + In this conditional's case based on 'properties' the text + will turn into a tint based under crisisColor() in the default setting. + You can change this to a hexadecimal value. (e.g. textColor: '#ffffff') + -------------------------------*/ + properties: { + textColor: '{this.crisisColor()}' + } + }, + + { + condition: 'this.actor.isDead()', + /* Change Actor Name Tone when dead. + ------------------------------ + In this conditional's case based on 'properties' the text + will turn into a tint based under crisisColor() in the default setting. + You can change this to a hexadecimal value. (e.g. textColor: '#ffffff') + -------------------------------*/ + properties: { + textColor: '{this.deathColor()}' + } + }, + + { + condition: 'this.isSelectingEnemy()', + /* If the player is selecting an enemy + ------------------------------ + In this conditional's case based on 'properties' the text + will hide itself until you're done selecting an enemy. + -------------------------------*/ + properties: { + visible: false + } + } + ] + }, // spriteName + + spriteHPGauge: { + /*------------------------------- + * GUIGauge: HP + * This section involves customizing the HP 'gauge' or 'bar' display of the actors. + * X = Move the Gauges Horizontally. You can use Negative values (e.g. -50) to move it to the opposite direction. + * Y = Move the Gauges Vertically. You can use Negative values (e.g. -50) to move it to the opposite direction. + * tone = RGBS (Red, Green, Blue, Sat) to set a color for the HP Bar Display + * Width = The width of the HP Bar. + * Height = The height of the HP Bar. + * rate = What is the source of value that the gauge is displaying. In this case the actor's HP Rate. + * color1 = The first color + * color2 = The second color that color1 will gradiate into. + * backColor = The color of the 'back' of the gauge when you're taking damage. The default is black. + We use hexadecimal values in this case. For an easier reference check this link: + (http://www.w3schools.com/w3css/w3css_color_palettes.asp) + * outlineColor = the bar's outline color. This one uses RGBA (Red, Green, Blue, Alpha) + * direction = The direction of the bar. It could be 'horizontal' or 'vertical' + -------------------------------*/ + class: 'GUIGauge', + + /* Position */ + x: 0, + y: 100, + + /* Color */ + tone: [0,0,0,0], + + /* Basic Properties */ + width: 140, + height: 6, + + rate: 'this.actor.hpRate()', + + color1: '{this.hpGaugeColor1()}', + color2: '{this.hpGaugeColor2()}', + + backColor: '#000000', + outlineColor: 'rgba(0,0,0,0.5)', + + direction: 'horizontal', + + /*------------------------------- + * Lunatic Mode: Conditional Properties + * Refer to the Lunatic Conditions as seen in the header of this script. + * This contain specific examples of how to use the Lunatic Mode conditions. + -------------------------------*/ + conditional: [ + { + condition: 'this.isSelectingEnemy()', + /* If the player is selecting an enemy + ------------------------------ + In this conditional's case based on 'properties' the text + will hide itself until you're done selecting an enemy. + -------------------------------*/ + properties: { + visible: false + } + } + ] + }, // spriteHPGauge + + spriteHPNumber: { + /*------------------------------- + * GUIText: HP Values + * This section involves customizing the HP Values display of the actors. + * X = Move the text horizontally. You can use Negative values (e.g. -50) to move it to the opposite direction. + * Y = Move the text vertically. You can use Negative values (e.g. -50) to move it to the opposite direction. + * tone = RGBS (Red, Green, Blue, Sat) to set a color for the HP Text display + * text = Choose what text to display. It can be an actor's name, class, items, etc. based on the syntax used. + In this one's case it will display as 'HP: 9999 / 9999' + Do not touch unless you know programming or the basic syntaxes present in MV. + * fontFace = the name of the font you want to use. GameFont refers to default. + * fontSize = the size of the font used. 24 is the default number. + * textColor = the color of the font. We use hexadecimal values in this case. For an easier reference check this link: + (http://www.w3schools.com/w3css/w3css_color_palettes.asp) + * outlineColor = the font's outline color. This one uses RGBA (Red, Green, Blue, Alpha) + -------------------------------*/ + class: 'GUIText', + + /* Position */ + x: 0, + y: 72, + + /* Color */ + tone: [0,0,0,0], + + /* Basic Properties */ + text: 'HP: {this.actor.hp} / {this.actor.mhp}', + + fontFace: 'GameFont', + fontSize: '16', + + textColor: '#ffffff', + outlineColor: 'rgba(0,0,0,0.5)', + + /*------------------------------- + * Lunatic Mode: Conditional Properties + * Refer to the Lunatic Conditions as seen in the header of this script. + * This contain specific examples of how to use the Lunatic Mode conditions. + -------------------------------*/ + conditional: [ + { + condition: 'this.isSelectingEnemy()', + /* If the player is selecting an enemy + ------------------------------ + In this conditional's case based on 'properties' the text + will hide itself until you're done selecting an enemy. + -------------------------------*/ + properties: { + visible: false + } + } + ] + }, // spriteHPNumber + + spriteMPGauge: { + /*------------------------------- + * GUIGauge:MP + * This section involves customizing the MP 'gauge' or 'bar' display of the actors. + * X = Move the Gauges Horizontally. You can use Negative values (e.g. -50) to move it to the opposite direction. + * Y = Move the Gauges Vertically. You can use Negative values (e.g. -50) to move it to the opposite direction. + * tone = RGBS (Red, Green, Blue, Sat) to set a color for the MP Bar Display + * Width = The width of the MP Bar. + * Height = The height of the MP Bar. + * rate = What is the source of value that the gauge is displaying. In this case the actor's MP Rate. + * color1 = The first color + * color2 = The second color that color1 will gradiate into. + * backColor = The color of the 'back' of the gauge when you're taking damage. The default is black. + We use hexadecimal values in this case. For an easier reference check this link: + (http://www.w3schools.com/w3css/w3css_color_palettes.asp) + * outlineColor = the bar's outline color. This one uses RGBA (Red, Green, Blue, Alpha) + * direction = The direction of the bar. It could be 'horizontal' or 'vertical' + -------------------------------*/ + class: 'GUIGauge', + + /* Position */ + x: 0, + y: 136, + + /* Color */ + tone: [0,0,0,0], + + /* Basic Properties */ + width: 140, + height: 6, + + rate: 'this.actor.mpRate()', + + color1: '{this.mpGaugeColor1()}', + color2: '{this.mpGaugeColor2()}', + + backColor: '#000000', + outlineColor: 'rgba(0,0,0,0.5)', + + direction: 'horizontal', + + /*------------------------------- + * Lunatic Mode: Conditional Properties + * Refer to the Lunatic Conditions as seen in the header of this script. + * This contain specific examples of how to use the Lunatic Mode conditions. + -------------------------------*/ + conditional: [ + { + condition: 'this.isSelectingEnemy()', + /* If the player is selecting an enemy + ------------------------------ + In this conditional's case based on 'properties' the text + will hide itself until you're done selecting an enemy. + -------------------------------*/ + properties: { + visible: false + } + } + ] + }, // spriteHPGauge + + spriteMPNumber: { + /*------------------------------- + * GUIText: MP Values + * This section involves customizing the MP Values display of the actors. + * X = Move the text horizontally. You can use Negative values (e.g. -50) to move it to the opposite direction. + * Y = Move the text vertically. You can use Negative values (e.g. -50) to move it to the opposite direction. + * tone = RGBS (Red, Green, Blue, Sat) to set a color for the MP Text display + * text = Choose what text to display. It can be an actor's name, class, items, etc. based on the syntax used. + In this one's case it will display as 'MP: 999 / 999' + Do not touch unless you know programming or the basic syntaxes present in MV. + * fontFace = the name of the font you want to use. GameFont refers to default. + * fontSize = the size of the font used. 24 is the default number. + * textColor = the color of the font. We use hexadecimal values in this case. For an easier reference check this link: + (http://www.w3schools.com/w3css/w3css_color_palettes.asp) + * outlineColor = the font's outline color. This one uses RGBA (Red, Green, Blue, Alpha) + -------------------------------*/ + class: 'GUIText', + + /* Position */ + x: 0, + y: 108, + + /* Color */ + tone: [0,0,0,0], + + /* Basic Properties */ + text: 'MP: {this.actor.mp} / {this.actor.mmp}', + + fontFace: 'GameFont', + fontSize: '16', + + textColor: '#ffffff', + outlineColor: 'rgba(0,0,0,0.5)', + + /*------------------------------- + * Lunatic Mode: Conditional Properties + * Refer to the Lunatic Conditions as seen in the header of this script. + * This contain specific examples of how to use the Lunatic Mode conditions. + -------------------------------*/ + conditional: [ + { + condition: 'this.isSelectingEnemy()', + /* If the player is selecting an enemy + ------------------------------ + In this conditional's case based on 'properties' the text + will hide itself until you're done selecting an enemy. + -------------------------------*/ + properties: { + visible: false + } + } + ] + }, // spriteMPNumber + + spriteStates: { + /*------------------------------- + * GUIIcons: State Display + * This section involves customizing the State Display of the actors. + * X = Move the State Display horizontally. You can use Negative values (e.g. -50) to move it to the opposite direction. + * Y = Move the State Display vertically. You can use Negative values (e.g. -50) to move it to the opposite direction. + * tone = RGBS (Red, Green, Blue, Sat) to set a color for the State Display + * iconIds = References which IDs from what place to display. In this case the actor's states. + Do not touch unless you know programming or the basic syntaxes present in MV. + * maxIcons = How many icons to display at once. By default it's 3. + * direction = The direction of the bar. It could be 'horizontal' or 'vertical' + -------------------------------*/ + class: 'GUIIcons', + + /* Position */ + x: 0, + y: 48, + + /* Color */ + tone: [0,0,0,0], + + /* Basic Properties */ + // iconIds eval won't need {} + // can be one or many constant IDs: '[ID1, ID2]' + iconIds: 'this.actor.stateIcons()', + maxIcons: 3, + direction: 'horizontal', + + /*------------------------------- + * Lunatic Mode: Conditional Properties + * Refer to the Lunatic Conditions as seen in the header of this script. + * This contain specific examples of how to use the Lunatic Mode conditions. + -------------------------------*/ + conditional: [ + { + condition: 'this.isSelectingEnemy()', + /* If the player is selecting an enemy + ------------------------------ + In this conditional's case based on 'properties' the text + will hide itself until you're done selecting an enemy. + -------------------------------*/ + properties: { + visible: false + } + } + ] + } // spriteStates + }; + + LunaEngine.Battle.Config.HUD = HUD; + LunaEngine.Battle.Config.GUISprites = GUISprites; +}()); \ No newline at end of file diff --git a/js/plugins/YED_LunaEngine.js b/js/plugins/YED_LunaEngine.js new file mode 100644 index 0000000..c4bf11c --- /dev/null +++ b/js/plugins/YED_LunaEngine.js @@ -0,0 +1,1505 @@ +/** + * @namespace LunaEngine + */ + +var LunaEngine = LunaEngine || {}; + +/** + * @namespace Core + * @memberof LunaEngine + */ +/*============================================================================= + * Luna Engine Core + * By Archeia and Yami. + * Version: 1.0 + * + * Put this below Luna Engine Battle Config in the Plugin Manager. + * + *=============================================================================*/ +/*: + * @plugindesc Put this below Luna Engine Battle Config in the Plugin Manager. + * @author Archeia and Yami + * + * @help + * Put this below Luna Engine Battle Config in the Plugin Manager. + */ + +LunaEngine.Core = {}; +LunaEngine.Core.Sprite = {}; + +/* globals LunaEngine: false */ + +(function($LunaEngine, $Window_Base) { + var GUI = function() { + this.initialize.apply(this, arguments); + }; + + GUI.prototype = Object.create(Sprite_Base.prototype); + GUI.prototype.constructor = GUI; + + GUI.prototype.initialize = function() { + Sprite_Base.prototype.initialize.call(this); + + this._windowskin = null; // for textColor + this._config = {}; + this._attach = {}; + this._select = false; + + this._selectEnemy = false; + this._selectAction = false; + + this._conditions = []; + + this.loadWindowskin(); + }; + + GUI.prototype.setupGUI = function() { + this.updateGUIParams(); + }; + + GUI.prototype.attach = function(name, object) { + if (!!this._attach[name] && this._attach[name] === object) { + return; + } + + this._attach[name] = object; + this.updateGUIParams(); + + Object.defineProperty(this, name, { + get: function() { + return this._attach[name]; + }, + configurable: true + }); + }; + + GUI.prototype.select = function() { + this._select = true; + }; + + GUI.prototype.deselect = function() { + this._select = false; + }; + + GUI.prototype.setSelectEnemy = function(flag) { + this._selectEnemy = flag; + }; + + GUI.prototype.setSelectAction = function(flag) { + this._selectAction = flag; + }; + + GUI.prototype._setupConfig = function(config) { + var result = JSON.parse(JSON.stringify(config)); + + for (var key in result) { + if (typeof result[key] === 'string') { + result[key] = this._evalConfig(result[key]); + } + } + + return result; + }; + + GUI.prototype._evalConfig = function(string) { + var matches, + evals, + thisEval; + + if (!string) { + return ""; + } + + thisEval = function(s) { return eval(s); }; + thisEval = thisEval.bind(this); + + matches = string.match(/\{[^{}]+\}/g); + + if (!matches) { + return string; + } + + evals = matches.map(thisEval); + + for (var i = 0; i < matches.length; i++) { + string = string.replace(matches[i], evals[i]); + } + + return string; + }; + + GUI.prototype._evalCondition = function(config) { + var result = JSON.parse(JSON.stringify(config)), + conditionals = result.conditional, + cond, + evaluate; + + if (!conditionals) { + return result; + } + + for (var i = 0; i < conditionals.length; i++) { + cond = conditionals[i]; + + if (!this._conditions[i]) { + this._conditions[i] = new Function( + 'return ' + cond.condition + ';' + ).bind(this); + } + + evaluate = this._conditions[i]; + + if (!evaluate()) { + continue; + } + + for (var key in cond.properties) { + result[key] = cond.properties[key]; + } + } + + return result; + }; + + /** + * The image used as a window skin. + * + * @property windowskin + * @type Bitmap + */ + Object.defineProperty(GUI.prototype, 'windowskin', { + get: function() { + return this._windowskin; + }, + set: function(value) { + if (this._windowskin !== value) { + this._windowskin = value; + } + }, + configurable: true + }); + + /** + * The image used as a window skin. + * + * @property windowskin + * @type Bitmap + */ + Object.defineProperty(GUI.prototype, 'contents', { + get: function() { + return this.bitmap; + }, + configurable: true + }); + + Object.defineProperty(GUI.prototype, 'config', { + get: function() { + return this._evalCondition(this._config); + }, + set: function(value) { + this._config = JSON.parse(JSON.stringify(value)); + this.setupGUI(); + }, + configurable: true + }); + + GUI.prototype.update = function() { + Sprite_Base.prototype.update.call(this); + + this.updateGUIParams(); + this.updateAnimation(); + }; + + GUI.prototype.updateGUIParams = function() { + this.updateGUIVisible(); + this.updateGUIPosition(); + this.updateGUIColor(); + }; + + GUI.prototype.updateGUIVisible = function() { + var visible = this._getVisible(); + + if (this.visible !== visible) { + this.visible = visible; + } + }; + + GUI.prototype.updateGUIPosition = function() { + var x = this._getX(), + y = this._getY(); + + if (this.x !== x || this.y !== y) { + this.move(x, y); + } + }; + + GUI.prototype.updateGUIColor = function() { + var colorTone = this._getColorTone(); + + this.setColorTone(colorTone); + }; + + GUI.prototype.updateAnimation = function() { + if (!this.actor || !this._isShowAnimation()) { + return; + } + + this.setupAnimation(); + }; + + GUI.prototype.setupAnimation = function() { + while (this.actor.isLunaAnimationRequested()) { + var data = this.actor.shiftLunaAnimation(); + var animation = $dataAnimations[data.animationId]; + var mirror = data.mirror; + var delay = animation.position === 3 ? 0 : data.delay; + this.startAnimation(animation, mirror, delay); + } + }; + + GUI.prototype.refresh = function() { + this._refreshGUI(); + }; + + GUI.prototype._refreshGUI = function() { + // polymorph! + }; + + GUI.prototype._getX = function() { + return this.config.x || 0; + }; + + GUI.prototype._getY = function() { + return this.config.y || 0; + }; + + GUI.prototype._getColorTone = function() { + return this.config.tone || [0,0,0,0]; + }; + + GUI.prototype._getVisible = function() { + if (this.config.visible === undefined) { + return true; + } + + return this.config.visible; + }; + + GUI.prototype._getConditions = function() { + return this._config.conditional; // avoid infinite loops + }; + + GUI.prototype._isShowAnimation = function() { + return !!this._config.showAnimation; + }; + + GUI.prototype.isSelectingActor = function() { + return this._select; + }; + + GUI.prototype.isSelectingEnemy = function() { + return this._selectEnemy; + }; + + GUI.prototype.isSelectingAction = function() { + return this._selectAction; + }; + + // TODO: Try creating a hidden window sharing bitmap with Sprite. + + GUI.prototype.loadWindowskin = $Window_Base.prototype.loadWindowskin; + GUI.prototype.lineHeight = $Window_Base.prototype.lineHeight; + GUI.prototype.standardFontFace = $Window_Base.prototype.standardFontFace; + GUI.prototype.standardFontSize = $Window_Base.prototype.standardFontSize; + GUI.prototype.textPadding = $Window_Base.prototype.textPadding; + GUI.prototype.resetFontSettings = function() {}; + GUI.prototype.resetTextColor = $Window_Base.prototype.resetTextColor; + GUI.prototype.textColor = $Window_Base.prototype.textColor; + GUI.prototype.normalColor = $Window_Base.prototype.normalColor; + GUI.prototype.systemColor = $Window_Base.prototype.systemColor; + GUI.prototype.crisisColor = $Window_Base.prototype.crisisColor; + GUI.prototype.deathColor = $Window_Base.prototype.deathColor; + GUI.prototype.gaugeBackColor = $Window_Base.prototype.gaugeBackColor; + GUI.prototype.hpGaugeColor1 = $Window_Base.prototype.hpGaugeColor1; + GUI.prototype.hpGaugeColor2 = $Window_Base.prototype.hpGaugeColor2; + GUI.prototype.mpGaugeColor1 = $Window_Base.prototype.mpGaugeColor1; + GUI.prototype.mpGaugeColor2 = $Window_Base.prototype.mpGaugeColor2; + GUI.prototype.mpCostColor = $Window_Base.prototype.mpCostColor; + GUI.prototype.powerUpColor = $Window_Base.prototype.powerUpColor; + GUI.prototype.powerDownColor = $Window_Base.prototype.powerDownColor; + GUI.prototype.tpGaugeColor1 = $Window_Base.prototype.tpGaugeColor1; + GUI.prototype.tpGaugeColor2 = $Window_Base.prototype.tpGaugeColor2; + GUI.prototype.tpCostColor = $Window_Base.prototype.tpCostColor; + GUI.prototype.pendingColor = $Window_Base.prototype.pendingColor; + GUI.prototype.translucentOpacity = $Window_Base.prototype.translucentOpacity; + GUI.prototype.changeTextColor = $Window_Base.prototype.changeTextColor; + GUI.prototype.changePaintOpacity = $Window_Base.prototype.changePaintOpacity; + GUI.prototype.drawText = $Window_Base.prototype.drawText; + GUI.prototype.textWidth = $Window_Base.prototype.textWidth; + GUI.prototype.drawTextEx = $Window_Base.prototype.drawTextEx; + GUI.prototype.convertEscapeCharacters = $Window_Base.prototype.convertEscapeCharacters; + GUI.prototype.actorName = $Window_Base.prototype.actorName; + GUI.prototype.partyMemberName = $Window_Base.prototype.partyMemberName; + GUI.prototype.processCharacter = $Window_Base.prototype.processCharacter; + GUI.prototype.processNormalCharacter = $Window_Base.prototype.processNormalCharacter; + GUI.prototype.processNewLine = $Window_Base.prototype.processNewLine; + GUI.prototype.obtainEscapeCode = $Window_Base.prototype.obtainEscapeCode; + GUI.prototype.obtainEscapeParam = $Window_Base.prototype.obtainEscapeParam; + GUI.prototype.processEscapeCharacter = $Window_Base.prototype.processEscapeCharacter; + GUI.prototype.processDrawIcon = $Window_Base.prototype.processDrawIcon; + GUI.prototype.makeFontBigger = $Window_Base.prototype.makeFontBigger; + GUI.prototype.makeFontSmaller = $Window_Base.prototype.makeFontSmaller; + GUI.prototype.calcTextHeight = $Window_Base.prototype.calcTextHeight; + GUI.prototype.drawIcon = $Window_Base.prototype.drawIcon; + GUI.prototype.drawFace = $Window_Base.prototype.drawFace; + GUI.prototype.drawCharacter = $Window_Base.prototype.drawCharacter; + GUI.prototype.drawGauge = $Window_Base.prototype.drawGauge; + + $LunaEngine.Core.Sprite.GUI = GUI; +}(LunaEngine, Window_Base)); + +/* globals LunaEngine: false */ + +(function($LunaEngine, $Window_Base, $Bitmap) { + // dependencies + var GUI = $LunaEngine.Core.Sprite.GUI; + + var GUIIcons = function() { + this.initialize.apply(this, arguments); + + this._iconIds = []; + + this._maxIcons = 1; + this._direction = 'horizontal'; + + this._fnGetIcons = null; + }; + + GUIIcons.prototype = Object.create(GUI.prototype); + GUIIcons.prototype.constructor = GUIIcons; + + GUIIcons.prototype.initialize = function() { + GUI.prototype.initialize.call(this); + }; + + Object.defineProperty(GUIIcons.prototype, 'iconIds', { + get: function() { + return this._iconIds; + }, + set: function(value) { + if (!this._iconIds.equals(value)) { + this._iconIds = value; + this._refreshGUI(); + } + }, + configurable: true + }); + + Object.defineProperty(GUIIcons.prototype, 'maxIcons', { + get: function() { + return this._maxIcons; + }, + set: function(value) { + if (this._maxIcons !== value) { + this._maxIcons = value; + this._refreshGUI(); + } + }, + configurable: true + }); + + Object.defineProperty(GUIIcons.prototype, 'direction', { + get: function() { + return this._direction.toLowerCase(); + }, + set: function(value) { + if (this._direction !== value) { + this._direction = value; + this._refreshGUI(); + } + }, + configurable: true + }); + + GUIIcons.prototype.updateGUIParams = function() { + GUI.prototype.updateGUIParams.call(this); + + this.iconIds = this._getIconIds(); + this.maxIcons = this._getMaxIcons(); + this.direction = this._getDirection(); + }; + + GUIIcons.prototype._refreshGUI = function() { + var width = $Window_Base._iconWidth, + height = $Window_Base._iconHeight, + x = 0, + y = 0; + + if (this.direction === 'horizontal') { + x = width; + width = width * this.maxIcons; + } + + if (this.direction === 'vertical') { + y = height; + height = height * this.maxIcons; + } + + this.bitmap = new $Bitmap(width, height); + + for (var i = 0; i < this.iconIds.length; i++) { + this.drawIcon(this.iconIds[i], x * i, y * i); + } + }; + + GUIIcons.prototype._getIconIds = function() { + var iconIds = this.config.iconIds; + + if (!this._fnGetIcons && !!this.actor) { + this._fnGetIcons = new Function( + 'return ' + iconIds + ';' + ).bind(this); + } + + if (!!this._fnGetIcons) { + return this._fnGetIcons(); + } + + return []; + }; + + GUIIcons.prototype._getMaxIcons = function() { + return this.config.maxIcons || 1; + }; + + GUIIcons.prototype._getDirection = function() { + return this.config.direction || 'horizontal'; + }; + + $LunaEngine.Core.Sprite.GUIIcons = GUIIcons; +}(LunaEngine, Window_Base, Bitmap)); + +/* globals LunaEngine: false */ + +(function($LunaEngine, $Bitmap) { + // dependencies + var GUI = $LunaEngine.Core.Sprite.GUI; + + var GUIText = function() { + this.initialize.apply(this, arguments); + }; + + GUIText.prototype = Object.create(GUI.prototype); + GUIText.prototype.constructor = GUIText; + + GUIText.prototype.initialize = function() { + GUI.prototype.initialize.call(this); + + this.bitmap = new $Bitmap(1,1); + + this._text = ""; + }; + + Object.defineProperty(GUIText.prototype, 'text', { + get: function() { + return this._text; + }, + set: function(value) { + if (this._text !== value) { + this._text = value; + this._refreshGUI(); + } + }, + configurable: true + }); + + Object.defineProperty(GUIText.prototype, 'fontFace', { + get: function() { + return this.contents.fontFace; + }, + set: function(value) { + if (this.contents.fontFace !== value) { + this.contents.fontFace = value; + this._refreshGUI(); + } + }, + configurable: true + }); + + Object.defineProperty(GUIText.prototype, 'fontSize', { + get: function() { + return this.contents.fontSize; + }, + set: function(value) { + if (this.contents.fontSize !== value) { + this.contents.fontSize = value; + this._refreshGUI(); + } + }, + configurable: true + }); + + Object.defineProperty(GUIText.prototype, 'color', { + get: function() { + return this.contents.textColor; + }, + set: function(value) { + if (this.contents.textColor !== value) { + this.contents.textColor = value; + this._refreshGUI(); + } + }, + configurable: true + }); + + Object.defineProperty(GUIText.prototype, 'outlineColor', { + get: function() { + return this._outlineColor; + }, + set: function(value) { + if (this.contents.outlineColor !== value) { + this.contents.outlineColor = value; + this._refreshGUI(); + } + }, + configurable: true + }); + + GUIText.prototype.updateGUIParams = function() { + GUI.prototype.updateGUIParams.call(this); + + this.text = this._getText(); + + this.fontFace = this._getFontFace(); + this.fontSize = this._getFontSize(); + + this.color = this._getTextColor(); + this.outlineColor = this._getOutlineColor(); + }; + + GUIText.prototype._refreshGUI = function() { + var text = this.text, + lines = text.split('\n'), + lineNumber = lines.length, + width = 0, + height = 0; + + for (var i = 0; i < lineNumber; i++) { + if (width < this.textWidth(lines[i])) { + width = this.textWidth(lines[i]); + } + } + + width = width + this.textPadding() * 2; + height = this.lineHeight() * lineNumber; + + this.bitmap = new $Bitmap(width, height); + this.drawTextEx(text, this.textPadding(), 0); + }; + + GUIText.prototype._getText = function() { + return this._evalConfig(this.config.text) || "Test"; + }; + + GUIText.prototype._getFontFace = function() { + return this._evalConfig(this.config.fontFace) || this.standardFontFace(); + }; + + GUIText.prototype._getFontSize = function() { + return this._evalConfig(this.config.fontSize) || this.standardFontSize(); + }; + + GUIText.prototype._getTextColor = function() { + return this._evalConfig(this.config.textColor) || this.normalColor(); + }; + + GUIText.prototype._getOutlineColor = function() { + return this._evalConfig(this.config.outlineColor) || "rgba(0,0,0,0.5)"; + }; + + GUIText.prototype.resetFontSettings = function() { + this.contents.fontFace = this._getFontFace(); + this.contents.fontSize = this._getFontSize(); + + this.contents.textColor = this._getTextColor(); + this.contents.outlineColor = this._getOutlineColor(); + }; + + GUIText.prototype.textPadding = function() { + return 2; + }; + + $LunaEngine.Core.Sprite.GUIText = GUIText; +}(LunaEngine, Bitmap)); + +/* globals LunaEngine: false */ + +(function($LunaEngine, $Window_Base, $Bitmap) { + // dependencies + var GUI = $LunaEngine.Core.Sprite.GUI; + + var GUIFace = function() { + this.initialize.apply(this, arguments); + }; + + GUIFace.prototype = Object.create(GUI.prototype); + GUIFace.prototype.constructor = GUIFace; + + GUIFace.prototype.initialize = function() { + GUI.prototype.initialize.call(this); + + this.bitmap = new $Bitmap($Window_Base._faceWidth, + $Window_Base._faceHeight); + + this._faceName = ""; + this._faceIndex = 0; + }; + + GUIFace.prototype.setupGUI = function() { + GUI.prototype.setupGUI.call(this); + + this.faceName = this._getFaceName(); + this.faceIndex = this._getFaceIndex(); + + ImageManager.loadFace(this.faceName); + }; + + Object.defineProperty(GUIFace.prototype, 'faceName', { + get: function() { + return this._faceName; + }, + set: function(value) { + if (this._faceName !== value) { + this._faceName = value; + this._refreshGUI(); + } + }, + configurable: true + }); + + Object.defineProperty(GUIFace.prototype, 'faceIndex', { + get: function() { + return this._faceIndex; + }, + set: function(value) { + if (this._faceIndex !== value) { + this._faceIndex = value; + this._refreshGUI(); + } + }, + configurable: true + }); + + GUIFace.prototype.updateGUIParams = function() { + GUI.prototype.updateGUIParams.call(this); + + this.faceName = this._getFaceName(); + this.faceIndex = this._getFaceIndex(); + }; + + GUIFace.prototype._refreshGUI = function() { + var faceName = this.faceName, + faceIndex = this.faceIndex; + + this.bitmap.clear(); + this.drawFace(faceName, faceIndex, 0, 0); + }; + + GUIFace.prototype._getFaceName = function() { + return this._evalConfig(this.config.faceName) || ""; + }; + + GUIFace.prototype._getFaceIndex = function() { + return this._evalConfig(this.config.faceIndex) || 0; + }; + + $LunaEngine.Core.Sprite.GUIFace = GUIFace; +}(LunaEngine, Window_Base, Bitmap)); + +/* globals LunaEngine: false */ + +(function($LunaEngine, $ImageManager) { + // dependencies + var GUI = $LunaEngine.Core.Sprite.GUI; + + var GUIImage = function() { + this.initialize.apply(this, arguments); + + this._path = ""; + this._hue = 0; + }; + + GUIImage.prototype.setupGUI = function() { + GUI.prototype.setupGUI.call(this); + + this.path = this._getPath(); + this.hue = this._getHue(); + + $ImageManager.loadNormalBitmap(this.path, this.hue); + }; + + GUIImage.prototype = Object.create(GUI.prototype); + GUIImage.prototype.constructor = GUIImage; + + GUIImage.prototype.initialize = function() { + GUI.prototype.initialize.call(this); + }; + + Object.defineProperty(GUIImage.prototype, 'path', { + get: function() { + return this._path; + }, + set: function(value) { + if (this._path !== value) { + this._path = value; + this._refreshGUI(); + } + }, + configurable: true + }); + + Object.defineProperty(GUIImage.prototype, 'hue', { + get: function() { + return this._hue; + }, + set: function(value) { + if (this._hue !== value) { + this._hue = value; + this._refreshGUI(); + } + }, + configurable: true + }); + + GUIImage.prototype.updateGUIParams = function() { + GUI.prototype.updateGUIParams.call(this); + + this.path = this._getPath(); + this.hue = this._getHue(); + }; + + GUIImage.prototype._refreshGUI = function() { + var path = this._path, + hue = this._hue; + + this.bitmap = $ImageManager.loadNormalBitmap(path, hue); + }; + + GUIImage.prototype._getPath = function() { + return this._evalConfig(this.config.imagePath) || ""; + }; + + GUIImage.prototype._getHue = function() { + return this.config.hue || 0; + }; + + $LunaEngine.Core.Sprite.GUIImage = GUIImage; +}(LunaEngine, ImageManager)); + +/* globals LunaEngine: false */ + +(function($LunaEngine, $Bitmap) { + // dependencies + var GUI = $LunaEngine.Core.Sprite.GUI; + + var GUIGauge = function() { + this.initialize.apply(this, arguments); + + this._gaugeWidth = 0; + this._gaugeHeight = 0; + + this._rate = 0; + + this._color1 = ''; + this._color2 = ''; + + this._backColor = ''; + this._outlineColor = ''; + + this._direction = 'horizontal'; + }; + + GUIGauge.prototype = Object.create(GUI.prototype); + GUIGauge.prototype.constructor = GUIGauge; + + GUIGauge.prototype.initialize = function() { + GUI.prototype.initialize.call(this); + }; + + Object.defineProperty(GUIGauge.prototype, 'gaugeWidth', { + get: function() { + return this._gaugeWidth; + }, + set: function(value) { + if (this._gaugeWidth !== value) { + this._gaugeWidth = value; + this._refreshGUI(); + } + }, + configurable: true + }); + + Object.defineProperty(GUIGauge.prototype, 'gaugeHeight', { + get: function() { + return this._gaugeHeight; + }, + set: function(value) { + if (this._gaugeHeight !== value) { + this._gaugeHeight = value; + this._refreshGUI(); + } + }, + configurable: true + }); + + Object.defineProperty(GUIGauge.prototype, 'color1', { + get: function() { + return this._color1; + }, + set: function(value) { + if (this._color1 !== value) { + this._color1 = value; + this._refreshGUI(); + } + }, + configurable: true + }); + + Object.defineProperty(GUIGauge.prototype, 'color2', { + get: function() { + return this._color2; + }, + set: function(value) { + if (this._color2 !== value) { + this._color2 = value; + this._refreshGUI(); + } + }, + configurable: true + }); + + Object.defineProperty(GUIGauge.prototype, 'rate', { + get: function() { + return this._rate; + }, + set: function(value) { + if ((Math.round(this._rate * 100) / 100) !== (Math.round(value * 100) / 100)) { + this._rate = value; + this._refreshGUI(); + } + }, + configurable: true + }); + + Object.defineProperty(GUIGauge.prototype, 'backColor', { + get: function() { + return this._backColor; + }, + set: function(value) { + if (this._backColor !== value) { + this._backColor = value; + this._refreshGUI(); + } + }, + configurable: true + }); + + Object.defineProperty(GUIGauge.prototype, 'outlineColor', { + get: function() { + return this._outlineColor; + }, + set: function(value) { + if (this._outlineColor !== value) { + this._outlineColor = value; + this._refreshGUI(); + } + }, + configurable: true + }); + + Object.defineProperty(GUIGauge.prototype, 'direction', { + get: function() { + return this._direction; + }, + set: function(value) { + if (this._direction !== value) { + this._direction = value; + this._refreshGUI(); + } + }, + configurable: true + }); + + GUIGauge.prototype.updateGUIParams = function() { + GUI.prototype.updateGUIParams.call(this); + + this.gaugeWidth = this._getGaugeWidth(); + this.gaugeHeight = this._getGaugeHeight(); + + this.rate = this._getRate(); + + this.color1 = this._getColor1(); + this.color2 = this._getColor2(); + + this.backColor = this._getBackColor(); + this.outlineColor = this._getOutlineColor(); + + this.direction = this._getDirection(); + }; + + GUIGauge.prototype._refreshGUI = function() { + if (this.gaugeWidth === 0 || this.gaugeHeight === 0) { + return; + } + + this.bitmap = new $Bitmap(this.gaugeWidth, this.gaugeHeight); + this.drawGauge(0,0,this.gaugeWidth,this.rate,this.color1,this.color2); + }; + + GUIGauge.prototype.drawGauge = function(x, y, width, rate, color1, color2) { + var fillW, + fillH, + height = this.gaugeHeight; + + if (this.direction === 'horizontal') { + fillW = Math.floor(width * rate); + fillH = height; + } + + if (this.direction === 'vertical') { + fillH = Math.floor(height * rate); + fillW = width; + } + + this.contents.fillRect(x, y, width, height, this.outlineColor); + this.contents.fillRect(x+1, y+1, width-2, height-2, this.backColor); + this.contents.gradientFillRect(x+1, y+1, fillW-2, fillH-2, color1, color2); + }; + + GUIGauge.prototype._getGaugeWidth = function() { + return this.config.width || 0; + }; + + GUIGauge.prototype._getGaugeHeight = function() { + return this.config.height || 0; + }; + + GUIGauge.prototype._getRate = function() { + return eval(this.config.rate) || 1.0; + }; + + GUIGauge.prototype._getColor1 = function() { + return this._evalConfig(this.config.color1) || '#000000'; + }; + + GUIGauge.prototype._getColor2 = function() { + return this._evalConfig(this.config.color2) || '#000000'; + }; + + GUIGauge.prototype._getBackColor = function() { + return this._evalConfig(this.config.backColor) || '#000000'; + }; + + GUIGauge.prototype._getOutlineColor = function() { + return this._evalConfig(this.config.outlineColor) || '#000000'; + }; + + GUIGauge.prototype._getDirection = function() { + return this.config.direction || 'horizontal'; + }; + + $LunaEngine.Core.Sprite.GUIGauge = GUIGauge; +}(LunaEngine, Bitmap)); + +/* globals LunaEngine: false */ + +(function() { + + var Config = LunaEngine.Battle.Config.HUD; + var _Window_BattleStatus_update + = Window_BattleStatus.prototype.update; + + Window_BattleStatus.prototype.windowWidth = function() { + return Config.background.window.width; + }; + + Window_BattleStatus.prototype.windowHeight = function() { + return Config.background.window.height; + }; + + Window_BattleStatus.prototype.refresh = function() { + this.contents.clear(); + + this.x = Config.x + Config.background.offsetX; + this.y = Config.y + Config.background.offsetY; + + if (Config.background.type === 'image') { + this._refreshImageBackground(); + } + // this.drawAllItems(); + }; + + Window_BattleStatus.prototype._refreshImageBackground = function() { + var bitmap + = ImageManager.loadSystem(Config.background.image.filename); + + this.opacity = 0; + this._backgroundSprite = this._backgroundSprite || new Sprite(bitmap); + this._backgroundSprite.bitmap = bitmap; + + this.addChild(this._backgroundSprite); + }; + + Window_BattleStatus.prototype.drawItem = function(index) { + // destroy + }; + + Window_BattleStatus.prototype.updateCursor = function() { + // destroy cursor + this.setCursorRect(0, 0, 0, 0); + }; + + Window_BattleStatus.prototype.update = function() { + _Window_BattleStatus_update.call(this); + + this._updateBackgroundSprite(); + }; + + Window_BattleStatus.prototype._updateBackgroundSprite = function() { + if (!this._backgroundSprite) { + return; + } + + this._backgroundSprite.visible = this.openness === 255; + }; + +}()); + +/* globals LunaEngine: false */ + +(function() { + var SpriteClasses = LunaEngine.Core.Sprite; + + var GUIBase = function() { + this.initialize.apply(this, arguments); + }; + + GUIBase.prototype = Object.create(Sprite.prototype); + GUIBase.prototype.constructor = GUIBase; + + GUIBase.prototype.initialize = function() { + Sprite.prototype.initialize.call(this); + + this._config = {}; + this._actor = null; + this._guiSprites = []; + }; + + Object.defineProperty(GUIBase.prototype, 'config', { + get: function() { + return this._config; + }, + set: function(value) { + if (this._config !== value) { + this._config = value; + this.setupGUI(); + } + }, + configurable: true + }); + + Object.defineProperty(GUIBase.prototype, 'actor', { + get: function() { + return this._actor; + }, + set: function(value) { + if (this._actor !== value) { + this._actor = value; + this.onActorChange(); + } + }, + configurable: true + }); + + GUIBase.prototype.setupGUI = function() { + this._createSprites(); + }; + + GUIBase.prototype.refresh = function() { + var sprite; + + for (var i = 0; i < this._guiSprites.length; i++) { + sprite = this._guiSprites[i]; + sprite.refresh(); + } + }; + + GUIBase.prototype.select = function() { + var sprite; + + for (var i = 0; i < this._guiSprites.length; i++) { + sprite = this._guiSprites[i]; + sprite.select(); + } + }; + + GUIBase.prototype.deselect = function() { + var sprite; + + for (var i = 0; i < this._guiSprites.length; i++) { + sprite = this._guiSprites[i]; + sprite.deselect(); + } + }; + + GUIBase.prototype.setSelectEnemy = function(flag) { + var sprite; + + for (var i = 0; i < this._guiSprites.length; i++) { + sprite = this._guiSprites[i]; + sprite.setSelectEnemy(flag); + } + }; + + GUIBase.prototype.setSelectAction = function(flag) { + var sprite; + + for (var i = 0; i < this._guiSprites.length; i++) { + sprite = this._guiSprites[i]; + sprite.setSelectAction(flag); + } + }; + + GUIBase.prototype.onActorChange = function() { + var sprite; + + for (var i = 0; i < this._guiSprites.length; i++) { + sprite = this._guiSprites[i]; + sprite.attach('actor', this.actor); + } + }; + + GUIBase.prototype._createSprites = function() { + var spriteConfig, + Class, + sprite; + + for (var key in this.config) { + spriteConfig = this.config[key]; + + Class = this._getSpriteClass(spriteConfig); + sprite = new Class(); + + sprite.attach('actor', this.actor); + sprite.config = spriteConfig; + + this._guiSprites.push(sprite); + this.addChild(sprite); + + sprite.setupGUI(); + } + }; + + GUIBase.prototype._getSpriteClass = function(config) { + var Class; + + Class = SpriteClasses[config.class]; + return Class; + }; + + LunaEngine.Battle.GUIBase = GUIBase; +}()); + +/* globals LunaEngine: false */ + +(function() { + var Config = LunaEngine.Battle.Config.HUD, + GUIConfig = LunaEngine.Battle.Config.GUISprites, + GUIBase = LunaEngine.Battle.GUIBase; + + var HUD = function() { + this.initialize.apply(this, arguments); + }; + + HUD.prototype = Object.create(Sprite.prototype); + HUD.prototype.constructor = HUD; + + HUD.prototype.initialize = function() { + Sprite.prototype.initialize.call(this); + + this._guiSpritesets = []; + this._actor = null; + this._selectEnemy = false; + this._selectAction = false; + + this.setupGUI(); + }; + + HUD.prototype.setupGUI = function() { + var battlers = $gameParty.battleMembers(), + guiBase; + + for (var i = 0; i < battlers.length; i++) { + guiBase = new GUIBase(); + + guiBase.x = this._getGUIX(i); + guiBase.y = this._getGUIY(i); + + guiBase.actor = battlers[i]; + guiBase.config = this._getGUIConfig(); + + this._guiSpritesets.push(guiBase); + this.addChild(guiBase); + } + }; + + HUD.prototype.select = function(actor) { + this._actor = actor; + }; + + HUD.prototype.setSelectEnemy = function(flag) { + this._selectEnemy = flag; + }; + + HUD.prototype.setSelectAction = function(flag) { + this._selectAction = flag; + }; + + HUD.prototype.refresh = function() { + var spriteset; + + for (var i = 0; i < this._guiSpritesets.length; i++) { + spriteset = this._guiSpritesets[i]; + spriteset.refresh(); + } + }; + + HUD.prototype.update = function() { + Sprite.prototype.update.call(this); + + this.updateActors(); + this.updatePosition(); + this.updateSelecting(); + }; + + HUD.prototype.updateActors = function() { + var battlers = $gameParty.battleMembers(), + spriteset; + + for (var i = 0; i < this._guiSpritesets.length; i++) { + spriteset = this._guiSpritesets[i]; + + if (!battlers[i]) { + this.removeChild(spriteset); + } + + spriteset.actor = battlers[i]; + } + }; + + HUD.prototype.updatePosition = function() { + var spriteset; + + this.x = this._getX(); + this.y = this._getY(); + + for (var i = 0; i < this._guiSpritesets.length; i++) { + spriteset = this._guiSpritesets[i]; + + spriteset.x = this._getGUIX(i); + spriteset.y = this._getGUIY(i); + } + }; + + HUD.prototype.updateSelecting = function() { + var spriteset; + + for (var i = 0; i < this._guiSpritesets.length; i++) { + spriteset = this._guiSpritesets[i]; + spriteset.deselect(); + + spriteset.setSelectEnemy(this._selectEnemy); + spriteset.setSelectAction(this._selectAction); + + if (spriteset.actor === this._actor) { + spriteset.select(); + } + } + }; + + HUD.prototype._getX = function() { + return Config.x || 0; + }; + + HUD.prototype._getY = function() { + return Config.y || 0; + }; + + HUD.prototype._getGUIX = function(index) { + if (Config.direction === 'horizontal') { + return Math.round(Config.width / Config.grid * index); + } + + return 0; + }; + + HUD.prototype._getGUIY = function(index) { + if (Config.direction === 'vertical') { + return Math.round(Config.height / Config.grid * index); + } + + return 0; + }; + + HUD.prototype._getGUIConfig = function() { + return GUIConfig; + }; + + LunaEngine.Battle.HUD = HUD; +}()); + +/* globals LunaEngine: false */ + +(function() { + // dependencies + var HUD = LunaEngine.Battle.HUD, + HUDConfig = LunaEngine.Battle.Config.HUD; + + // alias + var _Sprite_Actor_initMembers = Sprite_Actor.prototype.initMembers, + _Sprite_Actor_setActorHome = Sprite_Actor.prototype.setActorHome, + _Window_BattleActor_maxCols = Window_BattleActor.prototype.maxCols, + _Scene_Battle_createDisplayObjects = Scene_Battle.prototype.createDisplayObjects, + _Scene_Battle_start = Scene_Battle.prototype.start, + _Scene_Battle_stop = Scene_Battle.prototype.stop, + _Scene_Battle_updateStatusWindow = Scene_Battle.prototype.updateStatusWindow; + + Game_Actor.prototype.isSpriteVisible = function() { + if (!HUDConfig.showAnimation) { + return false; + } + + return true; + }; + + Sprite_Actor.prototype.initMembers = function() { + _Sprite_Actor_initMembers.call(this); + this._setupLuna(); + }; + + Sprite_Actor.prototype._setupLuna = function() { + if ($gameSystem.isSideView()) { + return; + } + + this.opacity = 0; + }; + + Sprite_Actor.prototype.setActorHome = function(index) { + if ($gameSystem.isSideView()) { + _Sprite_Actor_setActorHome.call(this, index); + return; + } + + this.setHome(this._getGUIX(index), this._getGUIY(index)); + }; + + Sprite_Actor.prototype._getGUIX = function(index) { + var x = 0; + + if (HUDConfig.direction === 'horizontal') { + x = Math.round(HUDConfig.width / HUDConfig.grid * index); + x += HUDConfig.width / HUDConfig.grid / 2 + } + + x += HUDConfig.x; + + return x; + }; + + Sprite_Actor.prototype._getGUIY = function(index) { + var y = 0; + + if (HUDConfig.direction === 'vertical') { + y = Math.round(HUDConfig.height / HUDConfig.grid * index); + } + + y += HUDConfig.y; + + return y; + }; + + Window_BattleActor.prototype.maxCols = function() { + if (HUDConfig.direction === 'horizontal') { + return $gameParty.battleMembers().length; + } + + return _Window_BattleActor_maxCols.call(this); + }; + + Scene_Battle.prototype.createDisplayObjects = function() { + _Scene_Battle_createDisplayObjects.call(this); + this._createBattleLuna(); + }; + + Scene_Battle.prototype._createBattleLuna = function() { + this._lunaHUD = new HUD(); + this.addWindow(this._lunaHUD); + }; + + Scene_Battle.prototype.start = function() { + _Scene_Battle_start.call(this); + this._setupLuna(); + }; + + Scene_Battle.prototype._setupLuna = function() { + this._lunaHUD.refresh(); + // this._statusWindow.y = 9999; + this._actorWindow.y = 9999; + }; + + Scene_Battle.prototype.stop = function() { + _Scene_Battle_stop.call(this); + this._lunaHUD.visible = false; + }; + + Scene_Battle.prototype.updateStatusWindow = function() { + _Scene_Battle_updateStatusWindow.call(this); + + if ($gameMessage.isBusy()) { + this._lunaHUD.visible = false; + } else if (this.isActive() && !this._messageWindow.isClosing()) { + this._lunaHUD.visible = this._statusWindow.isOpen(); + } + + this._updateLuna(); + }; + + Scene_Battle.prototype.updateWindowPositions = function() { + // destroy + }; + + Scene_Battle.prototype._updateLuna = function() { + this._updateSelectingActor(); + this._updateSelectingEnemy(); + this._updateSelectingAction(); + }; + + Scene_Battle.prototype._updateSelectingActor = function() { + this._lunaHUD.select(BattleManager.actor()); + + if (this._actorWindow.active) { + this._lunaHUD.select(this._actorWindow.actor()); + } + }; + + Scene_Battle.prototype._updateSelectingEnemy = function() { + this._lunaHUD.setSelectEnemy(this._enemyWindow.active); + }; + + Scene_Battle.prototype._updateSelectingAction = function() { + var flag = this._skillWindow.active || this._itemWindow.active; + + this._lunaHUD.setSelectAction(flag); + }; +}()); diff --git a/js/plugins/YED_RetainStatesOnDeath.js b/js/plugins/YED_RetainStatesOnDeath.js new file mode 100644 index 0000000..4d7d93c --- /dev/null +++ b/js/plugins/YED_RetainStatesOnDeath.js @@ -0,0 +1,267 @@ +/*: + * Yami Engine Delta - Retain States On Death + * + * @plugindesc Makes some kinds of state to be retained on actors + * even when they die. + * @author Yami Engine Delta [Dr.Yami] + * + * @help + * There is no Configuration and Plugin Command. + * + * ============================================================================ + * + * States + * To make a state to be retained on death, use the following notetag: + * + * + * ============================================================================ + */ +/*:ja + * Yami Engine Delta - Retain States On Death + * + * @plugindesc キャラクターの死後も、アクターのステートを維持させます + * @author Yami Engine Delta [Dr.Yami] + * + * @help + * このプラグインには、コンフィグやプラグインコマンドはありません。 + * + * ============================================================================ + * + * States + * キャラクターの死後もステートの維持を行いたい場合は、 + * 下記のNotetagを使用してください。 + * + * + * ============================================================================ + */ + + +/** + * @namespace RetainStateOnDeath + * @memberof YED + */ + +var YED = YED || {}; + +// init RetainStateOnDeath module +YED.RetainStateOnDeath = {}; + +/* globals YED: false */ + +(function() { + /** + * Enum for RegExp, used to notetags + * + * @readonly + * @enum {RegExp} + * @memberof YED.RetainStateOnDeath + */ + var Regexp = { + /** + * Retain on death notetag for state + */ + RETAIN: /<(?:retain on death)>/i + }; + + YED.RetainStateOnDeath.Regexp = Regexp; +}()); + +/* globals YED: false */ + +(function() { + /** + * Shorten Dependencies + */ + var Regexp = YED.RetainStateOnDeath.Regexp; + + /** + * Contains utility tools for module. + * + * @namespace Utils + * @memberof YED.RetainStateOnDeath + */ + var Utils = {}; + + /** + * Process notetag function. + * Should be called with DataManager as current object. + * + * @function processNotetag + * @memberof YED.RetainStateOnDeath.Utils + */ + Utils.processNotetags = function() { + var group = $dataStates, // shorten group name + obj, + notedata, + line; + + for (var i = 1; i < group.length; i++) { + obj = group[i]; + notedata = obj.note.split(/[\r\n]+/); + + Utils._processMethods.call(this, obj); + + for (var n = 0; n < notedata.length; n++) { + line = notedata[n]; + Utils._processNotetag.call(this, obj, line); + } + } + }; + + /** + * Add new methods into object. + * + * @function _processMethods + * @memberof YED.RetainStateOnDeath.Utils + * @param {Object} obj Data object + * @private + */ + Utils._processMethods = function(obj) { + obj.isRetainStateOnDeath = Utils.isRetainStateOnDeath; + }; + + /** + * Process notetag for object. + * + * @function _processNotetag + * @memberof YED.RetainStateOnDeath.Utils + * @param {Object} obj Data object + * @param {String} notetag Notetag + * @private + */ + Utils._processNotetag = function(obj, notetag) { + if (notetag.match(Regexp.RETAIN)) { + obj._retainStateOnDeath = true; + } + }; + + /** + * Check if the state is retained on death. + * Should be attached to state object. + * + * @function isRetainStateOnDeath + * @memberof YED.RetainStateOnDeath.Utils + * @return {Boolean} Retain flag + */ + Utils.isRetainStateOnDeath = function() { + return !!this._retainStateOnDeath; + }; + + YED.RetainStateOnDeath.Utils = Utils; +}()); + +/* globals YED: false */ + +/** + * Pre-processes and notetag parsing + */ +(function() { + /** + * Shorten Dependencies + */ + var Utils = YED.RetainStateOnDeath.Utils; + /** + * Aliasing methods + */ + var _Scene_Boot_start = Scene_Boot.prototype.start; + + /** + * Extending: Scene_Boot.prototype.start + * + * Add notetags processing for module. + */ + Scene_Boot.prototype.start = function() { + _Scene_Boot_start.call(this); + + Utils.processNotetags.call(DataManager); + }; +}()); + +(function() { + /** + * Aliasing methods + */ + var _Game_Actor_initialize = Game_Actor.prototype.initialize; + var _Game_Actor_die = Game_Actor.prototype.die; + + /** + * Extending: Game_Actor.prototype.initialize + * + * Add setup retain state on death for Game_Actor. + */ + Game_Actor.prototype.initialize = function(actorId) { + // actual initialize + _Game_Actor_initialize.call(this, actorId); + + // setup retain states on death + this.setupRetainStateOnDeath(); + }; + + /** + * Setup retain state on death for Game Actor + * + * @function external:Game_Actor#setupRetainStateOnDeath + */ + Game_Actor.prototype.setupRetainStateOnDeath = function() { + this._retainStateOnDeath = []; + }; + + /** + * Extending: Game_Actor.prototype.die + * + * Add store and restore states methods. + */ + Game_Actor.prototype.die = function() { + // store states + this.storeRetainStateOnDeath(); + + // actual die + _Game_Actor_die.call(this); + + // restore states + this.restoreRetainStateOnDeath(); + }; + + /** + * Store current states that need to be retained on death. + * + * @function external:Game_Actor#storeRetainStateOnDeath + */ + Game_Actor.prototype.storeRetainStateOnDeath = function() { + var state, // for iterator + storeData, // data hash + states = this.states(); + + for (var i = 0; i < states.length; i++) { + state = states[i]; + + if (state.isRetainStateOnDeath()) { + storeData = {}; + storeData.id = state.id; + storeData.turn = this._stateTurns[state.id]; + storeData.step = this._stateSteps[state.id]; + + this._retainStateOnDeath.push(storeData); + } + } + }; + + /** + * Restore the retained on death states. + * + * @function external:Game_Actor#restoreRetainStateOnDeath + */ + Game_Actor.prototype.restoreRetainStateOnDeath = function() { + var storeData; // data hash + + for (var i = 0; i < this._retainStateOnDeath.length; i++) { + storeData = this._retainStateOnDeath[i]; + + this.addNewState(storeData.id); + this._stateTurns[storeData.id] = storeData.turn; + this._stateSteps[storeData.id] = storeData.step; + } + + this._retainStateOnDeath = []; + }; +}()); diff --git a/js/plugins/YED_SideviewBattler.js b/js/plugins/YED_SideviewBattler.js new file mode 100644 index 0000000..14ddf2f --- /dev/null +++ b/js/plugins/YED_SideviewBattler.js @@ -0,0 +1,954 @@ +/*: + * Yami Engine Delta - Sideview Battler Enhancement + * + * @plugindesc v1.0.0 This plugin allows user to use any kind of sideview battler. + * @author Yami Engine Delta [Dr.Yami] + * + * @param [Default Setting] + * @default + * + * @param Default Frames + * @desc Default frames number for each pose. + * @default 3 + * + * @param Default Speed + * @desc Default speed for each pose. The higher number, the slower motion is. + * @default 12 + * + * @param Default Frame Width + * @desc Default frame width. + * @default 96 + * + * @param Default Frame Height + * @desc Default frame height. + * @default 96 + * + * @param Enable Weapon + * @desc Showing weapon for battler. + * @default false + * + * @help + * There is no Plugin Command for this plugin. + * + * ============================================================================ + * Actors & Enemies Notetags + * + * + * Enable custom sideview battler for actor/enemy with battler set FILENAME. + * + * + * Make this battler use default kind of battler (MV's SV Battlers). + * + * + * Change default number of frames per pose for current battler. + * + * + * Change default speed per pose for current battler. The higher number, the + * slower motion is. + * + * + * Change the frame sizes. + * + * + * Set weapon showing enable for battler. FLAG can be true or false. + * + * + * Add new motion (pose) for current battler, index is row number (start from + * zero). + * + * + * Name: NAME + * Index: INDEX + * Loop + * Frames: X + * Speed: Y + * + * Add new motion (pose) for current battler. + * Loop is for looping motion. + * Frames and Speed is for custom frames and speed from the default ones. + * Loop, Frames and Speed can be omitted. + * ============================================================================ + * Notes + * + * 1. Frame will be started from 0 (first frame of the pose). + * 2. All default motions to be setup: + * walk wait chant guard damage + * evade thrust swing missile skill + * spell item escape victory dying + * abnormal sleep dead + * 3. All battlers should have the motion "walk". If any of default motions is + * not setup, the "other" motion will be used, "walk" will be used instead + * if "other" hasn't been setup. + * 4. Current version only support animated enemies with Yanfly's Animated + * Sideview Enemies. This will be standalone on next version. + * 5. When using with Yanfly's Animated Sideview Enemies, the sprite width and + * height should be set manually instead of 'auto'. + * ============================================================================ + * Compatible + * + * The plugin should be placed under any of other Core script, such as YEP - + * Core Engine. + * + * The plugin should be placed under YEP - Battle Engine Core and YEP - + * Animated Sideview Enemies if used. + * ============================================================================ + */ + +/** + * @namespace SideviewBattler + * @memberof YED + */ + +var YED = YED || {}; + +// init SideviewBattler module +YED.SideviewBattler = {}; + +// Imported +var Imported = Imported || {}; +Imported.YED_SideviewBattler = true; + +/* globals YED: false */ + +(function($SideviewBattler) { + /** + * Enum for RegExp, used to notetags + * + * @readonly + * @enum {RegExp} + * @memberof YED.SideviewBattler + */ + var Regexp = { + /** + * Filename for battler + */ + FILENAME: //i, + + /** + * Default type of set for battler + */ + DEFAULT_TYPE: //i, + + /** + * Default frames + */ + FRAMES: //i, + + /** + * Default frames + */ + SPEED: //i, + + /** + * Frame sizes + */ + SIZES: //i, + + /** + * Enable Weapon + */ + WEAPON_ENABLE: //i, + + /** + * Motions setup + */ + MOTION_QUICK: //i, + + /** + * Motions setup + */ + MOTION_BEGIN: //i, + + /** + * Motions setup + */ + MOTION_END: /<\/Sideview Battler Motion>/i, + + /** + * Motions setup + */ + MOTION_NAME: /Name:[ ]*(.*)/i, + + /** + * Motions setup + */ + MOTION_INDEX: /Index:[ ]*(\d+)/i, + + /** + * Motions setup + */ + MOTION_LOOP: /Loop/i, + + /** + * Motions setup + */ + MOTION_FRAMES: /Frames:[ ]*(\d+)/i, + + /** + * Motions setup + */ + MOTION_SPEED: /Speed:[ ]*(\d+)/i, + }; + + $SideviewBattler.Regexp = Regexp; +}(YED.SideviewBattler)); + +/* globals YED: false */ + +(function($SideviewBattler) { + /** + * Shorten Dependencies + */ + var Regexp = $SideviewBattler.Regexp; + + /** + * Contains utility tools for module. + * + * @namespace Utils + * @memberof YED.SideviewBattler + */ + var Utils = {}; + + /** + * Contains module parsed parameters. + * + * @type {Object} + * @memberOf YED.SideviewBattler.Utils + */ + Utils.parameters = {}; + + /** + * Process parameters function. + * Should be called with DataManager as current object. + * + * @function processParameters + * @memberof YED.SideviewBattler.Utils + */ + Utils.processParameters = function() { + var parameters = PluginManager.parameters('YED_SideviewBattler'), + result = Utils.parameters; + + result['Default Frames'] = + Number(parameters['Default Frames'] || 0); + + result['Default Speed'] = + Number(parameters['Default Speed'] || 0); + + result['Default Frame Width'] = + Number(parameters['Default Frame Width'] || 0); + + result['Default Frame Height'] = + Number(parameters['Default Frame Height'] || 0); + + result['Enable Weapon'] = + eval(parameters['Enable Weapon'].toLowerCase()); + }; + + /** + * Process notetag function. + * Should be called with DataManager as current object. + * + * @function processNotetag + * @memberof YED.SideviewBattler.Utils + */ + Utils.processNotetags = function() { + var groups = [$dataActors, $dataEnemies], + group, obj, + notedata, line, + helpers = {}; // multiline notetag + + for (var j = 0; j < groups.length; j++) { + group = groups[j]; + + for (var i = 1; i < group.length; i++) { + obj = group[i]; + notedata = obj.note.split(/[\r\n]+/); + + Utils._processProperties.call(this, obj); + Utils._processMethods.call(this, obj); + + for (var n = 0; n < notedata.length; n++) { + line = notedata[n]; + Utils._processNotetag.call(this, obj, line, helpers); + } + } + } + }; + + /** + * Add new properties into object. + * + * @function _processProperties + * @memberof YED.SideviewBattler.Utils + * @param {Object} obj Data object + * @private + */ + Utils._processProperties = function(obj) { + obj._sideviewBattler = { + filename: "", + default : false, + frames : Utils.parameters['Default Frames'], + speed : Utils.parameters['Default Speed'], + weapon : Utils.parameters['Enable Weapon'], + sizes : [ + Utils.parameters['Default Frame Width'], + Utils.parameters['Default Frame Height'] + ], + motions : {} + }; + }; + + /** + * Add new methods into object. + * + * @function _processMethods + * @memberof YED.SideviewBattler.Utils + * @param {Object} obj Data object + * @private + */ + Utils._processMethods = function(obj) { + obj.getSideviewBattler = Utils.getSideviewBattler; + obj.isSideviewBattler = Utils.isSideviewBattler; + }; + + /** + * Process notetag for object. + * + * @function _processNotetag + * @memberof YED.SideviewBattler.Utils + * @param {Object} obj Data object + * @param {String} notetag Notetag + * @private + */ + Utils._processNotetag = function(obj, notetag, helpers) { + var sideviewBattler = obj._sideviewBattler, + match, + motion; + + match = notetag.match(Regexp.FILENAME); + if (match) { + sideviewBattler.filename = String(match[1]); + } + + match = notetag.match(Regexp.DEFAULT_TYPE); + if (match) { + sideviewBattler.default = true; + } + + match = notetag.match(Regexp.FRAMES); + if (match) { + sideviewBattler.frames = Number(match[1]); + } + + match = notetag.match(Regexp.SPEED); + if (match) { + sideviewBattler.speed = Number(match[1]); + } + + match = notetag.match(Regexp.SIZES); + if (match) { + sideviewBattler.sizes[0] = Number(match[1]); + sideviewBattler.sizes[1] = Number(match[2]); + } + + match = notetag.match(Regexp.WEAPON_ENABLE); + if (match) { + sideviewBattler.weapon = eval(match[1].toLowerCase()); + } + + match = notetag.match(Regexp.MOTION_QUICK); + if (match) { + motion = {}; + + motion.name = match[1].toLowerCase(); + motion.index = Number(match[2]); + + sideviewBattler.motions[motion.name] = motion; + } + + match = notetag.match(Regexp.MOTION_BEGIN); + if (match) { + helpers.motionFlag = true; + helpers.motion = {}; + return; + } + + match = notetag.match(Regexp.MOTION_END); + if (match) { + motion = helpers.motion; + + helpers.motionFlag = false; + sideviewBattler.motions[motion.name] = motion; + return; + } + + if (helpers.motionFlag) { + motion = helpers.motion; + + match = notetag.match(Regexp.MOTION_NAME); + if (match) { + motion.name = match[1].toLowerCase(); + } + + match = notetag.match(Regexp.MOTION_INDEX); + if (match) { + motion.index = Number(match[1]); + } + + match = notetag.match(Regexp.MOTION_LOOP); + if (match) { + motion.loop = true; + } + + match = notetag.match(Regexp.MOTION_FRAMES); + if (match) { + motion.frames = Number(match[1]); + } + + match = notetag.match(Regexp.MOTION_SPEED); + if (match) { + motion.speed = Number(match[1]); + } + } + }; + + /** + * Get sideview battler infos. + * Should be attached to actor/enemy object. + * + * @function getSideviewBattler + * @memberof YED.SideviewBattler.Utils + * @return {Object} + */ + Utils.getSideviewBattler = function() { + return this._sideviewBattler; + }; + + /** + * Check if is sideview battler. + * Should be attached to actor/enemy object. + * + * @function getSideviewBattler + * @memberof YED.SideviewBattler.Utils + * @return {Object} + */ + Utils.isSideviewBattler = function() { + return this._sideviewBattler.filename !== "" + && !this._sideviewBattler.default; + }; + + $SideviewBattler.Utils = Utils; +}(YED.SideviewBattler)); + +/* globals YED: false */ + +/** + * Pre-processes and notetag parsing + */ +(function($SideviewBattler) { + /** + * Shorten Dependencies + */ + var Utils = $SideviewBattler.Utils; + + /** + * Aliasing methods + */ + var _DataManager_isDatabaseLoaded = DataManager.isDatabaseLoaded; + + /** + * Extending: DataManager.isDatabaseLoaded + * + * Add notetags and parameters processing for module. + */ + DataManager.isDatabaseLoaded = function() { + var loaded = _DataManager_isDatabaseLoaded.call(this); + + if (!loaded) { + return false; + } + + Utils.processParameters.call(DataManager); + Utils.processNotetags.call(DataManager); + + return true; + }; +}(YED.SideviewBattler)); + +(function() { + Game_Battler.prototype.getBattler = function() { + var battler; + + if (this.isActor()) { + battler = this.actor(); + } + + if (this.isEnemy()) { + battler = this.enemy(); + } + + return !!battler ? battler : null; + }; + + Game_Battler.prototype.getSideviewBattler = function() { + var battler = this.getBattler(); + + return !!battler ? battler.getSideviewBattler() : null; + }; + + Game_Battler.prototype.isSideviewBattler = function() { + var battler = this.getBattler(); + + return !!battler ? battler.isSideviewBattler() : false; + }; + + Game_Battler.prototype.isUseWeapon = function() { + var sideviewBattler = this.getSideviewBattler(); + + if (!this.isSideviewBattler()) { + return true; + } + + return sideviewBattler.weapon; + }; + + Game_Battler.prototype.getSideviewFilename = function() { + var sideviewBattler = this.getSideviewBattler(); + + if (!this.isSideviewBattler()) { + return null; + } + + return sideviewBattler.filename; + }; + + Game_Battler.prototype.getSideviewSizes = function() { + var sideviewBattler = this.getSideviewBattler(); + + if (!this.isSideviewBattler()) { + return null; + } + + return sideviewBattler.sizes; + }; + + Game_Battler.prototype.getSideviewMotions = function() { + var sideviewBattler = this.getSideviewBattler(); + + if (!this.isSideviewBattler()) { + return null; + } + + return sideviewBattler.motions; + }; + + Game_Battler.prototype.getFallbackMotion = function() { + var motions = this.getSideviewMotions(); + + if (!this.isSideviewBattler()) { + return null; + } + + if (!!motions.other) { + return motions.other; + } + + return motions.walk; + }; + + Game_Battler.prototype.getSideviewMotion = function(motionName) { + var motions = this.getSideviewMotions(); + + if (!motionName) { + return null; + } + + if (!this.isSideviewBattler()) { + return null; + } + + if (!motions[motionName]) { + return this.getFallbackMotion(); + } + + return motions[motionName]; + }; + + Game_Battler.prototype.getSideviewFrames = function(motionName) { + var sideviewBattler = this.getSideviewBattler(), + motion = this.getSideviewMotion(motionName); + + if (!this.isSideviewBattler()) { + return null; + } + + if (!!motion && !!motion.frames) { + return motion.frames; + } + + return sideviewBattler.frames; + }; + + Game_Battler.prototype.getSideviewSpeed = function(motionName) { + var sideviewBattler = this.getSideviewBattler(), + motion = this.getSideviewMotion(motionName); + + if (!this.isSideviewBattler()) { + return null; + } + + if (!!motion && !!motion.speed) { + return motion.speed; + } + + return sideviewBattler.speed; + }; +}()); + +(function() { + /** + * Aliasing methods + */ + var _Game_Actor_battlerName + = Game_Actor.prototype.battlerName; + + Game_Actor.prototype.battlerName = function() { + if (this.isSideviewBattler()) { + return this.getSideviewFilename(); + } + + return _Game_Actor_battlerName.call(this); + }; +}()); + +(function() { + /** + * Aliasing methods + */ + var _Game_Enemy_battlerName + = Game_Enemy.prototype.battlerName; + + Game_Enemy.prototype.battlerName = function() { + if (this.isSideviewBattler()) { + return this.getSideviewFilename(); + } + + return _Game_Enemy_battlerName.call(this); + }; +}()); + +(function() { + /** + * Aliasing methods + */ + var _Sprite_Actor_initMembers + = Sprite_Actor.prototype.initMembers; + var _Sprite_Actor_setupWeaponAnimation + = Sprite_Actor.prototype.setupWeaponAnimation; + var _Sprite_Actor_startMotion + = Sprite_Actor.prototype.startMotion; + var _Sprite_Actor_forceMotion + = Sprite_Actor.prototype.forceMotion; + var _Sprite_Actor_motionSpeed + = Sprite_Actor.prototype.motionSpeed; + var _Sprite_Actor_updateFrame + = Sprite_Actor.prototype.updateFrame; + var _Sprite_Actor_updateMotionCount + = Sprite_Actor.prototype.updateMotionCount; + + Sprite_Actor.prototype.initMembers = function() { + _Sprite_Actor_initMembers.call(this); + + this._motionName = ""; + }; + + Sprite_Actor.prototype.setupWeaponAnimation = function() { + if (this._actor.isUseWeapon()) { + _Sprite_Actor_setupWeaponAnimation.call(this); + return; + } + + this._actor.clearWeaponAnimation(); + }; + + Sprite_Actor.prototype.startMotion = function(motionType) { + if (this._actor.isSideviewBattler()) { + this.startSideviewMotion(motionType); + return; + } + + _Sprite_Actor_startMotion.call(this, motionType); + }; + + Sprite_Actor.prototype.forceMotion = function(motionType) { + if (this._actor.isSideviewBattler()) { + this.forceSideviewMotion(motionType); + return; + } + + _Sprite_Actor_forceMotion.call(this, motionType); + }; + + Sprite_Actor.prototype.startSideviewMotion = function(motionType) { + if (this._motionName !== motionType) { + this._motionName = motionType; + this._motionCount = 0; + this._pattern = 0; + } + }; + + Sprite_Actor.prototype.forceSideviewMotion = function(motionType) { + this._motionName = motionType; + this._motionCount = 0; + this._pattern = 0; + }; + + Sprite_Actor.prototype.getCurrentMotion = function() { + return this._actor.getSideviewMotion(this._motionName); + }; + + Sprite_Actor.prototype.frameSizes = function() { + return this._actor.getSideviewSizes(); + }; + + Sprite_Actor.prototype.motionFrames = function() { + var motionName = this._motionName; + + if (this._actor.isSideviewBattler()) { + return this._actor.getSideviewFrames(motionName); + } + + return 3; + }; + + Sprite_Actor.prototype.motionSpeed = function() { + var motionName = this._motionName; + + if (this._actor.isSideviewBattler()) { + return this._actor.getSideviewSpeed(motionName); + } + + return _Sprite_Actor_motionSpeed.call(this); + }; + + Sprite_Actor.prototype.updateFrame = function() { + if (this._actor.isSideviewBattler()) { + this.updateSideviewFrame(); + return; + } + + _Sprite_Actor_updateFrame.call(this); + }; + + Sprite_Actor.prototype.updateSideviewFrame = function() { + var bitmap = this._mainSprite.bitmap, + motion = this.getCurrentMotion(), + frameSizes = this.frameSizes(); + + Sprite_Battler.prototype.updateFrame.call(this); + + if (bitmap) { + var motionIndex = motion.index; + var pattern = this._pattern; + var cw = frameSizes[0]; + var ch = frameSizes[1]; + var cx = pattern; + var cy = motionIndex; + this._mainSprite.setFrame(cx * cw, cy * ch, cw, ch); + } + }; + + Sprite_Actor.prototype.updateMotionCount = function() { + if (this._actor.isSideviewBattler()) { + this.updateSideviewMotionCount(); + return; + } + + _Sprite_Actor_updateMotionCount.call(this); + }; + + Sprite_Actor.prototype.updateSideviewMotionCount = function() { + var motion = this.getCurrentMotion(), + speed = this.motionSpeed(), + frames = this.motionFrames(); + + if (!!motion && ++this._motionCount >= speed) { + if (!!motion.loop) { + this._pattern = (this._pattern + 1) % frames; + } else if (this._pattern < frames - 1) { + this._pattern++; + } else { + this.refreshMotion(); + } + this._motionCount = 0; + } + }; +}()); + +(function() { + if (!Imported.YEP_X_AnimatedSVEnemies) { + return; + } + /** + * Aliasing methods + */ + var _Sprite_Enemy_initMembers + = Sprite_Enemy.prototype.initMembers; + var _Sprite_Enemy_setupWeaponAnimation + = Sprite_Enemy.prototype.setupWeaponAnimation; + var _Sprite_Enemy_startMotion + = Sprite_Enemy.prototype.startMotion; + var _Sprite_Enemy_forceMotion + = Sprite_Enemy.prototype.forceMotion; + var _Sprite_Enemy_updateFrame + = Sprite_Enemy.prototype.updateFrame; + var _Sprite_Enemy_updateMotionCount + = Sprite_Enemy.prototype.updateMotionCount; + + Sprite_Enemy.prototype.initMembers = function() { + _Sprite_Enemy_initMembers.call(this); + + this._motionName = ""; + }; + + Sprite_Enemy.prototype.setupWeaponAnimation = function() { + if (this._enemy.isUseWeapon()) { + _Sprite_Enemy_setupWeaponAnimation.call(this); + return; + } + + this._enemy.clearWeaponAnimation(); + }; + + Sprite_Enemy.prototype.startMotion = function(motionType) { + if (this._enemy.isSideviewBattler()) { + this.startSideviewMotion(motionType); + return; + } + + _Sprite_Enemy_startMotion.call(this, motionType); + }; + + Sprite_Enemy.prototype.forceMotion = function(motionType) { + if (this._enemy.isSideviewBattler()) { + this.forceSideviewMotion(motionType); + return; + } + + _Sprite_Enemy_forceMotion.call(this, motionType); + }; + + Sprite_Enemy.prototype.startSideviewMotion = function(motionType) { + if (this._motionName !== motionType) { + this._motionName = motionType; + this._motionCount = 0; + this._pattern = 0; + } + }; + + Sprite_Enemy.prototype.forceSideviewMotion = function(motionType) { + this._motionName = motionType; + this._motionCount = 0; + this._pattern = 0; + }; + + Sprite_Enemy.prototype.getCurrentMotion = function() { + return this._enemy.getSideviewMotion(this._motionName); + }; + + Sprite_Enemy.prototype.frameSizes = function() { + return this._enemy.getSideviewSizes(); + }; + + Sprite_Enemy.prototype.motionFrames = function() { + var motionName = this._motionName; + + if (this._enemy.isSideviewBattler()) { + return this._enemy.getSideviewFrames(motionName); + } + + return 3; + }; + + Sprite_Enemy.prototype.motionSpeed = function() { + var motionName = this._motionName; + + if (this._enemy.isSideviewBattler()) { + return this._enemy.getSideviewSpeed(motionName); + } + + return 12; + }; + + Sprite_Enemy.prototype.updateMotionCount = function() { + if (this._enemy.isSideviewBattler()) { + this.updateSideviewMotionCount(); + return; + } + + _Sprite_Enemy_updateMotionCount.call(this); + }; + + Sprite_Enemy.prototype.updateSideviewMotionCount = function() { + var motion = this.getCurrentMotion(), + speed = this.motionSpeed(), + frames = this.motionFrames(); + + if (!!motion && ++this._motionCount >= speed) { + if (!!motion.loop) { + this._pattern = (this._pattern + 1) % frames; + } else if (this._pattern < frames - 1) { + this._pattern++; + } else { + this.refreshMotion(); + } + this._motionCount = 0; + } + }; + + Sprite_Enemy.prototype.updateFrame = function() { + if (this._enemy.isSideviewBattler()) { + if (Imported.YEP_X_AnimatedSVEnemies) { + this.updateSideviewFrame(); + return; + } + + this.updateSideviewFrame(); + return; + } + + _Sprite_Enemy_updateFrame.call(this); + }; + + // compatible with YEP - Animated Sideview Enemies + Sprite_Enemy.prototype.updateSideviewFrame = function() { + var bitmap = this._mainSprite.bitmap, + motion = this.getCurrentMotion(), + frameSizes = this.frameSizes(); + + Sprite_Battler.prototype.updateFrame.call(this); + + if (bitmap.width <= 0) { + return; + } + + this._effectTarget = this._mainSprite; + + var motionIndex = motion.index; + var pattern = this._pattern; + var cw = frameSizes[0]; + var ch = frameSizes[1]; + var cx = pattern; + var cy = motionIndex; + var cdh = 0; + + if (this._effectType === 'bossCollapse') { + cdh = ch - this._effectDuration; + } + + this.setFrame(cx * cw, cy * ch, cw, ch); + this._mainSprite.setFrame(cx * cw, cy * ch, cw, ch - cdh); + this.adjustMainBitmapSettings(bitmap); + this.adjustSVShadowSettings(); + }; +}()); diff --git a/js/plugins/YED_SingleState.js b/js/plugins/YED_SingleState.js new file mode 100644 index 0000000..8bd928d --- /dev/null +++ b/js/plugins/YED_SingleState.js @@ -0,0 +1,255 @@ +/*: + * Yami Engine Delta - Single State + * + * @plugindesc v1.0.0 This plugin restricts battlers to be affected by only one state. + * @author Yami Engine Delta [Dr.Yami] + * + * @param Replace State + * @desc Allows replacing old state with the new one. + * @default false + * + * @help + * States Notetags + * + * To make state an exception, which can be added when battler has a state. + * + */ + +/** + * @namespace SingleState + * @memberof YED + */ + +var YED = YED || {}; + +// init SingleState module +YED.SingleState = {}; + +/* globals YED: false */ + +(function($SingleState) { + /** + * Enum for RegExp, used to notetags + * + * @readonly + * @enum {RegExp} + * @memberof YED.SingleState + */ + var Regexp = { + /** + * Makes state not single ~ + */ + NOT_SINGLE: /<(?:not single state)>/i + }; + + $SingleState.Regexp = Regexp; +}(YED.SingleState)); + +/* globals YED: false */ + +(function($SingleState) { + /** + * Shorten Dependencies + */ + var Regexp = $SingleState.Regexp; + + /** + * Contains utility tools for module. + * + * @namespace Utils + * @memberof YED.SingleState + */ + var Utils = {}; + + /** + * Contains module parsed parameters. + * + * @type {Object} + * @memberOf YED.SingleState.Utils + */ + Utils.parameters = {}; + + /** + * Process parameters function. + * Should be called with DataManager as current object. + * + * @function processParameters + * @memberof YED.SingleState.Utils + */ + Utils.processParameters = function() { + var parameters = PluginManager.parameters('YED_SingleState'), + result = Utils.parameters; + + result['Replace State'] = + eval(parameters['Replace State'].toLowerCase()); + }; + + /** + * Process notetag function. + * Should be called with DataManager as current object. + * + * @function processNotetag + * @memberof YED.SingleState.Utils + */ + Utils.processNotetags = function() { + var group = $dataStates, // shorten group name + obj, + notedata, line; + + for (var i = 1; i < group.length; i++) { + obj = group[i]; + notedata = obj.note.split(/[\r\n]+/); + + Utils._processProperties.call(this, obj); + Utils._processMethods.call(this, obj); + + for (var n = 0; n < notedata.length; n++) { + line = notedata[n]; + Utils._processNotetag.call(this, obj, line); + } + } + }; + + /** + * Add new properties into object. + * + * @function _processProperties + * @memberof YED.SingleState.Utils + * @param {Object} obj Data object + * @private + */ + Utils._processProperties = function(obj) { + obj._notSingleState = false; + }; + + /** + * Add new methods into object. + * + * @function _processMethods + * @memberof YED.SingleState.Utils + * @param {Object} obj Data object + * @private + */ + Utils._processMethods = function(obj) { + obj.getNotSingleState = Utils.getNotSingleState; + }; + + /** + * Process notetag for object. + * + * @function _processNotetag + * @memberof YED.SingleState.Utils + * @param {Object} obj Data object + * @param {String} notetag Notetag + * @private + */ + Utils._processNotetag = function(obj, notetag) { + var match; + + match = notetag.match(Regexp.NOT_SINGLE); + if (match) { + obj._notSingleState = true; + } + }; + + /** + * Get not single state flag. + * + * @function getNotSingleState + * @memberof YED.SingleState.Utils + * @return {Boolean} Single State?! + */ + Utils.getNotSingleState = function() { + return !!this._notSingleState; + }; + + $SingleState.Utils = Utils; +}(YED.SingleState)); + +/* globals YED: false */ + +/** + * Pre-processes and notetag parsing + */ +(function($SingleState) { + /** + * Shorten Dependencies + */ + var Utils = $SingleState.Utils; + + /** + * Aliasing methods + */ + var _DataManager_isDatabaseLoaded = DataManager.isDatabaseLoaded; + + /** + * Extending: DataManager.isDatabaseLoaded + * + * Add notetags and parameters processing for module. + */ + DataManager.isDatabaseLoaded = function() { + var loaded = _DataManager_isDatabaseLoaded.call(this); + + if (!loaded) { + return false; + } + + Utils.processParameters.call(DataManager); + Utils.processNotetags.call(DataManager); + + return true; + }; +}(YED.SingleState)); + +/* globals YED: false */ + +(function($SingleState) { + /** + * Shorten Dependencies + */ + var Utils = $SingleState.Utils; + + /** + * Aliasing methods + */ + var _Game_Battler_addState + = Game_Battler.prototype.addState; + var _Game_Battler_isStateAddable + = Game_Battler.prototype.isStateAddable; + + Game_Battler.prototype.addState = function(stateId) { + var replace = Utils.parameters['Replace State'], + dead = this.isDead(), + addable = this.isStateAddable(stateId), + notSingle = $dataStates[stateId].getNotSingleState(); + + if (!dead && addable && replace && !notSingle) { + for (var i = 0; i < this.states().length; i++) { + if (this.states()[i].getNotSingleState()) { + continue; + } + + this.eraseState(this.states()[i].id); + this.refresh(); + } + } + + _Game_Battler_addState.call(this, stateId); + }; + + Game_Battler.prototype.isStateAddable = function(stateId) { + var result = _Game_Battler_isStateAddable.call(this, stateId), + single = true; + + if (!Utils.parameters['Replace State']) { + single = !this.states().some(function(state) { + return !state.getNotSingleState(); + }) || this.states().length === 0; + single = single || $dataStates[stateId].getNotSingleState(); + } + + result = result && single; + + return result; + }; +}(YED.SingleState)); diff --git a/js/plugins/YED_Tilemap.js b/js/plugins/YED_Tilemap.js new file mode 100644 index 0000000..8657530 --- /dev/null +++ b/js/plugins/YED_Tilemap.js @@ -0,0 +1,1725 @@ +/*: + * Yami Engine Delta - Tilemap + * + * @plugindesc v1.1.3 Implementation for Tiled Map Editor. + * @author Yami Engine Delta [Dr.Yami] + * + * @help This plugin is to use TileD generated maps for your RPG Maker MV games! + * Follow the instructions to use it: + * + * 1. Create a New Folder named **maps** (without asterisks) inside game project's root folder. + * 2. Create a new map in TileD. The settings must be CSV and Orthogonal. The Tile size you set will be the grid in the game! + * When loading your images, make sure to reference them all in the game's **img/tilesets** folder. + * 3. Export as json file and make sure that the filename is Map*ID*.json. ID being the map's index as seen in the editor. + * 4. Put all json files from Tiled into the **maps** folder. + * 5. Put all tilesets into the game's **img/tilesets** This is a reminder! + * 6. Put `` into an event comment box for positioning. + * 7. For upper layer (layer that ABOVE player), add *Custom Properties* (in Tiled) `layer` with value `upper` + * 8. For lower layer (layer that BELOW player), no need to add anything + * 9. For collision: any Tile Layer with *Custom Properties* (in Tiled) `collision` with value `true` has collision. + * Which mean any tile that is not empty in that Layer will have collision. You can turn off Visible for Collision Layer if you want. + * 10. For Region ID: any Tile Layer with *Custom Properties* (in Tiled) `regionId` with value is number will make any tile that is not empty has a region ID of entered number. + * You can turn off Visible for Region Layer if you want. + * 11. Images for Image Layers should be put in **img/parallaxes** + * 12. For parallax: add *Custom Properties* (in Tiled) `parallax` with value `true` to Image Layer. Add *Custom Properties* `planeX` and `planeY` for parallax moving. + * 13. For arrow passable: add *Custom Properties* (in Tiled) `arrowImpassable` with value `up` `down` `left` or `right` to Tile Layer. Any tile that is not empty on that + * layer will make the *direction* based on `arrowImpassable` value impassable. + * + */ + /*:ja + * Yami Engine Delta - Tilemap + * + * @plugindesc v1.1.3 デフォルトのエディタの代わりに、TileDをマップエディタとして使うことができます。 + * @author Yami Engine Delta [Dr.Yami] + * + * @help デフォルトのエディタの代わりに、TileDをマップエディタとして使うことができます。 + * 使用方法は以下の通りです。 + * + * 1. ゲームのプロジェクト直下のサブフォルダ内に "maps" という名前の新しいフォ + * ルダを作成してください。 + * 2. TileD内で新規マップを作成します。セッティングはCSVとOrthogonalに設定して + * ください。設定したタイルサイズが、ゲーム内のグリッドとなります。 + * イメージをロードする際には、参照先が必ず "img/tilesets" になるようにして + * ください。 + * 3. ファイルをJSON形式でエクスポートし、ファイル名は 「Map*ID*.json」となる + * ようにしてください。(任意のIDを入れる) ここのIDは、エディタ内ではマップの + * インデックスとして表示されます。"00"は使わないようにしてください。 + * 4. TileDから全てのJSONファイルを、 "maps" のフォルダに入れてください。 + * 5. 全てのタイルセットがゲームの "img/tilesets" に入っているか今一度確認して + * ください。 + * 6. `` という文字列をイベントコマンドボックスに挿入し、位置 + * を指定します。 + * 7. 上層(プレイヤーより上)のレイヤーに対しては、"Custom Properties" で、 + * `layer` を `upper` という値で指定してください。 + * 8. 下層(プレイヤーより下)のレイヤーに対しては、何か追加する必要はありません。 + * 9. コリジョンについて:"Custom Properties" を持つタイルレイヤーで、 + * `collision` の値が `true` である場合には、コリジョンを持ちます。 + * つまり、レイヤーの中身が空ではない全てのタイルが、コリジョンを持つという + * ことになります。コリジョンレイヤーを見えなくすることもできます。 + * 10. リージョンIDについて: "Custom Properties" を持つタイルレイヤーで、 + * `regionId` に値が入っている場合には、値が空ではない全てのタイルにその数値が + * 与えられます。リージョンレイヤーを見えなくすることもできます。 + * 11. イメージレイヤーに使われる画像については、"img/parallaxes" に格納して + * ください。 + * 12. パララックスについて:TileD内の *Custom Properties* で、 `parallax` の + * 値を `true` で指定してください。*Custom Properties* で `planeX` と `planeY` + * を指定して、パララックスの動きを指定します。 + * 13. 進行可能方向について:TileD内の *Custom Properties* で、 + * `arrowImpassable` の値を `up` `down` `left` `right` で指定してください。 + * そのレイヤー上の値が空ではない全てのタイルは、`arrowImpassable`の値に基づい + * て、進行不可になります。 + * + */ + + +/** + * @namespace Tilemap + * @memberof YED + */ + +var YED = YED || {}; + +// init Tilemap module +YED.Tilemap = {}; + +(function() { + + ImageManager.loadParserTileset = function(path, hue) { + var paths = path.split("/"), + filename = paths[paths.length - 1], + realPath = "img/tilesets/" + filename; + + return this.loadNormalBitmap(realPath, hue); + }; + + ImageManager.loadParserParallax = function(path, hue) { + var paths = path.split("/"), + filename = paths[paths.length - 1], + realPath = "img/parallaxes/" + filename; + + return this.loadNormalBitmap(realPath, hue); + }; + +}()); + +/* globals YED: false */ + +(function() { + /** + * The Data object is created by {@link YED.Tilemap.Core} to load and + * contain tilemap data from json file + * + * To make sure the scene is ready, loading method should be called + * manually: + * + * ```js + * var data = new YED.Tilemap.Data(); + * data.loadMapFile(); + * ``` + * + * @class + * @memberof YED.Tilemap + */ + var Data = function(data) { + this._loadListeners = []; + this._isExist = false; + this._collision = []; // collision matrix + this._region = []; // region matrix + this._arrows = []; // arrow matrix + this.data = data; + }; + + Object.defineProperties(Data.prototype, { + /** + * Tilemap data, the Data object will load tilemap data into this member + * + * @member {Object} + * @memberof YED.Tilemap.Data# + */ + data: { + get: function() { + return this._data || null; + }, + + set: function(data) { + this._data = data; + this._setupData(); + } + }, + + /** + * Tilemap height, will be number of vertical grids + * + * @member {number} + * @memberof YED.Tilemap.Data# + * @readonly + */ + height: { + get: function() { + return this.data.height; + } + }, + + /** + * Tilemap width, will be number of horizontal grids + * + * @member {number} + * @memberof YED.Tilemap.Data# + * @readonly + */ + width: { + get: function() { + return this.data.width; + } + }, + + /** + * Tile height, will be height of each tile + * + * @member {number} + * @memberof YED.Tilemap.Data# + * @readonly + */ + tileHeight: { + get: function() { + return this.data.tileheight; + } + }, + + /** + * Tile width, will be width of each tile + * + * @member {number} + * @memberof YED.Tilemap.Data# + * @readonly + */ + tileWidth: { + get: function() { + return this.data.tilewidth; + } + }, + + /** + * Tilemap custom properties + * + * @member {Object} + * @memberof YED.Tilemap.Data# + * @readonly + */ + properties: { + get: function() { + return this.data.properties; + } + }, + + /** + * Tilemap layers data + * + * @member {Object[]} + * @memberof YED.Tilemap.Data# + * @readonly + */ + layers: { + get: function() { + return this.data.layers; + } + }, + + /** + * Tilemap tilesets data + * + * @member {Object[]} + * @memberof YED.Tilemap.Data# + * @readonly + */ + tilesets: { + get: function() { + return this.data.tilesets; + } + }, + + collision: { + get: function() { + return this._collision; + } + }, + + region: { + get: function() { + return this._region; + } + }, + + arrows: { + get: function() { + return this._arrows; + } + } + }); + + /** + * Setup things after loaded data + * + * @private + */ + Data.prototype._setupData = function() { + if (!!this.data) { + this._setupCollision(); + this._setupArrows(); + this._setupRegions(); + this._loadTilesets(); + } + }; + + Data.prototype._setupCollision = function() { + var collisionLayers = this._getCollisionLayers(), + i,j, + layer; + + for (i = 0; i < this.width * this.height; i++) { + this.collision[i] = 0; + } + + for (i = 0; i < collisionLayers.length; i++) { + layer = collisionLayers[i]; + + if (!layer.data) { + continue; + } + + for (j = 0; j < layer.data.length; j++) { + if (layer.data[j] > 0) { + this.collision[j] = 1; + } + } + } + }; + + Data.prototype._setupRegions = function() { + var regionLayers = this._getRegionsLayers(), + i,j, + layer; + + for (i = 0; i < this.width * this.height; i++) { + this.region[i] = 0; + } + + for (i = 0; i < regionLayers.length; i++) { + layer = regionLayers[i]; + + if (!layer.data) { + continue; + } + + for (j = 0; j < layer.data.length; j++) { + if (layer.data[j] > 0) { + this.region[j] = parseInt(layer.properties.regionId); + } + } + } + }; + + Data.prototype._setupArrows = function() { + var arrowLayers = this._getArrowLayers(), + i,j, + layer, + bit; + + for (i = 0; i < this.width * this.height; i++) { + this.arrows[i] = 1 | 2 | 4 | 8; + } + + for (i = 0; i < arrowLayers.length; i++) { + layer = arrowLayers[i]; + + if (!layer.data) { + continue; + } + + if (layer.properties.arrowImpassable === "left") { + bit = 1; + } + + if (layer.properties.arrowImpassable === "up") { + bit = 2; + } + + if (layer.properties.arrowImpassable === "right") { + bit = 4; + } + + if (layer.properties.arrowImpassable === "down") { + bit = 8; + } + + for (j = 0; j < layer.data.length; j++) { + if (layer.data[j] > 0) { + this.arrows[j] = this.arrows[j] ^ bit; + } + } + } + }; + + Data.prototype._loadTilesets = function() { + var tilesetsData = this.tilesets, + i = 0, + length = tilesetsData.length, + data; + + for (; i < length; i++) { + data = tilesetsData[i]; + ImageManager.loadParserTileset(data.image, 0); + } + }; + + Data.prototype._getCollisionLayers = function() { + return this.layers.filter(function(layer) { + return !!layer.properties && !!layer.properties.collision; + }); + }; + + Data.prototype._getRegionsLayers = function() { + return this.layers.filter(function(layer) { + return !!layer.properties && !!layer.properties.regionId; + }); + }; + + Data.prototype._getArrowLayers = function() { + return this.layers.filter(function(layer) { + return !!layer.properties && !!layer.properties.arrowImpassable; + }); + }; + + Data.prototype.getImageLayers = function() { + return this.layers.filter(function(layer) { + return layer.type === "imagelayer"; + }); + }; + + /** + * Check if the data is finished loading + * + * @return {Boolean} Ready flag + */ + Data.prototype.isReady = function() { + return !!this.data; // hack boolean + }; + + /** + * Check if map data exists + * + * @return {Boolean} Exist flag + */ + Data.prototype.isExist = function() { + return this._isExist; + }; + + YED.Tilemap.Data = Data; +}()); + +/* globals YED: false */ + +(function() { + /** + * The Tileset objects are created by {@link YED.Tilemap.Core Tilemap.Core} to load + * tileset textures and return tile blocks when needed + * + * A Tileset object is created with a tileset data gets from {@link YED.Tilemap.Data#tilesets Tilemap.Data#tilesets}, + * for example: + * + * ```js + * var tilesetData = data.tilesets[0]; + * var tileset = new YED.Tilemap.Tileset(tilesetData); + * ``` + * @class + * @memberof YED.Tilemap + * @param {Object} data A Tileset data gets from {@link YED.Tilemap.Data#tilesets Tilemap.Data#tilesets} + */ + var Tileset = function(data) { + this.data = data; + }; + + Object.defineProperties(Tileset.prototype, { + /** + * Tileset data get from tilemap data + * + * @member {Object} + * @memberof YED.Tilemap.Tileset# + */ + data: { + get: function() { + return this._data || null; + }, + + set: function(data) { + this._data = data; + this._setupData(); + } + }, + + /** + * ID of the first tile in tileset + * + * @member {number} + * @memberof YED.Tilemap.Tileset# + * @readonly + */ + firstId: { + get: function() { + return this.data.firstgid; + } + }, + + /** + * Tileset bitmap, use Bitmap object of RMMV framework + * + * @member {Bitmap} + * @memberof YED.Tilemap.Tileset# + */ + bitmap: { + get: function() { + return this._bitmap || null; + }, + + set: function(bitmap) { + this._bitmap = bitmap || null; + } + }, + + /** + * Tileset bitmap height + * + * @member {number} + * @memberof YED.Tilemap.Tileset# + * @readonly + */ + imageHeight: { + get: function() { + return this.data.imageheight; + } + }, + + /** + * Tileset bitmap width + * + * @member {number} + * @memberof YED.Tilemap.Tileset# + * @readonly + */ + imageWidth: { + get: function() { + return this.data.imagewidth; + } + }, + + /** + * @member {number} + * @memberof YED.Tilemap.Tileset# + * @readonly + */ + tileHeight: { + get: function() { + return this.data.tileheight; + } + }, + + /** + * @member {number} + * @memberof YED.Tilemap.Tileset# + * @readonly + */ + tileWidth: { + get: function() { + return this.data.tilewidth || 0; + } + } + }); + + /** + * Setup things after loaded data + * + * @private + */ + Tileset.prototype._setupData = function() { + if (!!this.data) { + this.bitmap = ImageManager.loadParserTileset(this.data.image, 0); + } + }; + + /** + * Get number of tiles in each line of tileset + * + * @return {number} Tiles count + * @private + */ + Tileset.prototype._countTilesHorizontal = function() { + return Math.floor(this.imageWidth / this.tileWidth); + }; + + /** + * Get number of tiles in each column of tileset + * + * @return {number} Tiles count + * @private + */ + Tileset.prototype._countTilesVertical = function() { + return Math.floor(this.imageHeight / this.tileHeight); + }; + + /** + * Get total tiles in tileset + * + * @return {number} Tiles count + */ + Tileset.prototype.getTotalTiles = function() { + return this._countTilesHorizontal() * this._countTilesVertical(); + }; + + /** + * Get grid position of tile, take tile ID as param + * + * @param {number} id Tile ID in layer data + * @return {Object} Object contains {x,y} + * @private + */ + Tileset.prototype._getTilePosition = function(id) { + var realId = id - this.firstId, + result = {x: 0, y: 0}, + tileX = realId % this._countTilesHorizontal(), + tileY = Math.floor(realId / this._countTilesHorizontal()); + + result.x = tileX; + result.y = tileY; + + return result; + }; + + /** + * Get tile block rectangle, take tile ID as param + * + * @param {number} id Tile ID in layer data + * @return {Object} Object contains {x,y,width,height} + * @private + */ + Tileset.prototype._getTileBlock = function(id) { + var pos = this._getTilePosition(id); + var result = {x: 0, y: 0, width: 0, height: 0}; + + result.x = pos.x * this.tileWidth; + result.y = pos.y * this.tileHeight; + result.width = this.tileWidth; + result.height = this.tileHeight; + + return result; + }; + + /** + * Get parameters for bitmap block transfer function + * + * @param {number} id Tile ID in layer data + * @param {number} x Destination X + * @param {number} y Destination Y + * @return {number[]} Array parameters + */ + Tileset.prototype.getBlockTransferParams = function(id, x, y) { + var tileBlock = this._getTileBlock(id); + var result = []; + + result.push(this.bitmap); + result.push(tileBlock.x, tileBlock.y, tileBlock.width, tileBlock.height); + result.push(x, y); + + return result; + }; + + /** + * Check if tile ID is included in tileset + * + * @param {number} id Tile ID in layer data + * @return {Boolean} Is in tileset + */ + Tileset.prototype.isInTileset = function(id) { + var lastId = this.firstId + this.getTotalTiles(); + + return id >= this.firstId && id < lastId; + }; + + /** + * Check if the tileset bitmap is finished loading + * + * @return {Boolean} Ready Flag + */ + Tileset.prototype.isReady = function() { + return ImageManager.isReady(); + }; + + YED.Tilemap.Tileset = Tileset; +}()); + +/* globals YED: false */ + +(function() { + /** + * The Layer object extends Sprite object in RMMV framework, is created + * by {@link YED.Tilemap.Core} to render a layer in tilemap + * + * A Layer can be created and render by simply creating a new Layer object + * and add into a {@link http://www.goodboydigital.com/pixijs/docs/classes/DisplayObjectContainer.html PIXI.DisplayObjectContainer} object: + * + * ```js + * var layer = new YED.Tilemap.Layer(data, tilesets, tileWidth, tileHeight); + * scene.addChild(layer); + * ``` + * + * @class + * @extends Sprite + * @memberof YED.Tilemap + * @param {Object} data A Layer data gets from {@link YED.Tilemap.Data#layers Tilemap.Data#layers} + * @param {YED.Tilemap.Tileset[]} tilesets An array of {@link YED.Tilemap.Tileset Tilemap.Tileset} + * @param {number} tileWidth Width of each tile + * @param {number} tileHeight Height of each tile + */ + var Layer = function() { + this.initialize.apply(this, arguments); + }; + + // extends Sprite + Layer.prototype = Object.create(Sprite.prototype); + Layer.prototype.constructor = Layer; + + // initialize, inherited from Sprite + Layer.prototype.initialize = function(data, tilesets, tileWidth, tileHeight) { + Sprite.prototype.initialize.call(this); + + this.data = data; + this.tilesets = tilesets; + + this.tileWidth = tileWidth; + this.tileHeight = tileHeight; + + this._tilingSprite = null; + + if (!this.data.visible) { + this.visible = false; + } + }; + + Object.defineProperties(Layer.prototype, { + /** + * Layer data get from tilemap data + * + * @member {Object} + * @memberof YED.Tilemap.Layer# + */ + data: { + get: function() { + return this._data || null; + }, + + set: function(data) { + this._data = data; + this._setupData(); + } + }, + + gridHorz: { + get: function() { + return this._gridHorz || 0; + }, + + set: function(grid) { + this._gridHorz = grid; + } + }, + + gridVert: { + get: function() { + return this._gridVert || 0; + }, + + set: function(grid) { + this._gridVert = grid; + } + }, + + /** + * Height of each tile in layer + * + * @member {number} + * @memberof YED.Tilemap.Layer# + */ + tileHeight: { + get: function() { + return this._tileHeight || 0; + }, + + set: function(height) { + this._tileHeight = height; + } + }, + + /** + * Width of each tile in layer + * + * @member {number} + * @memberof YED.Tilemap.Layer# + */ + tileWidth: { + get: function() { + return this._tileWidth || 0; + }, + + set: function(width) { + this._tileWidth = width; + } + }, + + /** + * Tiles data, an one dimensional array contains tile IDs + * + * @member {number[]} + * @memberof YED.Tilemap.Layer# + * @readonly + */ + tilesData: { + get: function() { + return this.data.data; + } + }, + + /** + * Objects data, an one dimensional array contains object data + * + * @member {Object[]} + * @memberof YED.Tilemap.Layer# + * @readonly + */ + objectsData: { + get: function() { + return this.data.objects; + } + }, + + /** + * Tilesets used for layer + * + * @member {YED.Tilemap.Tileset[]} + * @memberof YED.Tilemap.Layer# + */ + tilesets: { + get: function() { + return this._tilesets || []; + }, + + set: function(tilesets) { + this._tilesets = tilesets; + } + }, + + /** + * Layer custom properties + * + * @member {Object} + * @memberof YED.Tilemap.Layer# + * @readonly + */ + properties: { + get: function() { + return this.data.properties || {}; + } + } + }); + + /** + * Setup things after loaded data + * + * @private + */ + Layer.prototype._setupData = function() { + if (!!this.data) { + this.gridHorz = this.data.width; + this.gridVert = this.data.height; + } + }; + + /** + * Check if layer is tile-based layer + * + * @return {Boolean} + */ + Layer.prototype.isTileLayer = function() { + return this.data.type === 'tilelayer'; + }; + + /** + * Check if layer is object-based layer or tile-based layer + * + * @return {Boolean} + */ + Layer.prototype.isObjectLayer = function() { + return this.data.type === 'objectgroup'; + }; + + /** + * Check if layer is image-based layer + * + * @return {Boolean} + */ + Layer.prototype.isImageLayer = function() { + return this.data.type === 'imagelayer'; + }; + + /** + * Check if layer is plane layer + * + * @return {Boolean} + */ + Layer.prototype.isPlaneLayer = function() { + return this.isImageLayer() + && !!this.properties + && !!this.properties.parallax; + }; + + Layer.prototype.isLoopHorizontal = function() { + return $gameMap.isLoopHorizontal(); + }; + + Layer.prototype.isLoopVertical = function() { + return $gameMap.isLoopVertical(); + }; + + Layer.prototype.isLoop = function() { + return this.isLoopHorizontal() || this.isLoopVertical(); + }; + + Layer.prototype.isCollisionLayer = function() { + return !!this.properties && !!this.properties.collision; + }; + + Layer.prototype.isRegionLayer = function() { + return !!this.properties && !!this.properties.regionId; + }; + + Layer.prototype.isUpperLayer = function() { + if (!!this.properties.layer) { + return this.properties.layer.toLowerCase() === 'upper'; + } + + return false; + }; + + /** + * Render layer with given data and tilesets + */ + Layer.prototype.renderLayer = function() { + this._layerBitmap = this._layerBitmap + || new Bitmap(this.gridHorz * this.tileWidth, + this.gridVert * this.tileHeight); + + // different methods for tile-based and object-based layer + if (this.isObjectLayer()) { + this._renderObjectLayer(); + } + + if (this.isTileLayer()) { + this._renderTileLayer(); + } + + if (this.isImageLayer() && !this.isPlaneLayer()) { + this._renderImageLayer(); + } + + if (this.isPlaneLayer()) { + this._renderPlaneLayer(); + } + }; + + /** + * Render tile-based layer + * + * @private + */ + Layer.prototype._renderTileLayer = function() { + var i = 0, + length = this.tilesData.length, // tiles data iterator, fuck js + tileId, + bitmapX, + bitmapY; + + for (; i < length; i++) { + tileId = this.tilesData[i]; + + bitmapX = i % this._gridHorz; + bitmapX = bitmapX * this.tileWidth; + + bitmapY = Math.floor(i / this._gridHorz); + bitmapY = bitmapY * this.tileHeight; + + // skip tileId zero (none tile) + if (tileId === 0) { + continue; + } + + this._drawTile(tileId, bitmapX, bitmapY); + } + + if (this.isLoop) { + this._renderLoopLayer(); + } else { + this.bitmap = this._layerBitmap; + } + }; + + /** + * Render object-based layer + * + * @private + */ + Layer.prototype._renderObjectLayer = function() { + var i = 0, + length = this.objectsData.length, + tileId, + bitmapX, + bitmapY, + data; + + for (; i < length; i++) { + data = this.objectsData[i]; + + tileId = data.gid; + + bitmapX = Math.round(data.x); + bitmapY = Math.round(data.y - data.height); + + if (tileId === 0) { + continue; + } + + this._drawTile(tileId, bitmapX, bitmapY); + } + + if (this.isLoop) { + this._renderLoopLayer(); + } else { + this.bitmap = this._layerBitmap; + } + }; + + Layer.prototype._renderLoopLayer = function() { + var tilingWidth, + tilingHeight; + + tilingWidth = this.isLoopHorizontal() ? + Graphics.width : this._layerBitmap.width; + + tilingHeight = this.isLoopVertical() ? + Graphics.height : this._layerBitmap.height; + + this._tilingSprite = new TilingSprite(this._layerBitmap); + this._tilingSprite.move(0, 0, + tilingWidth, tilingHeight); + this.addChild(this._tilingSprite); + }; + + /** + * Render object-based layer + * + * @private + */ + Layer.prototype._renderImageLayer = function() { + var dest = this._layerBitmap, + img = ImageManager.loadParserParallax(this.data.image, 0); + + dest.blt(img, 0, 0, img.width, img.height, this.data.x, this.data.y); + this.bitmap = this._layerBitmap; + }; + + /** + * Render object-based layer + * + * @private + */ + Layer.prototype._renderPlaneLayer = function() { + var img = ImageManager.loadParserParallax(this.data.image, 0); + + this._tilingSprite = new TilingSprite(img); + this._tilingSprite.move(this.data.x, this.data.y, + Graphics.width, Graphics.height); + this.addChild(this._tilingSprite); + }; + + /** + * Get tileset which contains the drawing tile + * + * @param {number} tileId Tile ID in layer data + * @return {YED.Tilemap.Tileset|null} Tileset contains tile ID + * @private + */ + Layer.prototype._getTileset = function(tileId) { + var i = 0, + length = this.tilesets.length, + tileset; // for tilesets iterator + + for (; i < length; i++) { + tileset = this.tilesets[i]; + + // skip current tileset if tileId is not in this tileset + if (tileset.isInTileset(tileId) === false) { + continue; + } + + return tileset; + } // end tilesets loop + + return null; + }; + + /** + * Draw a tile on specific coordination + * + * @param {number} tileId Tile ID in layer data + * @param {number} x Real X on bitmap + * @param {number} y Real Y on bitmap + */ + Layer.prototype._drawTile = function(tileId, x, y) { + var tileset = this._getTileset(tileId); + var params = tileset.getBlockTransferParams(tileId, x, y); + var dest = this._layerBitmap; + + dest.blt.apply(dest, params); + }; + + Layer.prototype.update = function() { + this._updatePlane(); + }; + + Layer.prototype._updatePlane = function() { + var xSpeed = parseInt(this.properties.planeX), + ySpeed = parseInt(this.properties.planeY), + ox, + oy, + mOx, + mOy; + + if (!this._tilingSprite) { + return; + } + + ox = this._tilingSprite.origin.x; + oy = this._tilingSprite.origin.y; + + mOx = this._tilingSprite.bitmap.width; + mOy = this._tilingSprite.bitmap.height; + + if (!!xSpeed) { + this._tilingSprite.origin.x = (ox + xSpeed) % mOx; + } + + if (!!ySpeed) { + this._tilingSprite.origin.y = (oy + ySpeed) % mOy; + } + }; + + Layer.prototype.moveLoopLayer = function(x, y) { + if (!this._tilingSprite) { + return; + } + + this._tilingSprite.origin.x = x; + this._tilingSprite.origin.y = y; + }; + + YED.Tilemap.Layer = Layer; +}()); + +/* globals YED: false */ + +(function() { + // Shorten dependencies + var Data = YED.Tilemap.Data, + Tileset = YED.Tilemap.Tileset, + Layer = YED.Tilemap.Layer; + + /** + * The Core object is the bootstrap to load and render tilemap to the screen + * + * A tilemap can be created inside a scene with a single statement + * + * ```js + * var tilemap = new YED.Tilemap.Core(); + * this.addChild(tilemap); // add tilemap to scene + * ``` + * + * @class + * @extends PIXI.DisplayObjectContainer + * @memberof YED.Tilemap + */ + var Core = function() { + PIXI.DisplayObjectContainer.call(this); + + this.setup(); + }; + + Core.dataMap = null; + Core.noMap = false; + Core.singleton = null; + + Core.loadMapFile = function() { + var filePath = Core.getFilePath(); + Core.loadFile(filePath); + }; + + Core.unloadMap = function() { + Core.dataMap = null; + Core.noMap = false; + }; + + Core.loadFile = function(filePath) { + var xhr = new XMLHttpRequest(); + xhr.open('GET', filePath); + xhr.overrideMimeType('application/json'); + + // on success callback + xhr.onreadystatechange = function() { + if (xhr.readyState === 4) { + if (xhr.status === 200 || xhr.responseText !== "") { + Core.dataMap = JSON.parse(xhr.responseText); + } else { + // Core.noMap = true; + throw new Error('[YED#Tilemap] Loading error'); + } + } + }; + + // set data to null and send request + Core.unloadMap(); + xhr.send(); + }; + + /** + * Get file path with filename to the json file for automatically loading + * + * @return {string} The path and filename to json file + * @private + */ + Core.getFilePath = function() { + return Core.getPath() + Core.getFilename(); + }; + + /** + * Get path to json file + * + * @return {string} The path to json file + * @private + */ + Core.getPath = function() { + return './maps/'; + }; + + /** + * Get json filename + * + * @return {string} Filename + * @private + */ + Core.getFilename = function() { + var id = Core.getMapId(); + return 'Map' + id + '.json'; + }; + + /** + * Get map ID from RMMV framework for search json file + * + * @return {number} Map ID + * @private + */ + Core.getMapId = function() { + var isTransferring = $gamePlayer.isTransferring(); + return isTransferring ? $gamePlayer.newMapId() : $gameMap.mapId(); + }; + + Core.isMapLoaded = function() { + return !!Core.dataMap || !!Core.noMap; + }; + + Core.isDefaultMap = function() { + return !Core.dataMap && !!Core.noMap; + }; + + Core.prototype = Object.create(PIXI.DisplayObjectContainer.prototype); + Core.prototype.constructor = Core; + + Object.defineProperties(Core.prototype, { + data: { + get: function() { + return this._data || null; + }, + + set: function(data) { + this._data = data; + } + }, + + tilesets: { + get: function() { + return this._tilesets || []; + }, + + set: function(tilesets) { + this._tilesets = tilesets; + } + }, + + layers: { + get: function() { + return this.lowerLayers.concat(this.upperLayers); + } + }, + + upperLayers: { + get: function() { + return this._upperLayers; + } + }, + + lowerLayers: { + get: function() { + return this._lowerLayers; + } + } + }); + + Core.prototype.setup = function() { + this._clearData(); + this._setupData(); + this._setupLayers(); + this._setupTilesets(); + this._setupParallaxes(); + }; + + Core.prototype._clearData = function() { + this._data = null; + this._tilesets = []; + this._needRefresh = false; + this._upperLayers = []; + this._lowerLayers = []; + this.z = -1; + }; + + Core.prototype._setupData = function() { + this.data = new Data(Core.dataMap); + }; + + Core.prototype._setupTilesets = function() { + var tilesetsData = this.data.tilesets, + i = 0, + length = tilesetsData.length, + data; + + for (; i < length; i++) { + data = tilesetsData[i]; + this.tilesets.push(new Tileset(data)); + } + }; + + Core.prototype._setupParallaxes = function() { + var imageData = this.data.getImageLayers(), + i = 0, + length = imageData.length; + + for (; i < length; i++) { + ImageManager.loadParserParallax(imageData[i].image, 0); + } + }; + + Core.prototype._setupLayers = function() { + var layersData = this.data.layers, + i = 0, + length = layersData.length, + data, + layer; + + for (; i < length; i++) { + data = layersData[i]; + layer = new Layer(data, this.tilesets, + this.data.tileWidth, this.data.tileHeight); + + if (layer.isUpperLayer()) { + this.upperLayers.push(layer); + } else { + this.lowerLayers.push(layer); + } + + // this.addChild(layer); + // this.layers.push(layer); + } + }; + + Core.prototype.update = function() { + this._updateRender(); + }; + + Core.prototype._updateRender = function() { + if (this._needRefresh && ImageManager.isReady()) { + this.render(); + this._needRefresh = false; + } + }; + + Core.prototype.render = function() { + var layers = this.layers, + i = 0, + length = layers.length, + layer; + + for (; i < length; i++) { + layer = layers[i]; + layer.renderLayer(); + } + }; + + Core.prototype.refresh = function() { + this._needRefresh = true; + }; + + /** + * Check if map data exists + * + * @return {Boolean} Exist flag + */ + Core.prototype.isExist = function() { + return this.data.isExist(); + }; + + YED.Tilemap.Core = Core; +}()); + +/* globals YED: false */ + +(function() { + + var _DataManager_loadMapData = DataManager.loadMapData; + var _DataManager_isMapLoaded = DataManager.isMapLoaded; + var _Scene_Map_onMapLoaded = Scene_Map.prototype.onMapLoaded; + var _Game_Map_setup = Game_Map.prototype.setup; + var _Game_Map_tileWidth = Game_Map.prototype.tileWidth; + var _Game_Map_tileHeight = Game_Map.prototype.tileHeight; + var _Game_Map_width = Game_Map.prototype.width; + var _Game_Map_height = Game_Map.prototype.height; + var _Game_Event_setupPage = Game_Event.prototype.setupPage; + var _Game_CharacterBase_distancePerFrame + = Game_CharacterBase.prototype.distancePerFrame; + var _Spriteset_Map_createTilemap + = Spriteset_Map.prototype.createTilemap; + + DataManager.loadMapData = function(mapId) { + _DataManager_loadMapData.call(this, mapId); + + this.loadYEDMapData(mapId); + }; + + DataManager.loadYEDMapData = function(mapId) { + if (mapId > 0) { + YED.Tilemap.Core.loadMapFile(); + } else { + YED.Tilemap.Core.unloadMap(); + } + }; + + DataManager.isMapLoaded = function() { + var defaultLoaded = _DataManager_isMapLoaded.call(this); + var yedTilemapLoaded = YED.Tilemap.Core.isMapLoaded(); + + return defaultLoaded && yedTilemapLoaded; + }; + + Scene_Map.prototype.onMapLoaded = function() { + $gameMap.setupYEDTilemap(); + + _Scene_Map_onMapLoaded.call(this); + }; + + Game_Map.prototype.setup = function(mapId) { + this.setupYEDTilemap(); + + _Game_Map_setup.call(this, mapId); + }; + + Game_Map.prototype.setupYEDTilemap = function() { + // this._yed_tilemap = new YED.Tilemap.Core(); + YED.Tilemap.Core.singleton + = YED.Tilemap.Core.singleton || new YED.Tilemap.Core(); + + YED.Tilemap.Core.singleton.setup(); + + // overwrite dataMap width/height + $dataMap.width = this._yedTilemapData().width; + $dataMap.height = this._yedTilemapData().height; + }; + + Game_Map.prototype._yedTilemapData = function() { + return YED.Tilemap.Core.singleton.data; + }; + + Game_Map.prototype.oldTileWidth = function() { + return _Game_Map_tileWidth.call(this); + }; + + Game_Map.prototype.oldTileHeight = function() { + return _Game_Map_tileHeight.call(this); + }; + + Game_Map.prototype.oldWidth = function() { + return _Game_Map_width.call(this); + }; + + Game_Map.prototype.oldHeight = function() { + return _Game_Map_height.call(this); + }; + + Game_Map.prototype.tileWidth = function() { + return this._yedTilemapData().tileWidth; + }; + + Game_Map.prototype.tileHeight = function() { + return this._yedTilemapData().tileHeight; + }; + + Game_Map.prototype.width = function() { + return this._yedTilemapData().width; + }; + + Game_Map.prototype.height = function() { + return this._yedTilemapData().height; + }; + + Game_Map.prototype.defaultMapX = function() { + return this._yedTilemapData().properties.defaultMapX || 0; + }; + + Game_Map.prototype.defaultMapY = function() { + return this._yedTilemapData().properties.defaultMapY || 0; + }; + + Game_Map.prototype.tilemapUpperLayers = function() { + return YED.Tilemap.Core.singleton.upperLayers; + }; + + Game_Map.prototype.tilemapLowerLayers = function() { + return YED.Tilemap.Core.singleton.lowerLayers; + }; + + Game_Map.prototype.tilemapRefresh = function() { + YED.Tilemap.Core.singleton.refresh(); + }; + + Game_Map.prototype.isPassable = function(x, y, d) { + var collision = this._yedTilemapData().collision, + arrows = this._yedTilemapData().arrows, + index = this.width() * y + x; + + if (d === 4) { + if (!(arrows[index] & 1)) { + return false; + } + } + + if (d === 8) { + if (!(arrows[index] & 2)) { + return false; + } + } + + if (d === 6) { + if (!(arrows[index] & 4)) { + return false; + } + } + + if (d === 2) { + if (!(arrows[index] & 8)) { + return false; + } + } + + return collision[index] === 0; + }; + + Game_Map.prototype.regionId = function(x, y) { + var regions = this._yedTilemapData().region, + index = this.width() * y + x; + + return regions[index]; + }; + + Game_CharacterBase.prototype.distancePerFrame = function() { + var distance = _Game_CharacterBase_distancePerFrame.call(this); + return distance * (48 / $gameMap.tileWidth()); + }; + + Game_Event.prototype.setupPage = function() { + this.setupInitPosition(); + + _Game_Event_setupPage.call(this); + }; + + Game_Event.prototype.setupInitPosition = function() { + var list, + tag = //i, + command, + comment, + matches, + x,y; + + if (!this.page()) { + return; + } + + list = this.list(); + + for (var i = 0; i < list.length; i++) { + command = list[i]; + + if (command.code !== 108) { + continue; + } + + comment = command.parameters[0]; + matches = comment.match(tag); + if (matches) { + x = parseInt(matches[1]); + y = parseInt(matches[2]); + this.setPosition(x, y); + } + } + }; + + Spriteset_Map.prototype.createTilemap = function() { + _Spriteset_Map_createTilemap.call(this); + this._tilemap.tileWidth = $gameMap.oldTileWidth(); + this._tilemap.tileHeight = $gameMap.oldTileHeight(); + this._tilemap.setData($gameMap.oldWidth(), $gameMap.oldHeight(), $gameMap.data()); + }; + + Tilemap.prototype.refresh = function() { + this._needsRepaint = true; // no need to draw default tiles + this._lastTiles.length = 0; + $gameMap.tilemapRefresh(); + }; + + Tilemap.prototype._createLayers = function() { + var margin = this._margin, + upperLayers = $gameMap.tilemapUpperLayers(), + lowerLayers = $gameMap.tilemapLowerLayers(), + tileCols = Math.ceil(this._width / this._tileWidth) + 1, + tileRows = Math.ceil(this._height / this._tileHeight) + 1, + layerWidth = tileCols * this._tileWidth, + layerHeight = tileRows * this._tileHeight, + i; + + this._lowerBitmap = new Bitmap(layerWidth, layerHeight); + this._upperBitmap = new Bitmap(layerWidth, layerHeight); + + this._layerWidth = layerWidth; + this._layerHeight = layerHeight; + + /* + * Z coordinate: + * + * 0 : Lower tiles + * 1 : Lower characters + * 3 : Normal characters + * 4 : Upper tiles + * 5 : Upper characters + * 6 : Airship shadow + * 7 : Balloon + * 8 : Animation + * 9 : Destination + */ + + this._lowerLayer = new Sprite(); + this._lowerLayer.move(-margin, -margin, this._width, this._height); + this._lowerLayer.z = 0; + + this._upperLayer = new Sprite(); + this._upperLayer.move(-margin, -margin, this._width, this._height); + this._upperLayer.z = 4; + + for (i = 0; i < lowerLayers.length; i++) { + this._lowerLayer.addChild(lowerLayers[i]); + } + + for (i = 0; i < upperLayers.length; i++) { + this._upperLayer.addChild(upperLayers[i]); + } + + this.addChild(this._lowerLayer); + this.addChild(this._upperLayer); + this.addChild(YED.Tilemap.Core.singleton); + }; + + Tilemap.prototype._updateLayerPositions = function(startX, startY) { + /* jshint unused:vars */ + var m = this._margin, + ox = Math.floor(this.origin.x), + oy = Math.floor(this.origin.y), + x2 = -(ox - m), + y2 = -(oy - m); + + // TODO: Loop map!!! + + var moveFunc = function(layer) { + if (!layer.isPlaneLayer() + && !layer.isLoopVertical() + && !layer.isLoopHorizontal()) { + layer.move(x2, y2); + } + + if (!layer.isPlaneLayer() + && layer.isLoopVertical() + && layer.isLoopHorizontal()) { + layer.move(m, m); + layer.moveLoopLayer(ox, oy); + return; + } + + if (!layer.isPlaneLayer() + && layer.isLoopHorizontal()) { + layer.move(m, y2); + layer.moveLoopLayer(ox, 0); + return; + } + + if (!layer.isPlaneLayer() + && layer.isLoopVertical()) { + layer.move(x2, m); + layer.moveLoopLayer(0, oy); + return; + } + + if (layer.isPlaneLayer()) { + layer.move(m, m); + } + }; + + for (var i = 0; i < 2; i++) { + var children; + + if (i === 0) { + children = this._lowerLayer.children; + } else { + children = this._upperLayer.children; + } + + children.forEach(moveFunc); + } + + // this._updateDefaultLayerPositions(startX, startY); + }; + + // Tilemap.prototype._paintAllTiles = function(startX, startY) { + // /* jshint unused:vars */ + // // destroy method + // }; + +}()); diff --git a/js/plugins/YED_TransferStealStates.js b/js/plugins/YED_TransferStealStates.js new file mode 100644 index 0000000..d45bbe2 --- /dev/null +++ b/js/plugins/YED_TransferStealStates.js @@ -0,0 +1,494 @@ +/*: + * Yami Engine Delta - Transfer and Steal States + * + * @plugindesc Allows creating skills that can transfer and/or steal + * states to/from target. + * @author Yami Engine Delta [Dr.Yami] + * + * @help + * There is no Configuration and Plugin Command. + * + * ============================================================================ + * + * Skill + * To allow skill to steal certain states, use the following notetag with + * X is/are states ID: + * + * + * To allow skill to transfer certain states, use the following notetag with + * X is/are states ID: + * + * + * To allow skill to steal states, use the following notetag with N is + * number of states, X is priority order: + * + * + * To allow skill to transfer states, use the following notetag with N is + * number of states, X is priority order: + * + * + * + * Priority order: + * + * ------------------------------------------------------------------------- + * high priority + * low priority + * last states + * random + * ------------------------------------------------------------------------- + * + * ============================================================================ + */ +/*:ja + * Yami Engine Delta - Transfer and Steal States + * + * @plugindesc ステート受け渡しのスキル作成が可能になります。 + * @author Yami Engine Delta [Dr.Yami] + * + * @help + * このプラグインには、コンフィグやプラグインコマンドはありません。 + * + * ============================================================================ + * + * Skill + * 特定のステートを盗むスキルを作成できるようになります。 + * XにはステートIDを記入してください。 + * + * + * 特定のステートを移植するスキルを作成できるようになります。 + * XにはステートIDを記入してください。 + * + * + * ルールに従ってステートを盗むスキルを作成できるようになります。 + * Nにはステートの番号、Xには優先順位を記入してください。 + * + * + * ルールに沿ってステートを移植するスキルを作成できるようになります。 + * Nにはステートの番号、Xには優先順位を記入してください。: + * + * + * + * 優先順位: + * ------------------------------------------------------------------------- + * high priority - 高優先度 + * low priority - 低優先度 + * last states - 最低優先度 + * random - ランダム + * ------------------------------------------------------------------------- + * + * ============================================================================ + */ + + +/** + * @namespace TransferStealStates + * @memberof YED + */ + +var YED = YED || {}; + +// init TransferStealStates module +YED.TransferStealStates = {}; + +/* globals YED: false */ + +(function($TransferStealStates) { + /** + * Enum for RegExp, used to notetags + * + * @readonly + * @enum {RegExp} + * @memberof YED.TransferStealStates + */ + var Regexp = { + /** + * Allows states to be stolen + */ + STEAL_ALLOW: //i, + + /** + * Allows states to be transfered + */ + TRANSFER_ALLOW: //i, + + /** + * Steal (n) states with different priority + */ + STEAL_STATES: //i, + + /** + * Transfer (n) states with different priority + */ + TRANSFER_STATES: //i + }; + + $TransferStealStates.Regexp = Regexp; +}(YED.TransferStealStates)); + +/* globals YED: false */ + +(function($TransferStealStates, $Regexp) { + /** + * Contains utility tools for module. + * + * @namespace Utils + * @memberof YED.TransferStealStates + */ + var Utils = {}; + + /** + * Process notetag function. + * Should be called with DataManager as current object. + * + * @function processNotetag + * @memberof YED.TransferStealStates.Utils + */ + Utils.processNotetags = function() { + var group = $dataSkills, // shorten group name + obj, + notedata, + line; + + for (var i = 1; i < group.length; i++) { + obj = group[i]; + notedata = obj.note.split(/[\r\n]+/); + + Utils._processProperties.call(this, obj); + Utils._processMethods.call(this, obj); + + for (var n = 0; n < notedata.length; n++) { + line = notedata[n]; + Utils._processNotetag.call(this, obj, line); + } + } + }; + + /** + * Add new properties into object. + * + * @function _processProperties + * @memberof YED.TransferStealStates.Utils + * @param {Object} obj Data object + * @private + */ + Utils._processProperties = function(obj) { + obj._stealAllow = []; + obj._transferAllow = []; + + obj._stealStates = [0, 'random']; + obj._transferStates = [0, 'random']; + }; + + /** + * Add new methods into object. + * + * @function _processMethods + * @memberof YED.TransferStealStates.Utils + * @param {Object} obj Data object + * @private + */ + Utils._processMethods = function(obj) { + obj.getAllowStealStates = Utils.getAllowStealStates; + obj.getAllowTransferStates = Utils.getAllowTransferStates; + + obj.getStealStates = Utils.getStealStates; + obj.getTransferStates = Utils.getTransferStates; + }; + + /** + * Process notetag for object. + * + * @function _processNotetag + * @memberof YED.TransferStealStates.Utils + * @param {Object} obj Data object + * @param {String} notetag Notetag + * @private + */ + Utils._processNotetag = function(obj, notetag) { + var match, + ids; + + match = notetag.match($Regexp.STEAL_ALLOW); + if (match) { + ids = match[1].match(/\d+/g); + + if (ids) { + obj._stealAllow = ids.map(function(id) { + return Number(id); + }); + } + } + + match = notetag.match($Regexp.TRANSFER_ALLOW); + if (match) { + ids = match[1].match(/\d+/g); + if (ids) { + obj._transferAllow = ids.map(function(id) { + return Number(id); + }); + } + } + + match = notetag.match($Regexp.STEAL_STATES); + if (match) { + obj._stealStates[0] = Number(match[1]); + obj._stealStates[1] = match[2].toLowerCase(); + } + + match = notetag.match($Regexp.TRANSFER_STATES); + if (match) { + obj._transferStates[0] = Number(match[1]); + obj._transferStates[1] = match[2].toLowerCase(); + } + }; + + /** + * Get stealable states IDs. + * Should be attached to skill object. + * + * @function getAllowStealStates + * @memberof YED.TransferStealStates.Utils + * @return {Number[]} States ID + */ + Utils.getAllowStealStates = function() { + return this._stealAllow; + }; + + /** + * Get transferable states IDs. + * Should be attached to skill object. + * + * @function getAllowTransferStates + * @memberof YED.TransferStealStates.Utils + * @return {Number[]} States ID + */ + Utils.getAllowTransferStates = function() { + return this._transferAllow; + }; + + /** + * Get skill steal states information. + * Should be attached to skill object. + * + * @function getStealStates + * @memberof YED.TransferStealStates.Utils + * @return {[Number, String]} Steal Information + */ + Utils.getStealStates = function() { + return this._stealStates; + }; + + /** + * Get skill transfer states information. + * Should be attached to skill object. + * + * @function getTransferStates + * @memberof YED.TransferStealStates.Utils + * @return {[Number, String]} Steal Information + */ + Utils.getTransferStates = function() { + return this._transferStates; + }; + + $TransferStealStates.Utils = Utils; +}(YED.TransferStealStates, YED.TransferStealStates.Regexp)); + +/* globals YED: false */ + +/** + * Pre-processes and notetag parsing + */ +(function($Utils) { + /** + * Aliasing methods + */ + var _DataManager_isDatabaseLoaded = DataManager.isDatabaseLoaded; + + /** + * Extending: Scene_Boot.prototype.start + * + * Add notetags processing for module. + */ + DataManager.isDatabaseLoaded = function() { + var loaded = _DataManager_isDatabaseLoaded.call(this); + + if (!loaded) { + return false; + } + + $Utils.processNotetags.call(DataManager); + + return true; + }; +}(YED.TransferStealStates.Utils)); + +/* globals YED: false */ + +(function() { + /** + * Aliasing methods + */ + var _Game_Action_testApply + = Game_Action.prototype.testApply; + var _Game_Action_applyItemUserEffect + = Game_Action.prototype.applyItemUserEffect; + + /** + * Get target states in order. + * + * @function external:Game_Action#getOrderedStates + */ + Game_Action.prototype.getOrderedStates = function(target, order) { + var states = target.states(); + + if (order === 'low priority' + || order === 'lower priority' + || order === 'low') { + states = states.reverse(); + } + + if (order === 'high priority' + || order === 'higher priority' + || order === 'high') { + states = states; // default is high priority sort + } + + if (order === 'random') { + states = states.sort(function() { + return Math.pow(-1, Math.floor(Math.random() * 10)); + }); + } + + if (order === 'last states' + || order === 'last state' + || order === 'last states') { + states = target.result().addedStateObjects().reverse(); + } + + return states; + }; + + /** + * Get stealable and transferrable states of skill. + * + * @function external:Game_Action#getTransferStealStates + */ + Game_Action.prototype.getTransferStealStates = function(target, type) { + var result = [], + item = this.item(), + subject = this.subject(), + states, + allows, info; + + if (type.toLowerCase() === 'steal') { + allows = item.getAllowStealStates(); + info = item.getStealStates(); + states = this.getOrderedStates(target, info[1]); + } + + if (type.toLowerCase() === 'transfer') { + allows = item.getAllowTransferStates(); + info = item.getTransferStates(); + states = this.getOrderedStates(subject, info[1]); + } + + for (var i = 0; i < states.length; i++) { + if (allows.indexOf(states[i].id) < 0) { + continue; + } + + result.push(states[i].id); + + if (result.size >= info[0]) { + break; + } + } + + return result; + }; + + /** + * Effect for stealing states. + * + * @function external:Game_Action#itemEffectStealStates + */ + Game_Action.prototype.itemEffectStealStates = function(target) { + var result = target.result(), + item = this.item(), + statesId = this.getTransferStealStates(target, 'steal'), + subject = this.subject(); + + if (!result.isHit()) { + return false; + } + + if (statesId.length === 0) { + return false; + } + + this.makeSuccess(target); + + for (var i = 0; i < statesId.length; i++) { + subject.addState(statesId[i]); + target.removeState(statesId[i]); + } + }; + + /** + * Effect for transferring states. + * + * @function external:Game_Action#itemEffectTransferStates + */ + Game_Action.prototype.itemEffectTransferStates = function(target) { + var result = target.result(), + item = this.item(), + statesId = this.getTransferStealStates(target, 'transfer'), + subject = this.subject(); + + if (!result.isHit()) { + return false; + } + + if (statesId.length === 0) { + return false; + } + + console.log(statesId); + + this.makeSuccess(target); + + for (var i = 0; i < statesId.length; i++) { + subject.removeState(statesId[i]); + target.addState(statesId[i]); + } + }; + + /** + * Extending: Game_Action.prototype.testApply + * + * Add validate skill effect for transfer and steal states. + */ + Game_Action.prototype.testApply = function(target) { + if (this.getTransferStealStates(target, 'steal').length > 0) { + return true; + } + + if (this.getTransferStealStates(target, 'transfer').length > 0) { + return true; + } + + return _Game_Action_testApply.call(this, target); + }; + + /** + * Extending: Game_Action.prototype.applyItemUserEffect + * + * Add transfer and steal states effect. + */ + Game_Action.prototype.applyItemUserEffect = function(target) { + _Game_Action_applyItemUserEffect.call(this, target); + + this.itemEffectStealStates(target); + this.itemEffectTransferStates(target); + }; +}()); diff --git a/js/plugins/YED_WordWrap.js b/js/plugins/YED_WordWrap.js new file mode 100644 index 0000000..989d363 --- /dev/null +++ b/js/plugins/YED_WordWrap.js @@ -0,0 +1,157 @@ +/*: + * Yami Engine Delta - Word Wrap + * + * @plugindesc This plugin provides word wrap feature, so that a long text + * will be properly broken down into lines. + * @author Yami Engine Delta [Dr.Yami] + * + * @param Break Word + * @desc Allows unbreakable words to be broken. + * @default false + * + * @help + * The word wrap isn't enabled by default. To activate word wrap in any text, + * for example in Message, you have to put following code into the text: + * + * ------------ + * + * ------------ + * + * The word wrapper will nullify the break lines in editor, so that you have + * to manually break line by using following code in text: + * + * ------------ + *
+ * ------------ + * + * ============================================================================ + */ + +/*:ja + * Yami Engine Delta - Word Wrap + * + * @plugindesc 文章の改行機能を提供します。長文を適切な位置で改行します。 + * @author Yami Engine Delta [Dr.Yami] + * + * @param Break Word + * @desc 改行不可の文章を、改行することができます。 + * @default false + * + * @help + * 改行機能はデフォルトでは無効になっています。 + * テキスト内に下記のコードを挿入することで、改行機能を有効にしてください。 + * + * ------------ + * + * ------------ + * + * テキスト内に手動で下記のコードを挿入することで、改行を行います。 + * + * ------------ + *
+ * ------------ + * + * ============================================================================ + */ + + + +/** + * @namespace WordWrap + * @memberof YED + */ + +var YED = YED || {}; + +// init WordWrap module +YED.WordWrap = {}; + +YED.WordWrap.BreakWord + = PluginManager.parameters('YED_WordWrap')['Break Word']; + +(function($WordWrap) { + var _Window_Base_processNormalCharacter + = Window_Base.prototype.processNormalCharacter; + var _Window_Base_convertEscapeCharacters + = Window_Base.prototype.convertEscapeCharacters; + + var breakWord = eval($WordWrap.BreakWord); + + Window_Base.prototype.textAreaWidth = function() { + return this.contentsWidth(); + }; + + Window_Base.prototype.needWrap = function(textState) { + var c = textState.text[textState.index], + w = this.textWidth(c), + nextSpaceIndex = 0, + nextWord = "", + nextWidth = 0, + text = textState.text; + + if (!this._wordWrap) { + return false; + } + + if (breakWord && (textState.x + w * 2) >= this.textAreaWidth()) { + textState.index--; // hack for missing character + return true; + } + + if (!breakWord && c === " ") { + nextSpaceIndex = text.indexOf(" ", textState.index + 1); + + if (nextSpaceIndex < 0) { + nextSpaceIndex = text.length + 1; + } + + nextWord = text.substring(textState.index, nextSpaceIndex); + + nextWidth = this.textWidth(nextWord); + + if (textState.x + nextWidth >= this.textAreaWidth()) { + return true; + } + } + + return false; + }; + + Window_Base.prototype.convertEscapeCharacters = function(text) { + text = _Window_Base_convertEscapeCharacters.call(this, text); + text = this.convertWordWrapEscapeCharacters(text); + + return text; + }; + + Window_Base.prototype.convertWordWrapEscapeCharacters = function(text) { + text = this.enableWordWrap(text); + + if (!!this._wordWrap) { + text = text.replace(/[\n\r]+/g, ''); + text = text.replace(/\/gi, '\n'); + } + + return text; + }; + + Window.prototype.enableWordWrap = function(text) { + this._wordWrap = false; + + if (!!text.match(/\/i)) { + this._wordWrap = true; + } + + text = text.replace(/\/gi, ''); + + return text; + }; + + Window_Base.prototype.processNormalCharacter = function(textState) { + if (this.needWrap(textState)) { + return this.processNewLine(textState); + } + + _Window_Base_processNormalCharacter.call(this, textState); + }; +}(YED.WordWrap)); diff --git a/js/plugins/YEP_ElementAbsorb.js b/js/plugins/YEP_ElementAbsorb.js new file mode 100644 index 0000000..abcf71a --- /dev/null +++ b/js/plugins/YEP_ElementAbsorb.js @@ -0,0 +1,204 @@ +//============================================================================= +// Yanfly Engine Plugins - Element Absorb +// YEP_ElementAbsorb.js +//============================================================================= + +var Imported = Imported || {}; +Imported.YEP_ElementAbsorb = true; + +var Yanfly = Yanfly || {}; +Yanfly.EleAbs = Yanfly.EleAbs || {}; + +//============================================================================= +/*: + * @plugindesc v1.00 Adds the ability to absorb elemental damage! + * @author Yanfly Engine Plugins + * + * @param Multiple Priority + * @desc If there are multiple elements involved, absorbing the + * element will take priority. NO - false YES - true + * @default true + * + * @help + * ============================================================================ + * Introduction + * ============================================================================ + * + * This plugin reenables the ability for actors, classes, enemies, weapons, + * armors, and states to gain elemental absorbing as a gameplay mechanic. + * + * Note: This plugin will be updated more extensively later. + * + * ============================================================================ + * Notetags + * ============================================================================ + * + * Actor, Class, Enemy, Weapon, Armor, and State Notetags: + * + * + * Causes element x to be absorbed and heals the battler. + * + * + * Causes elements x through y to be absorbed and heal the battler. + */ + /*:ja + * @plugindesc 属性ダメージを吸収するアビリティを付与します + * @author Yanfly Engine Plugins + * + * @param Multiple Priority + * @desc 複数の属性を持つ場合は、吸収属性が優先されます。 + * NO - false YES - true + * @default true + * + * @help + * ============================================================================ + * Introduction + * ============================================================================ + * + * このプラグインは、属性吸収のシステムをゲームに提供します。 + * + * 注*このプラグインは今後もアップデートを予定しています + * + * ============================================================================ + * Notetags + * ============================================================================ + * + * アクター、クラス、敵、武器、防具、ステータスのNotetag: + * + * + * x の属性を吸収させ、バトラーを回復します + * + * + * x から y の属性を吸収させ、バトラーを回復します + */ + +//============================================================================= + +//============================================================================= +// Parameter Variables +//============================================================================= + +Yanfly.Parameters = PluginManager.parameters('YEP_ElementAbsorb'); +Yanfly.Param = Yanfly.Param || {}; + +Yanfly.Param.EleAbsMultiPri = String(Yanfly.Parameters['Multiple Priority']); + +//============================================================================= +// DataManager +//============================================================================= + +Yanfly.EleAbs.DataManager_isDatabaseLoaded = DataManager.isDatabaseLoaded; +DataManager.isDatabaseLoaded = function() { + if (!Yanfly.EleAbs.DataManager_isDatabaseLoaded.call(this)) return false; + DataManager.processEleAbsNotetags1($dataActors); + DataManager.processEleAbsNotetags1($dataClasses); + DataManager.processEleAbsNotetags1($dataEnemies); + DataManager.processEleAbsNotetags1($dataWeapons); + DataManager.processEleAbsNotetags1($dataArmors); + DataManager.processEleAbsNotetags1($dataStates); + return true; +}; + +DataManager.processEleAbsNotetags1 = function(group) { + var note1 = /<(?:ELEMENT ABSORB):[ ]*(\d+(?:\s*,\s*\d+)*)>/i; + var note2 = /<(?:ELEMENT ABSORB):[ ](\d+)[ ](?:THROUGH|to)[ ](\d+)>/i; + for (var n = 1; n < group.length; n++) { + var obj = group[n]; + var notedata = obj.note.split(/[\r\n]+/); + + obj.elementAbsorb = []; + + for (var i = 0; i < notedata.length; i++) { + var line = notedata[i]; + if (line.match(note1)) { + var array = JSON.parse('[' + RegExp.$1.match(/\d+/g) + ']'); + obj.elementAbsorb = obj.elementAbsorb.concat(array); + } else if (line.match(note2)) { + var range = Yanfly.Util.getRange(parseInt(RegExp.$1), + parseInt(RegExp.$2)); + obj.elementAbsorb = obj.elementAbsorb.concat(range); + } + } + } +}; + +//============================================================================= +// Main Code +//============================================================================= + +Yanfly.EleAbs.Game_BtlrBase_elementRate = + Game_BattlerBase.prototype.elementRate; +Game_BattlerBase.prototype.elementRate = function(elementId) { + var result = Yanfly.EleAbs.Game_BtlrBase_elementRate.call(this, elementId); + if (this.isAbsorbElement(elementId)) { + result = Math.min(result - 2.0, -0.01); + } + return result; +}; + +Game_BattlerBase.prototype.isAbsorbElement = function(elementId) { + for (var i = 0; i < this.states().length; ++i) { + var state = this.states()[i]; + if (state && state.elementAbsorb.contains(elementId)) return true; + } + return false; +}; + +//============================================================================= +// Game_Actor +//============================================================================= + +Game_Actor.prototype.isAbsorbElement = function(elementId) { + if (this.actor().elementAbsorb.contains(elementId)) return true; + if (this.currentClass().elementAbsorb.contains(elementId)) return true; + for (var i = 0; i < this.equips().length; ++i) { + var equip = this.equips()[i]; + if (equip && equip.elementAbsorb.contains(elementId)) return true; + } + return Game_BattlerBase.prototype.isAbsorbElement.call(this, elementId); +}; + +//============================================================================= +// Game_Enemy +//============================================================================= + +Game_Enemy.prototype.isAbsorbElement = function(elementId) { + if (this.enemy().elementAbsorb.contains(elementId)) return true; + return Game_BattlerBase.prototype.isAbsorbElement.call(this, elementId); +}; + +//============================================================================= +// Game_Action +//============================================================================= + +Yanfly.EleAbs.Game_Action_elementsMaxRate = + Game_Action.prototype.elementsMaxRate; +Game_Action.prototype.elementsMaxRate = function(target, elements) { + var rate = + Yanfly.EleAbs.Game_Action_elementsMaxRate.call(this, target, elements); + if (eval(Yanfly.Param.EleAbsMultiPri)) { + for (var i = 0; i < elements.length; ++i) { + var elementId = elements[i]; + if (target.isAbsorbElement(elementId)) { + rate = Math.min(target.elementRate(elementId), rate); + } + } + } + return rate; +}; + +//============================================================================= +// Utilities +//============================================================================= + +Yanfly.Util = Yanfly.Util || {}; + +Yanfly.Util.getRange = function(n, m) { + var result = []; + for (var i = n; i <= m; ++i) result.push(i); + return result; +}; + +//============================================================================= +// End of File +//============================================================================= diff --git a/js/plugins/YEP_ElementReflect.js b/js/plugins/YEP_ElementReflect.js new file mode 100644 index 0000000..8506740 --- /dev/null +++ b/js/plugins/YEP_ElementReflect.js @@ -0,0 +1,183 @@ +//============================================================================= +// Yanfly Engine Plugins - Element Reflect +// YEP_ElementReflect.js +//============================================================================= + +var Imported = Imported || {}; +Imported.YEP_ElementReflect = true; + +var Yanfly = Yanfly || {}; +Yanfly.EleRef = Yanfly.EleRef || {}; + +//============================================================================= + + /*: + * @plugindesc v1.00 Adds rates at which elemental skills/items can be + * reflected at. + * @author Yanfly Engine Plugins + * + * @help + * ============================================================================ + * Introduction + * ============================================================================ + * + * Lets battlers reflect specific types of elemental skills back at the + * opponent rather than all magic types. + * + * Note: This plugin will be updated more extensively later. + * + * ============================================================================ + * Notetags + * ============================================================================ + * + * Actor, Class, Enemy, Weapon, Armor, and State Notetags + * + * + * Increases or decreases the rate to reflect element x by y%. + */ + /*:ja + * @plugindesc 指定のスキル/アイテムを跳ね返す設定を付与します + * @author Yanfly Engine Plugins + * + * @help + * ============================================================================ + * Introduction + * ============================================================================ + * + * このプラグインは、ある特定属性のスキルを相手に跳ね返す設定を、 + * バトラーに付与することが出来ます。 + * + * 注*このプラグインは今後もアップデートを予定しています + * + * ============================================================================ + * Notetags + * ============================================================================ + * + * アクター、クラス、敵、武器、武器、ステータスのNotetag: + * + * + * x という属性の反射レートを y% の範囲で増減させます + */ + +//============================================================================= + +//============================================================================= +// DataManager +//============================================================================= + +Yanfly.EleRef.DataManager_isDatabaseLoaded = DataManager.isDatabaseLoaded; +DataManager.isDatabaseLoaded = function() { + if (!Yanfly.EleRef.DataManager_isDatabaseLoaded.call(this)) return false; + DataManager.processEleRefNotetags1($dataActors); + DataManager.processEleRefNotetags1($dataClasses); + DataManager.processEleRefNotetags1($dataEnemies); + DataManager.processEleRefNotetags1($dataWeapons); + DataManager.processEleRefNotetags1($dataArmors); + DataManager.processEleRefNotetags1($dataStates); + return true; +}; + +DataManager.processEleRefNotetags1 = function(group) { + var note1 = /<(?:ELEMENT REFLECT)[ ](\d+):[ ]([\+\-]\d+)([%%])>/i; + for (var n = 1; n < group.length; n++) { + var obj = group[n]; + var notedata = obj.note.split(/[\r\n]+/); + + obj.elementReflect = {}; + + for (var i = 0; i < notedata.length; i++) { + var line = notedata[i]; + if (line.match(note1)) { + var elementId = parseInt(RegExp.$1); + var rate = parseFloat(RegExp.$2 * 0.01); + obj.elementReflect[elementId] = rate; + } + } + } +}; + +//============================================================================= +// Game_BattlerBase +//============================================================================= + +Game_BattlerBase.prototype.calcElementReflectRate = function(item) { + if (!item) return 0; + var elementId = item.damage.elementId; + if (elementId < 0) return 0; + var rate = 0; + for (var i = 0; i < this.states().length; ++i) { + var state = this.states()[i]; + if (state && state.elementReflect[elementId]) { + rate += state.elementReflect[elementId]; + } + } + return rate; +}; + +//============================================================================= +// Game_Actor +//============================================================================= + +Game_Actor.prototype.calcElementReflectRate = function(item) { + if (!item) return 0; + var elementId = item.damage.elementId; + if (elementId < 0) return 0; + var rate = + Game_BattlerBase.prototype.calcElementReflectRate.call(this, item); + if (this.actor().elementReflect[elementId]) { + rate += this.actor().elementReflect[elementId]; + } + if (this.currentClass().elementReflect[elementId]) { + rate += this.currentClass().elementReflect[elementId]; + } + for (var i = 0; i < this.equips().length; ++i) { + var equip = this.equips()[i]; + if (equip && equip.elementReflect[elementId]) { + rate += equip.elementReflect[elementId]; + } + } + return rate; +}; + +//============================================================================= +// Game_Enemy +//============================================================================= + +Game_Enemy.prototype.calcElementReflectRate = function(item) { + if (!item) return 0; + var elementId = item.damage.elementId; + if (elementId < 0) return 0; + var rate = + Game_BattlerBase.prototype.calcElementReflectRate.call(this, item); + if (this.enemy().elementReflect[elementId]) { + rate += this.enemy().elementReflect[elementId]; + } + return rate; +}; + +//============================================================================= +// Game_Action +//============================================================================= + +Yanfly.EleRef.Game_Action_itemMrf = Game_Action.prototype.itemMrf; +Game_Action.prototype.itemMrf = function(target) { + var rate = Yanfly.EleRef.Game_Action_itemMrf.call(this, target); + rate += target.calcElementReflectRate(this.item()); + return rate; +}; + +//============================================================================= +// Utilities +//============================================================================= + +Yanfly.Util = Yanfly.Util || {}; + +Yanfly.Util.getRange = function(n, m) { + var result = []; + for (var i = n; i <= m; ++i) result.push(i); + return result; +}; + +//============================================================================= +// End of File +//============================================================================= diff --git a/js/plugins/YEP_ExternalLinks.js b/js/plugins/YEP_ExternalLinks.js new file mode 100644 index 0000000..e10bc47 --- /dev/null +++ b/js/plugins/YEP_ExternalLinks.js @@ -0,0 +1,273 @@ +//============================================================================= +// Yanfly Engine Plugins - External Links +// YEP_ExternalLinks.js +//============================================================================= + +var Imported = Imported || {}; +Imported.YEP_ExternalLinks = true; + +var Yanfly = Yanfly || {}; +Yanfly.LINK = Yanfly.LINK || {}; + +//============================================================================= + /*: + * @plugindesc v1.00 Link back to your home page through the title screen + * and also be able to link your players from within the game. + * @author Yanfly Engine Plugins + * + * @param Home Page URL + * @desc Places a link to your website homepage at the title screen. + * Leave this blank if you don't wish to enable this feature. + * @default https://www.google.com/ + * + * @param Home Page Text + * @desc This is how 'Home Page' will appear on the title screen. + * @default Home Page + * + * @param Popup Blocker Notice + * @desc This is a window to notify the player the link was blocked + * by a pop-up blocker. + * @default The link was blocked by a pop-up blocker. + * + * @help + * ============================================================================ + * Introduction . + * ============================================================================ + * This plugin allows you to place a "link" to your home page at the title + * screen's command window towards the bottom. To adjust where the link goes, + * change the Home Page URL in the plugin's parameters. + * + * ============================================================================ + * Plugin Commands + * ============================================================================ + * + * If you wish to send players to other links, you can use the following + * plugin commands. + * + * Plugin Command + * OpenNewTab http://www.google.com/ Opens link in a new tab. + * OpenNewWindow http://www.google.com/ Opens link in a new window. + * + * Some web browsers may not differentiate these commands too much. + */ + /*:ja + * @plugindesc タイトル画面やゲーム内から、 + * プレイヤーにWebページを開かせることができます + * @author Yanfly Engine Plugins + * + * @param Home Page URL + * @desc タイトル画面に設置したいWebサイトのリンクを挿入してください。 + * 不要な場合はブランクにしておいてください。 + * @default https://www.google.com/ + * + * @param Home Page Text + * @desc タイトル画面に設置するWebサイトの表示名を指定します + * @default Home Page + * + * @param Popup Blocker Notice + * @desc ポップアップブロックによってブロックされた際に、 + * プレイヤーにそれを知らせる文章を指定します + * @default ポップアップブロックによってブロックされました + * + * @help + * ============================================================================ + * Introduction . + * ============================================================================ + * + * このプラグインでは、タイトル画面のコマンドウィンドウ下部に + * Webページへのリンクを設置することができます。 + * プラグインのパラメーター内でURLを変更することで、 + * リンク先を変更することができます。 + * + * ============================================================================ + * Plugin Commands + * ============================================================================ + * + * プレイヤーに任意のリンクを開かせたいときは、下記のコマンドを用いてください。 + * + * <プラグインコマンド> + * OpenNewTab http://www.google.com/ 新規タブでリンクを開きます + * OpenNewWindow http://www.google.com/ 新規ウィンドウでリンクを開きます + * + * ブラウザによっては上記2種類のコマンドがうまく識別されない場合があります。 + */ + + +//============================================================================= + +//============================================================================= +// Parameter Variables +//============================================================================= + +Yanfly.Parameters = PluginManager.parameters('YEP_ExternalLinks'); +Yanfly.Param = Yanfly.Param || {}; + +Yanfly.Param.HomePageUrl = String(Yanfly.Parameters['Home Page URL']); +Yanfly.Param.HomePageText = String(Yanfly.Parameters['Home Page Text']); +Yanfly.Param.PopupMessage = String(Yanfly.Parameters['Popup Blocker Notice']); + +//============================================================================= +// SceneManager +//============================================================================= + +SceneManager.openPopupBlockerMessage = function() { + this._scene.openPopupBlockerMessage(); +}; + +//============================================================================= +// Game_Interpreter +//============================================================================= + +Yanfly.LINK.Game_Interpreter_pluginCommand = + Game_Interpreter.prototype.pluginCommand; +Game_Interpreter.prototype.pluginCommand = function(command, args) { + Yanfly.LINK.Game_Interpreter_pluginCommand.call(this, command, args) + if (command === 'OpenNewTab') this.openNewTab(args); + if (command === 'OpenNewWindow') this.openNewWindow(args); +}; + +Game_Interpreter.prototype.openNewTab = function(args) { + TouchInput.clear(); + Input.clear(); + var url = String(args[0]); + var win = window.open(url, '_blank'); + if (win) { + win.focus(); + } else { + SceneManager.openPopupBlockerMessage(); + } +}; + +Game_Interpreter.prototype.openNewWindow = function(args) { + TouchInput.clear(); + Input.clear(); + var url = String(args[0]); + var win = window.open(url); + if (win) { + win.focus(); + } else { + SceneManager.openPopupBlockerMessage(); + } +}; + +//============================================================================= +// Window_TitleCommand +//============================================================================= + +Yanfly.LINK.Window_TitleCommand_makeCommandList = + Window_TitleCommand.prototype.makeCommandList; +Window_TitleCommand.prototype.makeCommandList = function() { + Yanfly.LINK.Window_TitleCommand_makeCommandList.call(this); + this.addHomePageCommand(); +}; + +Window_TitleCommand.prototype.addHomePageCommand = function() { + if (Yanfly.Param.HomePageUrl.length <= 0) return; + this.addCommand(Yanfly.Param.HomePageText, 'homePage'); +}; + +//============================================================================= +// Window_PopupBlocker +//============================================================================= + +function Window_PopupBlocker() { + this.initialize.apply(this, arguments); +} + +Window_PopupBlocker.prototype = Object.create(Window_Base.prototype); +Window_PopupBlocker.prototype.constructor = Window_PopupBlocker; + +Window_PopupBlocker.prototype.initialize = function() { + var width = Graphics.boxWidth; + var height = this.fittingHeight(1); + Window_Base.prototype.initialize.call(this, 0, 0, width, height); + this.resizeWindow(); + this.refresh(); + this.openness = 0; +}; + +Window_PopupBlocker.prototype.resizeWindow = function() { + this.width = this.windowWidth(); + this.createContents(); + this.x = (Graphics.boxWidth - this.width) / 2; + this.y = (Graphics.boxHeight - this.height) / 2; +}; + +Window_PopupBlocker.prototype.windowWidth = function() { + return this.textWidth(Yanfly.Param.PopupMessage); +}; + +Window_PopupBlocker.prototype.refresh = function() { + this.contents.clear(); + this.drawText(Yanfly.Param.PopupMessage, 0, 0, this.contents.width); +}; + +//============================================================================= +// Scene_Base +//============================================================================= + +Yanfly.LINK.Scene_Base_createWindowLayer = + Scene_Base.prototype.createWindowLayer; +Scene_Base.prototype.createWindowLayer = function() { + Yanfly.LINK.Scene_Base_createWindowLayer.call(this); + this.createPopupBlockerMessage(); +}; + +Scene_Base.prototype.createPopupBlockerMessage = function() { + this._popupBlockerWindow = new Window_PopupBlocker(); + this.addWindow(this._popupBlockerWindow); + this._popupCounter = 0; +}; + +Yanfly.LINK.Scene_Base_update = Scene_Base.prototype.update; +Scene_Base.prototype.update = function() { + Yanfly.LINK.Scene_Base_update.call(this); + this.updatePopupBlockerMessage(); +}; + +Scene_Base.prototype.updatePopupBlockerMessage = function() { + if (!this._popupBlockerWindow) return; + if (this._popupBlockerWindow.isClosed()) return; + if (--this._popupCounter > 0) return; + this.closePopupBlockerMessage(); +}; + +Scene_Base.prototype.openPopupBlockerMessage = function() { + this._popupBlockerWindow.open(); + this._popupBlockerWindow.activate(); + this._popupCounter = 180; +}; + +Scene_Base.prototype.closePopupBlockerMessage = function() { + if (!this._popupBlockerWindow) return; + if (this._popupBlockerWindow.isClosed()) return; + this._popupBlockerWindow.close(); + this._popupBlockerWindow.deactivate(); +}; + +//============================================================================= +// Scene_Base +//============================================================================= + +Yanfly.LINK.Scene_Title_createCommandWindow = + Scene_Title.prototype.createCommandWindow; +Scene_Title.prototype.createCommandWindow = function() { + Yanfly.LINK.Scene_Title_createCommandWindow.call(this); + this._commandWindow.setHandler('homePage', this.commandHomePage.bind(this)); +}; + +Scene_Title.prototype.commandHomePage = function() { + TouchInput.clear(); + Input.clear(); + this._commandWindow.activate(); + var win = window.open(Yanfly.Param.HomePageUrl, '_blank'); + if (win) { + win.focus(); + } else { + SceneManager.openPopupBlockerMessage(); + } +}; + +//============================================================================= +// End of File +//============================================================================= diff --git a/js/plugins/YEP_GabWindow.js b/js/plugins/YEP_GabWindow.js new file mode 100644 index 0000000..72f56bd --- /dev/null +++ b/js/plugins/YEP_GabWindow.js @@ -0,0 +1,983 @@ +//============================================================================= +// Yanfly Engine Plugins - Template +// YEP_GabWindow.js +//============================================================================= + +var Imported = Imported || {}; +Imported.YEP_GabWindow = true; + +var Yanfly = Yanfly || {}; +Yanfly.Gab = Yanfly.Gab || {}; + +//============================================================================= + /*: + * @plugindesc v1.03a The Gab Window functions as a window for random + * jibber jabber that does not require a message window. + * @author Yanfly Engine Plugins + * + * @param ---General--- + * @default + * + * @param Gab Font Name + * @desc The font name used for the text of the Gab Window. + * Default: GameFont + * @default GameFont + * + * @param Gab Font Size + * @desc The font size used for the text of the Gab Window. + * Default: 28 + * @default 28 + * + * @param Character X Pos + * @desc X position of the character. + * Default: 36 + * @default 36 + * + * @param Character Y Pos + * @desc Y position of the character. + * Default: 60 + * @default 60 + * + * @param Base Wait Time + * @desc Minimum frames the Gab Window stays visible. + * Default: 90 + * @default 90 + * + * @param Time Per Character + * @desc Frames added per Text Character. + * Default: 4 + * @default 4 + * + * @param Fade Rate + * @desc Is is how fast the gab window fades away. + * Default: 16 + * @default 16 + * + * @param Anti-Repeat + * @desc Stops gabs of the same settings from being queued. + * NO - false YES - true + * @default true + * + * @param ---Map--- + * @default + * + * @param Map Y Location + * @desc This is the Y location of the Gab Window. + * Default: 72 + * @default 72 + * + * @param Map Dim Color 1 + * @desc This is the dim color 1 used for maps. + * Default: rgba(0, 0, 0, 0.6) + * @default rgba(0, 0, 0, 0.6) + * + * @param Map Dim Color 2 + * @desc This is the dim color 2 used for maps. + * Default: rgba(0, 0, 0, 0.3) + * @default rgba(0, 0, 0, 0.3) + * + * @param ---Battle--- + * @default + * + * @param Battle Y Location + * @desc This is the Y location of the Gab Window. + * Default: 108 + * @default 108 + * + * @param Battle Dim Color 1 + * @desc This is the dim color 1 used for battles. + * Default: rgba(0, 0, 0, 0.6) + * @default rgba(0, 0, 0, 0.6) + * + * @param Battle Dim Color 2 + * @desc This is the dim color 2 used for battles. + * Default: rgba(0, 0, 0, 0) + * @default rgba(0, 0, 0, 0) + * + * @help + * ============================================================================ + * Introduction + * ============================================================================ + * + * Sometimes there's random jibber jabber that does not warrant a message box. + * The Gab Window fulfills that jibber jabber by placing such text outside of + * the message window box and at the corner of the screen. The gab text will + * appear briefly and then disappear, not showing up again until the gab text + * is updated with something else. + * + * New to the MV version is the ability to play sounds for your Gab Window in + * addition to queueing multiple gabs together to have them form a conversation + * of sorts. When queued up, the currently playing gab will continue showing + * until it fades out before loading up the next gab. + * + * ============================================================================ + * Instructions + * ============================================================================ + * + * Using the Gab Window is quite simple. By default, it can be used in either + * the map scene or the battle scene. To call upon it, you will to use a few + * Plugin Commands to set up what you wish for the Gab Window to display. + * + * Plugin Commands: + * + * --- Setup Commands --- + * + * GabText text + * This will set the gab window to type out the above text. Text codes can be + * used for the Gab Window. + * + * GabFaceName filename + * If you wish to display a face graphic, use this plugin command to have it + * display a face from the filename. + * + * GabFaceIndex x + * Used in combination with the above plugin command to define which index the + * face will use. + * + * GabSpriteName filename + * If you wish to display a particular character sprite, use this plugin + * command to have it display a sprite from the filename. + * + * GabSpriteIndex x + * Used in combination with the above plugin command to define which index the + * sprite will use. + * + * GabActor x + * GabActorFace x + * This will display actor x's face graphic where x is the actor's ID. + * + * GabActorSprite x + * This will display actor x's sprite graphic where x is the actor's ID. + * + * GabParty x + * GabPartyFace x + * This will display party member x's face graphic where x is the position. + * + * GabPartySprite x + * This will display party member x's sprite graphic where x is the position. + * + * GabSound filename + * This will play a sound from the SE folder under that particular filename. + * + * GabSwitch x + * This will enable switch x when this gab finishes playing. + * + * --- Display Commands --- + * + * ShowGab + * Once the above settings are complete, use this Plugin Command to launch the + * Gab Window and display the above data. This will put the gab data into a + * queue which means if there's another gab playing, this will be next in line. + * + * *Note If multiple ShowGabs are used, they will be queued up. The current + * playing gab will finish playing before moving onto the next. If it so + * happens that the inputted Gab would have the same exact settings as a + * previously loaded gab within the same queue, it will not be inserted to + * prevent any redundancy amongst the conversation. + * + * ForceGab + * Once the above settings are complete, use this Plugin Command to clear all + * the other gabs in the Gab Window and display the above data. + * + * ClearGab + * This clears out the Gab Window of the current gab and any gabs queued. + * + * ============================================================================ + * Changelog + * ============================================================================ + * + * Version 1.03a: + * - Fixed a bug with GabSound that didn't load the proper sound filenames. + * - Fixed the time count for Gabs to not include text codes. + * + * Version 1.02a: + * - Added functionality for battle gabs to be saved when going into other + * scenes and returning to battle. + * - Added GabSwitch x to enable switch x when the gab finishes playing. + * + * Version 1.01: + * - Added 'GabParty x' and 'GabPartySprite x' plugin commands to help with + * those without dynamic party setups. + * + * Version 1.00: + * - Finished Plugin! + * + */ + /*:ja + * @plugindesc v1.03a "Gab Window"はメッセージウィンドウ無しで画面上におしゃべりを表示できるプラグインです。 + * @author Yanfly Engine Plugins + * + * @param ---一般--- + * @default + * + * @param Gab Font Name + * @desc Gab Windowで使われるフォント名を指定してください + * デフォルト: GameFont + * @default GameFont + * + * @param Gab Font Size + * @desc Gab Windowで使われるフォントサイズを指定してください + * デフォルト: 28 + * @default 28 + * + * @param Character X Pos + * @desc キャラクター表示のX座標を指定してください + * デフォルト: 36 + * @default 36 + * + * @param Character Y Pos + * @desc キャラクター表示のY座標を指定してください + * デフォルト: 60 + * @default 60 + * + * @param Base Wait Time + * @desc Gab Windowの表示が続く最小フレーム数を指定してください + * デフォルト: 90 + * @default 90 + * + * @param Time Per Character + * @desc テキストキャラクターごとに追加されるフレーム数を指定してください + * デフォルト: 4 + * @default 4 + * + * @param Fade Rate + * @desc Gab Windowがフェードアウトする速さを指定してください + * デフォルト: 16 + * @default 16 + * + * @param Anti-Repeat + * @desc 同じ設定のGab Windowがキュー処理されるのを防ぎますか? + * いいえ - false はい - true + * @default true + * + * @param ---マップ時--- + * @default + * + * @param Map Y Location + * @desc Gab Window表示のY座標を指定してください。 + * デフォルト: 72 + * @default 72 + * + * @param Map Dim Color 1 + * @desc マップ時に用いられる、背景色1 を指定してください。 + * デフォルト: rgba(0, 0, 0, 0.6) + * @default rgba(0, 0, 0, 0.6) + * + * @param Map Dim Color 2 + * @desc マップ時に用いられる、背景色2 を指定してください。 + * デフォルト: rgba(0, 0, 0, 0.3) + * @default rgba(0, 0, 0, 0.3) + * + * @param ---戦闘--- + * @default + * + * @param Battle Y Location + * @desc Gab Window表示のY座標を指定してください。 + * Default: 108 + * @default 108 + * + * @param Battle Dim Color 1 + * @desc 戦闘時に用いられる、背景色1 を指定してください。 + * デフォルト: rgba(0, 0, 0, 0.6) + * @default rgba(0, 0, 0, 0.6) + * + * @param Battle Dim Color 2 + * @desc 戦闘時に用いられる、背景色2 を指定してください。 + * デフォルト: rgba(0, 0, 0, 0) + * @default rgba(0, 0, 0, 0) + * + * @help + * ============================================================================ + * Introduction + * ============================================================================ + * + * ウィンドウを必要とするまでもないような、おしゃべりを表示させたいですか? + * "Gab Window"はメッセージウィンドウ外、画面の隅で、そのようなおしゃべりを表示 + * させることができます。テキストは一時的に画面上に表示され、その後消えます。 + * 何か他の要因が介入しない限りは、また表れることもありません。 + * + * MVでの新しい要素としては、あなたのゲーム内のGab Windowに音を付けることが + * できます。また、複数のおしゃべりをまとめてキュー処理し、会話のようにつなげる + * こともできます。その際、現在表示されているおしゃべりは、次のおしゃべりが + * ロードされるタイミングでフェードアウトします。 + * + * ============================================================================ + * Instructions + * ============================================================================ + * + * "Gab Window"の使い方はとってもシンプルです。デフォルト設定では、マップでも + * バトルシーンでも使うことができるようになっています。表示の指示・設定をする + * には、下記のプラグインコマンドを用いてください。 + * + * プラグインコマンド: + * + * --- セットアップコマンド --- + * + * GabText text + * Gab Windowに、このテキストを表示させます。Gab Window内では + * テキストコードを使うこともできます。 + * + * GabFaceName filename + * 顔グラフィックを表示させたい場合は、このコマンドを用いてファイル名を指定 + * してください。 + * + * GabFaceIndex x + * 上記のコマンドと一緒に用いることで、その顔グラフィックがどのインデックスを + * 使うかを指定します。 + * + * GabSpriteName filename + * 特定のキャラクタースプライトを表示させたい時は、このコマンドを使って + * ファイル名を指定してください。 + * + * GabSpriteIndex x + * 上記のコマンドと一緒に用いることで、そのスプライトがどのインデックスを + * 使うかを指定します。 + * + * GabActor x + * GabActorFace x + * アクター x の顔グラフィックを表示させます。(xにはIDを入れてください) + * + * GabActorSprite x + * アクター x のスプライトを表示させます。(xにはIDを入れてください) + * + * GabParty x + * GabPartyFace x + * パーティメンバー x の顔グラフィックを表示させます。(xにはポジションを + * 入れてください) + * + * GabPartySprite x + * パーティメンバー x のスプライトを表示させます。(xにはポジションを + * 入れてください) + * + * GabSound filename + * SEフォルダから、filenameで指定したサウンドを再生します。 + * + * GabSwitch x + * おしゃべりの再生が終了したときに、スイッチ x を有効にします。 + * + * --- Display Commands --- + * + * ShowGab + * 一旦上記の設定が完了したら、このプラグインコマンドを使ってGab Windowを + * 起動し、上記のデータを表示させます。これによりおしゃべりがキューに追加され、 + * もし他のおしゃべりが再生されている場合は、そのうしろに並ぶようになります。 + * + * *注意:複数の"ShowGabs"が使用されると、それらは一列に並びます。現在再生され + * ているおしゃべりは、次のおしゃべりに移る前に終了します。新たに追加しようと + * したおしゃべりが、たまたまロード済のおしゃべりと全く同じ設定だった場合、 + * 会話内の重複を防ぐため、新規追加は行われません。 + * + * ForceGab + * 一旦上記の設定が完了したら、このプラグインコマンドを使って他の全ての他の + * おしゃべりを消去し、上記のデータを表示させます。 + * + * ClearGab + * 現在のおしゃべりのGab Windowと、待機中のおしゃべりを全て消去します。 + * + * ============================================================================ + * Changelog + * ============================================================================ + * + * Version 1.03a: + * - Fixed a bug with GabSound that didn't load the proper sound filenames. + * - Fixed the time count for Gabs to not include text codes. + * + * Version 1.02a: + * - Added functionality for battle gabs to be saved when going into other + * scenes and returning to battle. + * - Added GabSwitch x to enable switch x when the gab finishes playing. + * + * Version 1.01: + * - Added 'GabParty x' and 'GabPartySprite x' plugin commands to help with + * those without dynamic party setups. + * + * Version 1.00: + * - Finished Plugin! + * + */ +//============================================================================= + +//============================================================================= +// Parameter Variables +//============================================================================= + +Yanfly.Parameters = PluginManager.parameters('YEP_GabWindow'); +Yanfly.Param = Yanfly.Param || {}; + +Yanfly.Param.GabFontName = String(Yanfly.Parameters['Gab Font Name']); +Yanfly.Param.GabFontSize = Number(Yanfly.Parameters['Gab Font Size']); +Yanfly.Param.GabCharPosX = Number(Yanfly.Parameters['Character X Pos']); +Yanfly.Param.GabCharPosY = Number(Yanfly.Parameters['Character Y Pos']); +Yanfly.Param.GabBaseTime = Number(Yanfly.Parameters['Base Wait Time']); +Yanfly.Param.GabTimePerChar = Number(Yanfly.Parameters['Time Per Character']); +Yanfly.Param.GabFadeRate = Number(Yanfly.Parameters['Fade Rate']); +Yanfly.Param.GabAntiRepeat = Boolean(Yanfly.Parameters['Anti-Repeat']); + +Yanfly.Param.GabMapYLoc = Number(Yanfly.Parameters['Map Y Location']); +Yanfly.Param.GabMapDim1 = String(Yanfly.Parameters['Map Dim Color 1']); +Yanfly.Param.GabMapDim2 = String(Yanfly.Parameters['Map Dim Color 2']); + +Yanfly.Param.GabBattleYLoc = Number(Yanfly.Parameters['Battle Y Location']); +Yanfly.Param.GabBattleDim1 = String(Yanfly.Parameters['Battle Dim Color 1']); +Yanfly.Param.GabBattleDim2 = String(Yanfly.Parameters['Battle Dim Color 2']); + +//============================================================================= +// Game_Interpreter +//============================================================================= + +Yanfly.Gab.Game_Interpreter_clear = Game_Interpreter.prototype.clear; +Game_Interpreter.prototype.clear = function() { + Yanfly.Gab.Game_Interpreter_clear.call(this); + this.clearGabInformation(); +}; + +Yanfly.Gab.Game_Interpreter_pluginCommand = + Game_Interpreter.prototype.pluginCommand; +Game_Interpreter.prototype.pluginCommand = function(command, args) { + Yanfly.Gab.Game_Interpreter_pluginCommand.call(this, command, args) + if (command === 'GabText') this.setGabText(args); + if (command === 'GabSpriteName') this.setGabSpriteName(args); + if (command === 'GabSpriteIndex') this.setGabSpriteIndex(args); + if (command === 'GabFaceName') this.setGabFaceName(args); + if (command === 'GabFaceIndex') this.setGabFaceIndex(args); + if (command === 'GabActorSprite') this.setGabActorSprite(args); + if (command === 'GabActor') this.setGabActorFace(args); + if (command === 'GabActorFace') this.setGabActorFace(args); + if (command === 'GabPartySprite') this.setGabPartySprite(args); + if (command === 'GabParty') this.setGabPartyFace(args); + if (command === 'GabPartyFace') this.setGabPartyFace(args); + if (command === 'GabSound') this.setGabSound(args); + if (command === 'GabSwitch') this.setGabSwitch(args); + if (command === 'ShowGab') this.showGab(); + if (command === 'ForceGab') this.forceGab(); + if (command === 'ClearGab') this.clearGab(); +}; + +Game_Interpreter.prototype.clearGabInformation = function() { + this._gabText = ''; + this._gabGraphicType = 'none'; + this._gabGraphicName = ''; + this._gabGraphicIndex = 0; + this._gabSoundName = ''; + this._gabSwitch = 0; +}; + +Game_Interpreter.prototype.setGabText = function(args) { + var text = ''; + for (var i = 0; i < args.length; ++i) { + text = text + args[i] + ' '; + } + this._gabText = text; +}; + +Game_Interpreter.prototype.setGabSpriteName = function(args) { + this._gabGraphicType = 'character'; + var text = ''; + if (args.length === 1) return this._gabGraphicName = String(args[0]); + for (var i = 0; i < args.length; ++i) { + text = text + ' ' + args[i]; + } + this._gabGraphicName = text; +}; + +Game_Interpreter.prototype.setGabSpriteIndex = function(args) { + this._gabGraphicType = 'character'; + this._gabGraphicIndex = parseInt(args[0]); +}; + +Game_Interpreter.prototype.setGabFaceName = function(args) { + this._gabGraphicType = 'face'; + var text = ''; + if (args.length === 1) return this._gabGraphicName = String(args[0]); + for (var i = 0; i < args.length; ++i) { + text = text + ' ' + args[i]; + } + this._gabGraphicName = text; +}; + +Game_Interpreter.prototype.setGabFaceIndex = function(args) { + this._gabGraphicType = 'face'; + this._gabGraphicIndex = parseInt(args[0]); +}; + +Game_Interpreter.prototype.setGabActorSprite = function(args) { + var actorId = parseInt(args[0]); + var actor = $gameActors.actor(actorId); + if (!actor) return; + this._gabGraphicType = 'character'; + this._gabGraphicName = actor.characterName(); + this._gabGraphicIndex = actor.characterIndex(); +}; + +Game_Interpreter.prototype.setGabPartySprite = function(args) { + var position = parseInt(args[0]); + if (position <= 0) return; + position -= 1; + var actor = $gameParty.members()[position]; + if (!actor) return; + var actorId = actor._actorId; + this.setGabActorSprite([actorId]); +}; + +Game_Interpreter.prototype.setGabActorFace = function(args) { + var actorId = parseInt(args[0]); + var actor = $gameActors.actor(actorId); + if (!actor) return; + this._gabGraphicType = 'face'; + this._gabGraphicName = actor.faceName(); + this._gabGraphicIndex = actor.faceIndex(); +}; + +Game_Interpreter.prototype.setGabPartyFace = function(args) { + var position = parseInt(args[0]); + if (position <= 0) return; + position -= 1; + var actor = $gameParty.members()[position]; + if (!actor) return; + var actorId = actor._actorId; + this.setGabActorFace([actorId]); +}; + +Game_Interpreter.prototype.setGabSound = function(args) { + var text = ''; + if (args.length === 1) return this._gabSoundName = String(args[0]); + for (var i = 0; i < args.length; ++i) { + if (i === 0) { + text = args[0]; + continue; + } + text = text + ' ' + args[i]; + } + this._gabSoundName = text; +}; + +Game_Interpreter.prototype.setGabSwitch = function(args) { + this._gabSwitch = parseInt(args[0]); +}; + +Game_Interpreter.prototype.showGab = function() { + if (!this._gabText) return; + var gabData = [ + this._gabText, + this._gabGraphicType, + this._gabGraphicName, + this._gabGraphicIndex, + this._gabSoundName, + this._gabSwitch + ]; + var scene = SceneManager._scene; + if (scene._gabWindow) scene.startGabWindow(gabData); + this.clearGabInformation(); +}; + +Game_Interpreter.prototype.forceGab = function() { + if (!this._gabText) return; + var gabData = [ + this._gabText, + this._gabGraphicType, + this._gabGraphicName, + this._gabGraphicIndex, + this._gabSoundName, + this._gabSwitch + ]; + var scene = SceneManager._scene; + if (scene._gabWindow) scene.forceGabWindow(gabData); + this.clearGabInformation(); +}; + +Game_Interpreter.prototype.clearGab = function() { + var scene = SceneManager._scene; + if (scene._gabWindow) scene.clearGabWindow(); + this.clearGabInformation(); +}; + +//============================================================================= +// Window_Gab +//============================================================================= + +function Window_Gab() { + this.initialize.apply(this, arguments); +} + +Window_Gab.prototype = Object.create(Window_Base.prototype); +Window_Gab.prototype.constructor = Window_Gab; + +Window_Gab.prototype.initialize = function(battle) { + this._battle = battle; + var wx = this.standardPadding() * -1; + if (battle) { + var wy = Yanfly.Param.GabBattleYLoc - this.standardPadding(); + } else { + var wy = Yanfly.Param.GabMapYLoc - this.standardPadding(); + } + var ww = Graphics.boxWidth + this.standardPadding() * 2; + var wh = this.fittingHeight(2); + this._gabSwitch = 0; + this._showCount = 0; + this._ignoreMask = true; + this._gabQueue = []; + this._currentGab = []; + this._gabSwitchedOn = false; + Window_Base.prototype.initialize.call(this, wx, wy, ww, wh); + this.restoreGabs(); + this.clear(); +}; + +Window_Gab.prototype.clear = function() { + this._gabLoaded = false; + this._graphicLoading = false; + this.opacity = 0; + this.contentsOpacity = 0; + this._text = ''; + this._graphicType = 'none'; + this._graphicName = ''; + this._graphicIndex = 0; + this._soundName = ''; + this._graphicBitmap = undefined; +}; + +Window_Gab.prototype.standardFontFace = function() { + return Yanfly.Param.GabFontName; +}; + +Window_Gab.prototype.standardFontSize = function() { + return Yanfly.Param.GabFontSize; +}; + +Window_Gab.prototype.update = function() { + Window_Base.prototype.update.call(this); + if (this.isHideGabWindow()) { + this.hide(); + } else if (this._gabLoaded) { + if (this._graphicLoading && this._graphicBitmap.width <= 0) return; + this.refresh(); + } else if (this._showCount > 0) { + this.updateFadeIn(); + --this._showCount; + } else if (this.contentsOpacity > 0) { + this.updateFadeOut(); + } else if (this._gabQueue.length > 0) { + this.processNewGabData() + } +}; + +Window_Gab.prototype.isHideGabWindow = function() { + if ($gameParty.inBattle() && BattleManager._victoryPhase) return true; + return false; +}; + +Window_Gab.prototype.updateFadeIn = function() { + this.contentsOpacity += Yanfly.Param.GabFadeRate; +}; + +Window_Gab.prototype.updateFadeOut = function() { + this.contentsOpacity -= Yanfly.Param.GabFadeRate; + if (this.contentsOpacity > 0) return; + if (this._gabSwitchedOn) return; + if (this._gabSwitch) { + $gameSwitches.setValue(this._gabSwitch, true); + this._gabSwitchedOn = true; + } +}; + +Window_Gab.prototype.addGabData = function(gabData) { + if (!gabData) return; + if (this.checkDuplicateGab(gabData)) return; + this._gabQueue.push(gabData); +}; + +Window_Gab.prototype.forceGabData = function(gabData) { + if (!gabData) return; + if (this.checkCurrentGab(gabData)) return; + this._gabQueue = []; + this._currentGab = []; + this._showCount = 0; + this._gabQueue.push(gabData); +}; + +Window_Gab.prototype.clearGabData = function() { + this._gabQueue = []; + this._currentGab = []; + this._showCount = 0; +}; + +Window_Gab.prototype.checkDuplicateGab = function(gabData) { + if (!Yanfly.Param.GabAntiRepeat) return false; + if (this.checkCurrentGab(gabData)) return true; + if (this.checkQueuedGabs(gabData)) return true; + return false; +}; + +Window_Gab.prototype.checkCurrentGab = function(gabData) { + var iteration = this._currentGab; + if (iteration[0] !== gabData[0]) return false; + if (iteration[1] !== gabData[1]) return false; + if (iteration[2] !== gabData[2]) return false; + if (iteration[3] !== gabData[3]) return false; + if (iteration[4] !== gabData[4]) return false; + if (iteration[5] !== gabData[5]) return false; + return true; +}; + +Window_Gab.prototype.checkQueuedGabs = function(gabData) { + for (var i = 0; i < this._gabQueue.length; ++i) { + var iteration = this._gabQueue[i]; + if (iteration[0] !== gabData[0]) continue; + if (iteration[1] !== gabData[1]) continue; + if (iteration[2] !== gabData[2]) continue; + if (iteration[3] !== gabData[3]) continue; + if (iteration[4] !== gabData[4]) continue; + if (iteration[5] !== gabData[5]) continue; + return true; + } + return false; +}; + +Window_Gab.prototype.processNewGabData = function() { + var gabData = this._gabQueue.shift(); + this._gabSwitchedOn = false; + this._currentGab = gabData; + this._text = gabData[0] || ''; + this._graphicType = gabData[1] || 'none'; + this._graphicName = gabData[2] || ''; + this._graphicIndex = gabData[3] || 0; + this._soundName = gabData[4] || 0; + this._gabSwitch = gabData[5] || 0; + this.setupLoadGraphic(); + this._gabLoaded = true; +}; + +Window_Gab.prototype.setupLoadGraphic = function() { + this._graphicLoading = false; + if (this._graphicType === 'character') { + this._graphicBitmap = ImageManager.loadCharacter(this._graphicName); + this._graphicLoading = true; + } else if (this._graphicType === 'face') { + this._graphicBitmap = ImageManager.loadFace(this._graphicName); + this._graphicLoading = true; + } +}; + +Window_Gab.prototype.refresh = function() { + this.contents.clear(); + this.startCountdown(); + this.drawGabBackground(); + this.drawGabCharacter(); + this.drawGabText(); + this.playSound(); + this.clear(); +}; + +Yanfly.Gab.WindowLayer_webglMaskWindow = + WindowLayer.prototype._webglMaskWindow; +WindowLayer.prototype._webglMaskWindow = function(renderSession, win) { + if (win._ignoreMask) return; + Yanfly.Gab.WindowLayer_webglMaskWindow.call(this, renderSession, win); +}; + +Window_Gab.prototype.startCountdown = function() { + this._graphicLoading = false; + this.contentsOpacity = 255; + this._showCount = Yanfly.Param.GabBaseTime; + var text = this._text.replace(/\\(.*?)\[(.*?)\]/gi, ''); + this._showCount += text.length * Yanfly.Param.GabTimePerChar; +}; + +Window_Gab.prototype.drawGabBackground = function() { + var width = this.contentsWidth(); + this.drawBackground(0, 0, width, this.lineHeight() * 2); +}; + +Window_Gab.prototype.dimColor1 = function() { + if ($gameParty.inBattle()) { + return Yanfly.Param.GabBattleDim1; + } else { + return Yanfly.Param.GabMapDim1; + } +}; + +Window_Gab.prototype.dimColor2 = function() { + if ($gameParty.inBattle()) { + return Yanfly.Param.GabBattleDim2; + } else { + return Yanfly.Param.GabMapDim2; + } +}; + +Window_Gab.prototype.drawBackground = function(wx, wy, ww, wh) { + var color1 = this.dimColor1(); + var color2 = this.dimColor2(); + var ww1 = Math.ceil(ww * 0.25) + var ww2 = Math.ceil(ww * 0.75) + this.contents.gradientFillRect(wx, wy, ww1, wh, color1, color1); + this.contents.gradientFillRect(ww1, wy, ww2, wh, color1, color2); +}; + +Window_Gab.prototype.drawGabCharacter = function() { + if (this._graphicName === '') return; + if (this._graphicType === 'character') { + var wx = Yanfly.Param.GabCharPosX; + var wy = Yanfly.Param.GabCharPosY; + this.drawCharacter(this._graphicName, this._graphicIndex, wx, wy); + } else if (this._graphicType === 'face') { + var wx = 0; + var wy = 0; + var ww = Window_Base._faceWidth; + var wh = this.lineHeight() * 2; + this.drawFace(this._graphicName, this._graphicIndex, wx, wy, ww, wh); + } +}; + +Window_Gab.prototype.drawGabText = function() { + var text = this._text; + if (this._graphicType === 'character') { + var wx = Yanfly.Param.GabCharPosX * 2; + } else if (this._graphicType === 'face') { + var wx = Window_Base._faceWidth + this.standardPadding(); + } else { + var wx = this.standardPadding(); + } + var wy = this.contents.height / 2 - this.lineHeight() / 2; + this.drawTextEx(text, wx, wy); +}; + +Window_Gab.prototype.playSound = function() { + var sound = { + name: this._soundName, + volume: 90, + pitch: 100, + pan: 0 + }; + AudioManager.playSe(sound); +}; + +Window_Gab.prototype.storeGabs = function() { + if (this._battle) { + this.storeBattleGabs(); + } else { + this.storeMapGabs(); + } +}; + +Window_Gab.prototype.storeBattleGabs = function() { + $gameTemp._storedBattleGabs = this._gabQueue.slice(); + if (this.contentsOpacity > 0) { + $gameTemp._currentBattleGab = this._currentGab.slice(); + } else { + $gameTemp._currentBattleGab = []; + } +}; + +Window_Gab.prototype.storeMapGabs = function() { + $gameTemp._storedMapGabs = this._gabQueue.slice(); + if (this.contentsOpacity > 0) { + $gameTemp._currentMapGab = this._currentGab.slice(); + } else { + $gameTemp._currentMapGab = []; + } +}; + +Window_Gab.prototype.restoreGabs = function() { + if (this._battle) { + this.restoreBattleGabs(); + } else { + this.restoreMapGabs(); + } +}; + +Window_Gab.prototype.restoreBattleGabs = function() { + if ($gameTemp._storedBattleGabs) { + this._gabQueue = $gameTemp._storedBattleGabs; + $gameTemp._storedBattleGabs = undefined; + } + if ($gameTemp._currentBattleGab && $gameTemp._currentBattleGab.length > 0) { + this._gabQueue.unshift($gameTemp._currentBattleGab); + $gameTemp._currentBattleGab = undefined; + } +}; + +Window_Gab.prototype.restoreMapGabs = function() { + if ($gameTemp._storedMapGabs) { + this._gabQueue = $gameTemp._storedMapGabs; + $gameTemp._storedMapGabs = undefined; + } + if ($gameTemp._currentMapGab && $gameTemp._currentMapGab.length > 0) { + this._gabQueue.unshift($gameTemp._currentMapGab); + $gameTemp._currentMapGab = undefined; + } +}; + +//============================================================================= +// SceneManager +//============================================================================= + +Yanfly.Gab.SceneManager_push = SceneManager.push; +SceneManager.push = function(sceneClass) { + if (this.isStoreGabs(sceneClass)) { + this._scene._gabWindow.storeGabs(); + } + Yanfly.Gab.SceneManager_push.call(this, sceneClass); +}; + +SceneManager.isStoreGabs = function(sceneClass) { + if (!this.isSceneMap() && !this.isSceneBattle()) return false; + if (sceneClass === Scene_Map) { + if (this.isSceneMap()) return false; + } else if (sceneClass === Scene_Battle) { + if (this.isSceneMap()) return true; + } + return true; +}; + +SceneManager.isSceneMap = function() { + return this._scene instanceof Scene_Map; +}; + +SceneManager.isSceneBattle = function() { + return this._scene instanceof Scene_Battle; +}; + +//============================================================================= +// Scene_Base +//============================================================================= + +Scene_Base.prototype.createGabWindow = function(battle) { + this._gabWindow = new Window_Gab(battle); + this.addChild(this._gabWindow); +}; + +Scene_Base.prototype.startGabWindow = function(gabData) { + this._gabWindow.addGabData(gabData); +}; + +Scene_Base.prototype.forceGabWindow = function(gabData) { + this._gabWindow.forceGabData(gabData); +}; + +Scene_Base.prototype.clearGabWindow = function() { + this._gabWindow.clearGabData(); +}; + +//============================================================================= +// Scene_Battle +//============================================================================= + +Yanfly.Gab.Scene_Battle_createAllWindows = + Scene_Battle.prototype.createAllWindows; +Scene_Battle.prototype.createAllWindows = function() { + Yanfly.Gab.Scene_Battle_createAllWindows.call(this); + this.createGabWindow(true); +}; +//============================================================================= +// Scene_Map +//============================================================================= + +Yanfly.Gab.Scene_Map_createAllWindows = Scene_Map.prototype.createAllWindows; +Scene_Map.prototype.createAllWindows = function() { + Yanfly.Gab.Scene_Map_createAllWindows.call(this); + this.createGabWindow(false); +}; + +//============================================================================= +// End of File +//============================================================================= diff --git a/js/plugins/YEP_SlipperyTiles.js b/js/plugins/YEP_SlipperyTiles.js new file mode 100644 index 0000000..d60d149 --- /dev/null +++ b/js/plugins/YEP_SlipperyTiles.js @@ -0,0 +1,202 @@ +//============================================================================= +// Yanfly Engine Plugins - Slippery Tiles +// YEP_SlipperyTiles.js +//============================================================================= + +var Imported = Imported || {}; +Imported.YEP_SlipperyTiles = true; + +var Yanfly = Yanfly || {}; +Yanfly.Slip = Yanfly.Slip || {}; + +//============================================================================= + /*: + * @plugindesc v1.01 You can create slippery tiles by marking them with + * either a terrain tag or a region number. + * @author Yanfly Engine Plugins + * + * @param Slippery Frame + * @desc This is the frame used while characters are sliding. + * @default 2 + * + * @param Slippery Region + * @desc Any tile marked with this region is a slippery tile + * regardless of terrain tag. Use 0 to ignore. + * @default 0 + * + * @help + * ============================================================================ + * Introduction + * ============================================================================ + * + * This plugin enables you to set which tiles are slippery tiles through either + * regions or notetags. To use regions, change the parameter setting to which + * region ID you would like to associate with a slippery tile. + * + * ============================================================================ + * Notetags + * ============================================================================ + * + * You can use these notetags to add slippery tiles to your tilesets. + * + * Tileset Notetag: + * + * + * Tiles with terrain ID x will be designated as slippery tiles. + * + * ============================================================================ + * Changelog + * ============================================================================ + * + * Version 1.01: + * - Added failsafe for people who aren't using tilesets + * + * Version 1.00: + * - Finished Plugin! + */ + /*:ja + * @plugindesc v1.01 タイルに地形タグをマークしたりリージョンナンバーを振ることで、滑るタイルを作成することができます。 + * @author Yanfly Engine Plugins + * + * @param Slippery Frame + * @desc キャラクターが滑る際に使われるフレームです。 + * @default 2 + * + * @param Slippery Region + * @desc このリージョンを振られたタイルは、地形タグに関わらず、滑るタイルとなり + * ます。0を入れることで無効になります。 + * @default 0 + * + * @help + * ============================================================================ + * Introduction + * ============================================================================ + * + * このプラグインを使えば、リージョンやノートタグによって、滑るタイルを設定する + * ことができるようになります。リージョンを使う場合は、パラメーターセッティング + * から、どのリージョンIDを紐づけたいか指定してください。 + * + * ============================================================================ + * Notetags + * ============================================================================ + * + * 下記のノートタグを使って、タイルセットに滑るタイルを加えてください。 + * + * タイルセットのノートタグ: + * + * + * これで地形ID x を持ったタイルが、滑るタイルとして指定されます。 + * + * ============================================================================ + * Changelog + * ============================================================================ + * + * Version 1.01: + * - Added failsafe for people who aren't using tilesets + * + * Version 1.00: + * - Finished Plugin! + */ +//============================================================================= + +//============================================================================= +// Parameter Variables +//============================================================================= + +Yanfly.Parameters = PluginManager.parameters('YEP_SlipperyTiles'); +Yanfly.Param = Yanfly.Param || {}; + +Yanfly.Param.SlipRegion = Number(Yanfly.Parameters['Slippery Region']); +Yanfly.Param.SlipFrame = Number(Yanfly.Parameters['Slippery Frame']); + +//============================================================================= +// DataManager +//============================================================================= + +Yanfly.Slip.DataManager_isDatabaseLoaded = DataManager.isDatabaseLoaded; +DataManager.isDatabaseLoaded = function() { + if (!Yanfly.Slip.DataManager_isDatabaseLoaded.call(this)) return false; + this.processSlipNotetags($dataTilesets); + return true; +}; + +DataManager.processSlipNotetags = function(group) { + var regexp1 = /<(?:SLIPPERY|slippery tile):[ ]*(\d+(?:\s*,\s*\d+)*)>/i; + for (var n = 1; n < group.length; n++) { + var obj = group[n]; + var notedata = obj.note.split(/[\r\n]+/); + + obj.slippery = []; + + for (var i = 0; i < notedata.length; i++) { + var line = notedata[i]; + if (line.match(regexp1)) { + var array = JSON.parse('[' + RegExp.$1.match(/\d+/g) + ']'); + obj.slippery = obj.slippery.concat(array); + } + } + } +}; + +//============================================================================= +// Game_Map +//============================================================================= + +Game_Map.prototype.isSlippery = function(mx, my) { + if (this.isValid(mx, my) && this.tileset()) { + if (Yanfly.Param.SlipRegion !== 0 && + this.regionId(mx, my) === Yanfly.Param.SlipRegion) return true; + var tagId = this.terrainTag(mx, my); + var slipTiles = this.tileset().slippery; + return slipTiles.contains(tagId); + } + return false; +}; + +//============================================================================= +// Game_CharacterBase +//============================================================================= + +Game_CharacterBase.prototype.onSlipperyFloor = function() { + return $gameMap.isSlippery(this._x, this._y); +}; + +Game_CharacterBase.prototype.slipperyPose = function() { + if (!this.onSlipperyFloor()) return false; + if (this._stepAnime) return false; + return true; +}; + +Yanfly.Slip.Game_CharacterBase_pattern = Game_CharacterBase.prototype.pattern; +Game_CharacterBase.prototype.pattern = function() { + if (this.slipperyPose()) return Yanfly.Param.SlipFrame; + return Yanfly.Slip.Game_CharacterBase_pattern.call(this); +}; + +//============================================================================= +// Game_Player +//============================================================================= + +Yanfly.Slip.Game_Player_isDashing = Game_Player.prototype.isDashing; +Game_Player.prototype.isDashing = function() { + if (this.onSlipperyFloor()) return false; + return Yanfly.Slip.Game_Player_isDashing.call(this); +}; + +Yanfly.Slip.Game_Player_update = Game_Player.prototype.update; +Game_Player.prototype.update = function(sceneActive) { + Yanfly.Slip.Game_Player_update.call(this, sceneActive); + this.updateSlippery(); +}; + +Game_Player.prototype.updateSlippery = function() { + if ($gameMap.isEventRunning()) return; + if (this.onSlipperyFloor() && !this.isMoving()) { + $gameTemp.clearDestination(); + this.moveStraight(this._direction); + } +}; + +//============================================================================= +// End of File +//============================================================================= diff --git a/js/plugins/Yami_8DIR.js b/js/plugins/Yami_8DIR.js new file mode 100644 index 0000000..09dba70 --- /dev/null +++ b/js/plugins/Yami_8DIR.js @@ -0,0 +1,74 @@ +//============================================================================= +// Yami_8DIR.js +//============================================================================= + +/*:ja + * @plugindesc プレイヤーの8方向の移動が可能になります。 + */ + +(function() { + Game_Player.prototype.isMoveDiagonally = function(direction) { + var dir8 = [1, 3, 7, 9]; + + return dir8.some(function(dir) { + return dir === direction; + }, this); + }; + + Game_Player.prototype.isMoveStraight = function(direction) { + var dir4 = [2, 4, 6, 8]; + + return dir4.some(function(dir) { + return dir === direction; + }, this); + }; + + Game_Player.prototype.getDiagonallyMovement = function(direction) { + var horz = 0, + vert = 0; + + if (direction === 1) { + horz = 4; + vert = 2; + } else if (direction === 3) { + horz = 6; + vert = 2; + } else if (direction === 7) { + horz = 4; + vert = 8; + } else if (direction === 9) { + horz = 6; + vert = 8; + } + + return [horz, vert]; + }; + + Game_Player.prototype.processMoveByInput = function(direction) { + var diagonal = this.getDiagonallyMovement(direction); + + if (this.isMoveStraight(direction)) { + this.moveStraight(direction); + } else if (this.isMoveDiagonally(direction)) { + this.moveDiagonally.apply(this, diagonal); + } + }; + + Game_Player.prototype.moveByInput = function() { + if (!this.isMoving() && this.canMove()) { + var direction = Input.dir8; + + if (direction > 0) { + $gameTemp.clearDestination(); + } else if ($gameTemp.isDestinationValid()){ + var x = $gameTemp.destinationX(); + var y = $gameTemp.destinationY(); + direction = this.findDirectionTo(x, y); + } + + if (direction > 0) { + this.processMoveByInput(direction); + } + } + }; +}()); diff --git a/js/plugins/Yami_SkipTitle.js b/js/plugins/Yami_SkipTitle.js new file mode 100644 index 0000000..91c03bc --- /dev/null +++ b/js/plugins/Yami_SkipTitle.js @@ -0,0 +1,27 @@ +/*: + * @plugindesc Skip the title scene for testing purpose. + * @version 1.0 + */ + +/*:ja + * @plugindesc テストプレイ用にタイトルシーンを飛ばすことができます。 + * @version 1.0 + */ + +(function() { + + Scene_Boot.prototype.start = function() { + Scene_Base.prototype.start.call(this); + SoundManager.preloadImportantSounds(); + if (DataManager.isBattleTest()) { + DataManager.setupBattleTest(); + SceneManager.goto(Scene_Battle); + } else { + this.checkPlayerLocation(); + DataManager.setupNewGame(); + SceneManager.goto(Scene_Map); + } + this.updateDocumentTitle(); + }; + +})();